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 | ]) |
---|