Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:24:27

0001 # RTEMS_CPUOPT(NAME,CONDITION,VALUE,EXPLANATION)
0002 
0003 AC_DEFUN([_RTEMS_CPUOPT_INIT],[
0004 AC_BEFORE([_RTEMS_CPUOPT])
0005 cat >>cpuopts.tmp <<\_ACEOF
0006 /**
0007  * @file rtems/score/cpuopts.h
0008  */
0009 
0010 /* target cpu dependent options file */
0011 /* automatically generated -- DO NOT EDIT!! */
0012 #ifndef _RTEMS_SCORE_CPUOPTS_H
0013 #define _RTEMS_SCORE_CPUOPTS_H
0014 _ACEOF
0015 ])
0016 
0017 AC_DEFUN([RTEMS_CPUOPT],[
0018 AC_REQUIRE([_RTEMS_CPUOPT_INIT])
0019 AC_BEFORE([_RTEMS_CPUOPT_FINI])
0020   if $2; then
0021 cat >>cpuopts.tmp <<_ACEOF
0022 
0023 /* $4 */
0024 #define $1 $3
0025 _ACEOF
0026 ## FIXME: Duplicate the define to the autoheader
0027 ## Sanity check - Should be removed in future
0028     AC_DEFINE_UNQUOTED([$1],[$3],[$4])
0029   else
0030 cat >>cpuopts.tmp <<\_ACEOF
0031 
0032 /* $4 */
0033 /* #undef $1 */
0034 _ACEOF
0035   fi
0036 ])
0037 
0038 AC_DEFUN([_RTEMS_CPUOPT_FINI],[
0039 AC_REQUIRE([RTEMS_BUILD_TOP])
0040 cat >>cpuopts.tmp <<\_ACEOF
0041 
0042 #endif /* _RTEMS_SCORE_CPUOPTS_H */
0043 _ACEOF
0044 
0045 AS_MKDIR_P(${RTEMS_BUILD_ROOT}/include/rtems/score)
0046 AS_IF([test -f ${RTEMS_BUILD_ROOT}/include/rtems/score/cpuopts.h],
0047 [
0048   AS_IF([cmp -s ${RTEMS_BUILD_ROOT}/include/rtems/score/cpuopts.h cpuopts.tmp 2>/dev/null],
0049   [ 
0050     AC_MSG_NOTICE([${RTEMS_BUILD_ROOT}/include/rtems/score/cpuopts.h is unchanged])
0051     rm -f cpuopts.tmp
0052   ],[
0053     AC_MSG_NOTICE([creating ${RTEMS_BUILD_ROOT}/include/rtems/score/cpuopts.h])
0054     rm -f ${RTEMS_BUILD_ROOT}/include/rtems/score/cpuopts.h
0055     mv cpuopts.tmp ${RTEMS_BUILD_ROOT}/include/rtems/score/cpuopts.h
0056   ])
0057 ],[
0058     AC_MSG_NOTICE([creating ${RTEMS_BUILD_ROOT}/include/rtems/score/cpuopts.h])
0059     rm -f ${RTEMS_BUILD_ROOT}/include/rtems/score/cpuopts.h
0060     mv cpuopts.tmp ${RTEMS_BUILD_ROOT}/include/rtems/score/cpuopts.h
0061 ])
0062 ])
0063 
0064 # RTEMS_TESTOPT(NAME,CONDITION,VALUE,EXPLANATION)
0065 
0066 AC_DEFUN([_RTEMS_TESTOPT_INIT],[
0067 AC_BEFORE([_RTEMS_TESTOPT])
0068 cat >>testopts.tmp <<\_ACEOF
0069 /**
0070  * @file rtems/testopts.h
0071  */
0072 
0073 /* target test dependent options file */
0074 /* automatically generated -- DO NOT EDIT!! */
0075 #ifndef _RTEMS_TESTOPTS_H
0076 #define _RTEMS_TESTOPTS_H
0077 _ACEOF
0078 ])
0079 
0080 AC_DEFUN([RTEMS_TESTOPT],[
0081 AC_REQUIRE([_RTEMS_TESTOPT_INIT])
0082 AC_BEFORE([_RTEMS_TESTOPT_FINI])
0083   if $2; then
0084 cat >>testopts.tmp <<_ACEOF
0085 
0086 /* $4 */
0087 #define $1 $3
0088 _ACEOF
0089 ## FIXME: Duplicate the define to the autoheader
0090 ## Sanity check - Should be removed in future
0091     AC_DEFINE_UNQUOTED([$1],[$3],[$4])
0092   else
0093 cat >>testopts.tmp <<\_ACEOF
0094 
0095 /* $4 */
0096 /* #undef $1 */
0097 _ACEOF
0098   fi
0099 ])
0100 
0101 AC_DEFUN([_RTEMS_TESTOPT_FINI],[
0102 AC_REQUIRE([RTEMS_BUILD_TOP])
0103 cat >>testopts.tmp <<\_ACEOF
0104 
0105 #endif /* _RTEMS_TESTOPTS_H */
0106 _ACEOF
0107 
0108 AS_MKDIR_P(${RTEMS_BUILD_ROOT}/include/rtems)
0109 AS_IF([test -f ${RTEMS_BUILD_ROOT}/include/rtems/testopts.h],
0110 [
0111   AS_IF([cmp -s ${RTEMS_BUILD_ROOT}/include/rtems/testopts.h testopts.tmp 2>/dev/null],
0112   [
0113     AC_MSG_NOTICE([${RTEMS_BUILD_ROOT}/include/rtems/testopts.h is unchanged])
0114     rm -f testopts.tmp
0115   ],[
0116     AC_MSG_NOTICE([creating ${RTEMS_BUILD_ROOT}/include/rtems/testopts.h])
0117     rm -f ${RTEMS_BUILD_ROOT}/include/rtems/testopts.h
0118     mv testopts.tmp ${RTEMS_BUILD_ROOT}/include/rtems/testopts.h
0119   ])
0120 ],[
0121     AC_MSG_NOTICE([creating ${RTEMS_BUILD_ROOT}/include/rtems/testopts.h])
0122     rm -f ${RTEMS_BUILD_ROOT}/include/rtems/testopts.h
0123     mv testopts.tmp ${RTEMS_BUILD_ROOT}/include/rtems/testopts.h
0124 ])
0125 ])