source: rtems/aclocal/target.m4 @ c34eb10

Last change on this file since c34eb10 was c34eb10, checked in by Joel Sherrill <joel.sherrill@…>, on 04/03/00 at 20:01:31

Patch rtems-rc-4.5.0-7-cvs.diff from Ralf Corsepius <corsepiu@…>.
The patch contains:

  • Many small cleanups wrt. make VARIANT=[DEBUG|PROFILE] support
  • several modifications to make/custom/*.cfg
  • Merger with the mvme2307.cfg you had posted two weeks ago (Please check it, I did not check it against to version you posted today).
  • Added a check to the toplevel configure.in to refuse building inside of the source tree.
  • Property mode set to 100644
File size: 3.8 KB
Line 
1dnl $Id$
2
3AC_DEFUN(RTEMS_CONFIG_SUBDIRS,
4[
5define([RTEMS_TGT_SUBDIRS],
6ifdef([RTEMS_TGT_SUBDIRS], [RTEMS_TGT_SUBDIRS ],)[$1])dnl
7target_subdirs="RTEMS_TGT_SUBDIRS"
8AC_SUBST(target_subdirs)
9])
10
11dnl This is a subroutine of AC_OUTPUT.
12dnl It is called after running config.status.
13dnl AC_OUTPUT_SUBDIRS(DIRECTORY...)
14AC_DEFUN(RTEMS_OUTPUT_SUBDIRS,
15[
16if test "$no_recursion" != yes; then
17  if test $target_alias != $host_alias; then
18    target_subdir="$target_alias"
19  else
20    target_subdir="."
21  fi
22  # Remove --cache-file and --srcdir arguments so they do not pile up.
23  ac_sub_configure_args=
24  ac_prev=
25  for ac_arg in $ac_configure_args; do
26    if test -n "$ac_prev"; then
27      ac_prev=
28      continue
29    fi
30    case "$ac_arg" in
31    -cache-file | --cache-file | --cache-fil | --cache-fi \
32    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
33      ac_prev=cache_file ;;
34    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
35    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
36      ;;
37    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
38      ac_prev=srcdir ;;
39    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
40      ;;
41    *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
42    esac
43  done
44
45  test -d $target_subdir || mkdir $target_subdir
46  for ac_config_dir in $1; do
47
48    # Do not complain, so a configure script can configure whichever
49    # parts of a large source tree are present.
50    if test ! -d $srcdir/$ac_config_dir; then
51      continue
52    fi
53
54    echo configuring in $target_subdir/$ac_config_dir
55
56    case "$srcdir" in
57##    .) ;;
58    *)
59      if test -d $target_subdir/$ac_config_dir || mkdir $target_subdir/$ac_config_dir; then :;
60      else
61        AC_MSG_ERROR(can not create `pwd`/$target_subdir/$ac_config_dir)
62      fi
63      ;;
64    esac
65
66    ac_popdir=`pwd`
67    cd $target_subdir/$ac_config_dir
68
69changequote(, )dnl
70      # A "../" for each directory in /$ac_config_dir.
71      ac_dots=`echo $target_subdir/$ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
72changequote([, ])dnl
73
74    case "$srcdir" in
75##    .) # No --srcdir option.  We are building in place.
76##      ac_sub_srcdir=$srcdir ;;
77    /*) # Absolute path.
78      ac_sub_srcdir=$srcdir/$ac_config_dir ;;
79    *) # Relative path.
80      ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
81    esac
82
83    # Check for guested configure; otherwise get Cygnus style configure.
84    if test -f $ac_sub_srcdir/configure; then
85      ac_sub_configure=$ac_sub_srcdir/configure
86    elif test -f $ac_sub_srcdir/configure.in; then
87      ac_sub_configure=$ac_configure
88    else
89      AC_MSG_WARN(no configuration information is in $ac_config_dir)
90      ac_sub_configure=
91    fi
92
93    # The recursion is here.
94    if test -n "$ac_sub_configure"; then
95
96      # Make the cache file name correct relative to the subdirectory.
97      if test "$target_alias" != "$host_alias"; then
98      ac_sub_cache_file=$cache_file
99      else
100      case "$cache_file" in
101      /*) ac_sub_cache_file=$cache_file ;;
102      *) # Relative path.
103        ac_sub_cache_file="$ac_dots$cache_file" ;;
104      esac
105      fi
106ifdef([AC_PROVIDE_AC_PROG_INSTALL],
107      [  case "$ac_given_INSTALL" in
108changequote(, )dnl
109        [/$]*) INSTALL="$ac_given_INSTALL" ;;
110changequote([, ])dnl
111        *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
112        esac
113])dnl
114
115      echo "[running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file] --srcdir=$ac_sub_srcdir"
116      # The eval makes quoting arguments work.
117      if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure \
118        $ac_sub_configure_args --srcdir=$ac_sub_srcdir \
119        --with-target-subdir=$target_subdir --cache-file=$ac_sub_cache_file
120      then :
121      else
122        AC_MSG_ERROR($ac_sub_configure failed for $ac_config_dir)
123      fi
124    fi
125
126    cd $ac_popdir
127  done
128fi
129])
Note: See TracBrowser for help on using the repository browser.