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 | AC_REQUIRE([RTEMS_BUILD_TOP]) |
---|
40 | cat >>cpuopts.tmp <<\_ACEOF |
---|
41 | |
---|
42 | #endif /* _RTEMS_SCORE_CPUOPTS_H */ |
---|
43 | _ACEOF |
---|
44 | |
---|
45 | AS_MKDIR_P(${RTEMS_BUILD_ROOT}/include/rtems/score) |
---|
46 | AS_IF([test -f ${RTEMS_BUILD_ROOT}/include/rtems/score/cpuopts.h], |
---|
47 | [ |
---|
48 | AS_IF([cmp -s ${RTEMS_BUILD_ROOT}/include/rtems/score/cpuopts.h cpuopts.tmp 2>/dev/null], |
---|
49 | [ |
---|
50 | AC_MSG_NOTICE([${RTEMS_BUILD_ROOT}/include/rtems/score/cpuopts.h is unchanged]) |
---|
51 | rm -f cpuopts.tmp |
---|
52 | ],[ |
---|
53 | AC_MSG_NOTICE([creating ${RTEMS_BUILD_ROOT}/include/rtems/score/cpuopts.h]) |
---|
54 | rm -f ${RTEMS_BUILD_ROOT}/include/rtems/score/cpuopts.h |
---|
55 | mv cpuopts.tmp ${RTEMS_BUILD_ROOT}/include/rtems/score/cpuopts.h |
---|
56 | ]) |
---|
57 | ],[ |
---|
58 | AC_MSG_NOTICE([creating ${RTEMS_BUILD_ROOT}/include/rtems/score/cpuopts.h]) |
---|
59 | rm -f ${RTEMS_BUILD_ROOT}/include/rtems/score/cpuopts.h |
---|
60 | mv cpuopts.tmp ${RTEMS_BUILD_ROOT}/include/rtems/score/cpuopts.h |
---|
61 | ]) |
---|
62 | ]) |
---|
63 | |
---|
64 | # RTEMS_TESTOPT(NAME,CONDITION,VALUE,EXPLANATION) |
---|
65 | |
---|
66 | AC_DEFUN([_RTEMS_TESTOPT_INIT],[ |
---|
67 | AC_BEFORE([_RTEMS_TESTOPT]) |
---|
68 | cat >>testopts.tmp <<\_ACEOF |
---|
69 | /** |
---|
70 | * @file rtems/testopts.h |
---|
71 | */ |
---|
72 | |
---|
73 | /* target test dependent options file */ |
---|
74 | /* automatically generated -- DO NOT EDIT!! */ |
---|
75 | #ifndef _RTEMS_TESTOPTS_H |
---|
76 | #define _RTEMS_TESTOPTS_H |
---|
77 | _ACEOF |
---|
78 | ]) |
---|
79 | |
---|
80 | AC_DEFUN([RTEMS_TESTOPT],[ |
---|
81 | AC_REQUIRE([_RTEMS_TESTOPT_INIT]) |
---|
82 | AC_BEFORE([_RTEMS_TESTOPT_FINI]) |
---|
83 | if $2; then |
---|
84 | cat >>testopts.tmp <<_ACEOF |
---|
85 | |
---|
86 | /* $4 */ |
---|
87 | #define $1 $3 |
---|
88 | _ACEOF |
---|
89 | ## FIXME: Duplicate the define to the autoheader |
---|
90 | ## Sanity check - Should be removed in future |
---|
91 | AC_DEFINE_UNQUOTED([$1],[$3],[$4]) |
---|
92 | else |
---|
93 | cat >>testopts.tmp <<\_ACEOF |
---|
94 | |
---|
95 | /* $4 */ |
---|
96 | /* #undef $1 */ |
---|
97 | _ACEOF |
---|
98 | fi |
---|
99 | ]) |
---|
100 | |
---|
101 | AC_DEFUN([_RTEMS_TESTOPT_FINI],[ |
---|
102 | AC_REQUIRE([RTEMS_BUILD_TOP]) |
---|
103 | cat >>testopts.tmp <<\_ACEOF |
---|
104 | |
---|
105 | #endif /* _RTEMS_TESTOPTS_H */ |
---|
106 | _ACEOF |
---|
107 | |
---|
108 | AS_MKDIR_P(${RTEMS_BUILD_ROOT}/include/rtems) |
---|
109 | AS_IF([test -f ${RTEMS_BUILD_ROOT}/include/rtems/testopts.h], |
---|
110 | [ |
---|
111 | AS_IF([cmp -s ${RTEMS_BUILD_ROOT}/include/rtems/testopts.h testopts.tmp 2>/dev/null], |
---|
112 | [ |
---|
113 | AC_MSG_NOTICE([${RTEMS_BUILD_ROOT}/include/rtems/testopts.h is unchanged]) |
---|
114 | rm -f testopts.tmp |
---|
115 | ],[ |
---|
116 | AC_MSG_NOTICE([creating ${RTEMS_BUILD_ROOT}/include/rtems/testopts.h]) |
---|
117 | rm -f ${RTEMS_BUILD_ROOT}/include/rtems/testopts.h |
---|
118 | mv testopts.tmp ${RTEMS_BUILD_ROOT}/include/rtems/testopts.h |
---|
119 | ]) |
---|
120 | ],[ |
---|
121 | AC_MSG_NOTICE([creating ${RTEMS_BUILD_ROOT}/include/rtems/testopts.h]) |
---|
122 | rm -f ${RTEMS_BUILD_ROOT}/include/rtems/testopts.h |
---|
123 | mv testopts.tmp ${RTEMS_BUILD_ROOT}/include/rtems/testopts.h |
---|
124 | ]) |
---|
125 | ]) |
---|