1 | # RTEMS_CPUOPT(NAME,CONDITION,VALUE,EXPLANATION) |
---|
2 | |
---|
3 | AC_DEFUN([_RTEMS_CPUOPT_INIT],[ |
---|
4 | AC_BEFORE([_RTEMS_CPUOPT]) |
---|
5 | cat >>cpuopts.tmp <<\_ACEOF |
---|
6 | /** |
---|
7 | * @file rtems/score/cpuopts.h |
---|
8 | */ |
---|
9 | |
---|
10 | /* target cpu dependent options file */ |
---|
11 | /* automatically generated -- DO NOT EDIT!! */ |
---|
12 | #ifndef _RTEMS_SCORE_CPUOPTS_H |
---|
13 | #define _RTEMS_SCORE_CPUOPTS_H |
---|
14 | _ACEOF |
---|
15 | ]) |
---|
16 | |
---|
17 | AC_DEFUN([RTEMS_CPUOPT],[ |
---|
18 | AC_REQUIRE([_RTEMS_CPUOPT_INIT]) |
---|
19 | AC_BEFORE([_RTEMS_CPUOPT_FINI]) |
---|
20 | if $2; then |
---|
21 | cat >>cpuopts.tmp <<_ACEOF |
---|
22 | |
---|
23 | /* $4 */ |
---|
24 | #define $1 $3 |
---|
25 | _ACEOF |
---|
26 | ## FIXME: Duplicate the define to the autoheader |
---|
27 | ## Sanity check - Should be removed in future |
---|
28 | AC_DEFINE_UNQUOTED([$1],[$3],[$4]) |
---|
29 | else |
---|
30 | cat >>cpuopts.tmp <<\_ACEOF |
---|
31 | |
---|
32 | /* $4 */ |
---|
33 | /* #undef $1 */ |
---|
34 | _ACEOF |
---|
35 | fi |
---|
36 | ]) |
---|
37 | |
---|
38 | AC_DEFUN([_RTEMS_CPUOPT_FINI],[ |
---|
39 | cat >>cpuopts.tmp <<\_ACEOF |
---|
40 | |
---|
41 | #endif /* _RTEMS_SCORE_CPUOPTS_H */ |
---|
42 | _ACEOF |
---|
43 | |
---|
44 | AS_MKDIR_P(score/include/rtems/score) |
---|
45 | AS_IF([test -f score/include/rtems/score/cpuopts.h], |
---|
46 | [ |
---|
47 | AS_IF([cmp -s score/include/rtems/score/cpuopts.h cpuopts.tmp 2>/dev/null], |
---|
48 | [ |
---|
49 | AC_MSG_NOTICE([score/include/rtems/score/cpuopts.h is unchanged]) |
---|
50 | rm -f cpuopts.tmp |
---|
51 | ],[ |
---|
52 | AC_MSG_NOTICE([creating score/include/rtems/score/cpuopts.h]) |
---|
53 | rm -f score/include/rtems/score/cpuopts.h |
---|
54 | mv cpuopts.tmp score/include/rtems/score/cpuopts.h |
---|
55 | ]) |
---|
56 | ],[ |
---|
57 | AC_MSG_NOTICE([creating score/include/rtems/score/cpuopts.h]) |
---|
58 | rm -f score/include/rtems/score/cpuopts.h |
---|
59 | mv cpuopts.tmp score/include/rtems/score/cpuopts.h |
---|
60 | ]) |
---|
61 | ]) |
---|