source: rtems/c/src/acinclude.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.8 KB
Line 
1# Some hacks for handling special config subdirectories
2#
3# Note: Consider this file a temporary band-aid until a better, more general
4# subdirectory handling solution is introduced to RTEMS.
5
6AC_DEFUN([_RTEMS_CONFIG_SUBDIR],
7[
8if test "$no_recursion" != yes; then
9  ac_sub_sourcedir=$2
10  ac_sub_builddir=$1
11
12  for ac_subdir in : $ac_sub_sourcedir; do test "x$ac_subdir" = x: && continue
13
14    # Do not complain, so a configure script can configure whichever
15    # parts of a large source tree are present.
16    test -d $srcdir/$ac_subdir || continue
17
18    AC_MSG_NOTICE([configuring in $ac_subdir])
19    case $srcdir in
20    .) ;;
21    *) AS_MKDIR_P(["./$ac_sub_builddir"])
22       if test -d ./$ac_sub_builddir; then :;
23       else
24         AC_MSG_ERROR([cannot create `pwd`/$ac_sub_builddir])
25       fi
26       ;;
27    esac
28
29    ac_popdir=`pwd`
30    cd $ac_sub_builddir
31
32    # A "../" for each directory in /$ac_subdir.
33    ac_dots=`echo $ac_sub_builddir |
34             sed 's,^\./,,;s,[[^/]]$,&/,;s,[[^/]]*/,../,g'`
35
36    case $srcdir in
37    .) # No --srcdir option.  We are building in place.
38      ac_sub_srcdir=$srcdir${ac_subdir} ;;
39    [[\\/]]* | ?:[[\\/]]* ) # Absolute path.
40      ac_sub_srcdir=$srcdir/$ac_subdir ;;
41    *) # Relative path.
42      ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
43    esac
44
45    # Check for guested configure; otherwise get Cygnus style configure.
46    if test -f $ac_sub_srcdir/configure.gnu; then
47      ac_sub_configure="$SHELL '$ac_sub_srcdir/configure.gnu'"
48    elif test -f $ac_sub_srcdir/configure; then
49      ac_sub_configure="$SHELL '$ac_sub_srcdir/configure'"
50    elif test -f $ac_sub_srcdir/configure.in; then
51      ac_sub_configure=$ac_configure
52    else
53      AC_MSG_WARN([no configuration information is in $ac_subdir])
54      ac_sub_configure=
55    fi
56
57    # The recursion is here.
58    if test -n "$ac_sub_configure"; then
59      # Make the cache file name correct relative to the subdirectory.
60      case $cache_file in
61      [[\\/]]* | ?:[[\\/]]* ) ac_sub_cache_file=$cache_file ;;
62      *) # Relative path.
63        ac_sub_cache_file=$ac_dots$cache_file ;;
64      esac
65
66      AC_MSG_NOTICE([running $ac_sub_configure $ac_sub_configure_args $3 --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir])
67      # The eval makes quoting arguments work.
68      eval $ac_sub_configure $ac_sub_configure_args $3 \
69           --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir ||
70        AC_MSG_ERROR([$ac_sub_configure failed for $ac_subdir])
71    fi
72
73    cd "$ac_popdir"
74  done
75fi
76])
77
78## RTEMS_BSP_CONFIG_SUBDIR(builddir,srcdir,configargs,condition)
79AC_DEFUN([RTEMS_BSP_CONFIG_SUBDIR],[
80m4_expand_once([RTEMS_CONFIGURE_ARGS_QUOTE([ac_sub_configure_args])])
81AS_IF([$4],[BSP_SUBDIRS="$BSP_SUBDIRS $1"])
82AC_CONFIG_COMMANDS_POST([
83AS_IF([$4],[_RTEMS_CONFIG_SUBDIR([$1],[$2],[$3])])])
84])
Note: See TracBrowser for help on using the repository browser.