source: rtems/cpukit/acinclude.m4 @ c130387

Last change on this file since c130387 was 05aec0c, checked in by Ralf Corsepius <ralf.corsepius@…>, on Jun 30, 2008 at 1:36:20 PM

Add magic to update cpuopt.h.

  • Property mode set to 100644
File size: 1.4 KB
Line 
1# RTEMS_CPUOPT(NAME,CONDITION,VALUE,EXPLANATION)
2
3AC_DEFUN([_RTEMS_CPUOPT_INIT],[
4AC_BEFORE([_RTEMS_CPUOPT])
5cat >>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
17AC_DEFUN([RTEMS_CPUOPT],[
18AC_REQUIRE([_RTEMS_CPUOPT_INIT])
19AC_BEFORE([_RTEMS_CPUOPT_FINI])
20  if $2; then
21cat >>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
30cat >>cpuopts.tmp <<\_ACEOF
31
32/* $4 */
33/* #undef $1 */
34_ACEOF
35  fi
36])
37
38AC_DEFUN([_RTEMS_CPUOPT_FINI],[
39cat >>cpuopts.tmp <<\_ACEOF
40
41#endif /* _RTEMS_SCORE_CPUOPTS_H */
42_ACEOF
43
44AS_MKDIR_P(score/include/rtems/score)
45AS_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])
Note: See TracBrowser for help on using the repository browser.