source: rtems/c/src/aclocal/bspopts.m4 @ ae55da72

4.115
Last change on this file since ae55da72 was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 2.3 KB
Line 
1dnl
2
3dnl RTEMS_BSPOPTS_* - some autoconf voodoo to handle default values and
4dnl help-strings for per-BSP-environment variables.
5
6dnl To be used in bsp-configure scripts
7
8
9dnl Example:
10dnl
11dnl RTEMS_BSPOPTS_SET([foo],[bar],[0])
12dnl RTEMS_BSPOPTS_SET([foo],[baz*],[hello])
13dnl RTEMS_BSPOPTS_SET([foo],[*],[])
14dnl RTEMS_BSPOPTS_HELP([foo],[env. variable foo])
15dnl -> Add "0" as default value of variable "foo" for BSP "bar"
16dnl -> Add "hello" as default value of variable "foo" for all BSPs starting
17dnl with "baz" in their name.
18dnl -> Undefine foo as default clause for all BSP's.
19dnl
20dnl All this basically expands to a /bin/shell "case"-statement with
21dnl accompanying autoconf magic to propagate VAR to bspopts.h.
22
23
24dnl RTEMS_BSPOPTS_HELP(VAR,HELP-STRING)
25dnl Set up printing the HELP-STRING for bspopts.h's variable VAR and add
26dnl appropriate /bin/sh-magic to "configure" to have VAR set up.
27
28AC_DEFUN([RTEMS_BSPOPTS_HELP],[
29RTEMS_ARG_VAR([$1],[$2])
30m4_ifdef([_$1],[
31case "${RTEMS_BSP}" in
32_$1[]dnl
33esac],[])
34if test -n "[$]{$1}"; then[]dnl
35AC_DEFINE_UNQUOTED([$1],
36  [[$]$1],
37  [$2])dnl
38fi
39])
40
41dnl RTEMS_BSPOPTS_SET(VAR,BSP,DEFAULT)
42dnl Set up a value DEFAULT to be used as default value for variable VAR for
43dnl BSP in RTEMS_BSPOPTS_HELP.
44
45dnl MUST be used in front of exactly _one_ corresponding RTEMS_BSPOPTS_HELP
46
47AC_DEFUN([RTEMS_BSPOPTS_SET],[dnl
48m4_append([_$1],
49[$2 )
50  $1=[$]{$1-$3} ;;
51])
52])
53
54
55dnl RTEMS_ARG_VAR(VAR,HELP-STRING)
56dnl An internal macros to have RTEMS_BSPOPTS_HELP's help string pretty
57dnl printed with configure --help.
58dnl Stripped down version of autoconf-2.52's AC_ARG_VAR.
59
60AC_DEFUN([RTEMS_ARG_VAR],
61[
62m4_expand_once([m4_divert_once([HELP_VAR],
63[AS_HELP_STRING([$1],[$2],              )])],
64      [$0($1)])dnl
65])
66
67AC_DEFUN(
68[RTEMS_BSPOPTS_SET_DATA_CACHE_ENABLED],
69[RTEMS_BSPOPTS_SET([BSP_DATA_CACHE_ENABLED],[$1],[$2])])
70
71AC_DEFUN(
72[RTEMS_BSPOPTS_HELP_DATA_CACHE_ENABLED],
73[RTEMS_BSPOPTS_HELP([BSP_DATA_CACHE_ENABLED],
74[enables the data cache, if defined to a value other than zero])])
75
76AC_DEFUN(
77[RTEMS_BSPOPTS_SET_INSTRUCTION_CACHE_ENABLED],
78[RTEMS_BSPOPTS_SET([BSP_INSTRUCTION_CACHE_ENABLED],[$1],[$2])])
79
80AC_DEFUN(
81[RTEMS_BSPOPTS_HELP_INSTRUCTION_CACHE_ENABLED],
82[RTEMS_BSPOPTS_HELP([BSP_INSTRUCTION_CACHE_ENABLED],
83[enables the instruction cache, if defined to a value other than zero])])
Note: See TracBrowser for help on using the repository browser.