source: rtems/aclocal/target.m4 @ 37b5d78

4.104.114.84.95
Last change on this file since 37b5d78 was 37b5d78, checked in by Joel Sherrill <joel.sherrill@…>, on 09/14/01 at 17:30:22

2001-09-14 Ralf Corsepius <corsepiu@…>

  • aclocal/canonical-target-name.m4: Use AC_CANONICAL_TARGET instead of AC_CANONICAL_SYSTEM.
  • aclocal/config-subdirs.m4: Use AS_MKDIR_P instead of mkinstalldirs and mkdir.
  • aclocal/target.m4: Obsolete RTEMS_OUTPUT_BUILD_SUBDIRS, hack RTEMS_CONFIG_BUILD_SUBDIRS, introduce _RTEMS_OUTPUT_BUILD_SUBDIRS.
  • Property mode set to 100644
File size: 2.7 KB
Line 
1dnl $Id$
2
3## HACK: Work-around to structural issue with RTEMS
4## The macros below violate most autoconf and canonicalization standards
5AC_DEFUN(RTEMS_CONFIG_BUILD_SUBDIRS,
6[AC_REQUIRE([_RTEMS_OUTPUT_BUILD_SUBDIRS])
7RTEMS_BUILD_SUBDIRS="$RTEMS_BUILD_SUBDIRS [$1]"
8])
9
10dnl Derived from automake-1.4's AC_OUTPUT_SUBDIRS
11AC_DEFUN([_RTEMS_OUTPUT_BUILD_SUBDIRS],
12[AC_CONFIG_COMMANDS([bsp-tools],
13[
14# HACK: This is a blantant hack and breaks Canadian crosses
15build_alias="$build_alias"
16host_alias="$build_alias"
17if test "$no_recursion" != yes; then
18  if test x"$build_alias" != x"$host_alias"; then
19    target_subdir="$host_alias"
20  else
21    target_subdir="."
22  fi
23  # Remove --cache-file and --srcdir arguments so they do not pile up.
24  ac_sub_configure_args=
25  rtems_prev=
26  for rtems_arg in $ac_configure_args; do
27    if test -n "$rtems_prev"; then
28      rtems_prev=
29      continue
30    fi
31    case "$rtems_arg" in
32    -cache-file | --cache-file | --cache-fil | --cache-fi \
33    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
34      rtems_prev=cache_file ;;
35    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
36    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
37      ;;
38    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
39      rtems_prev=srcdir ;;
40    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
41      ;;
42    --target*) ;;
43    --build*) ;;
44    --host*) ;;
45    *_alias* ) ;; # HACK: Workaround to autoconf passing *_alias
46    *) ac_sub_configure_args="$ac_sub_configure_args $rtems_arg" ;;
47    esac
48  done
49
50  for rtems_config_dir in $RTEMS_BUILD_SUBDIRS; do
51    # Do not complain, so a configure script can configure whichever
52    # parts of a large source tree are present.
53    if test ! -d $srcdir/$rtems_config_dir; then
54      continue
55    fi
56
57    _RTEMS_PUSH_BUILDDIR([$rtems_config_dir])
58
59    _RTEMS_SUB_SRCDIR([$rtems_config_dir])
60
61    # The recursion is here.
62    if test -n "$ac_sub_configure"; then
63#      ac_sub_cache_file=./config.cache
64      ac_sub_cache_file=/dev/null
65      _RTEMS_GIVEN_INSTALL
66
67      echo "[running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file] --srcdir=$ac_sub_srcdir"
68      # The eval makes quoting arguments work.
69      if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure \
70        $ac_sub_configure_args \
71        --srcdir=$ac_sub_srcdir \
72        --with-target-subdir=$target_subdir \
73        --cache-file=$ac_sub_cache_file
74      then :
75      else
76        AC_MSG_ERROR([$ac_sub_configure failed for $rtems_config_dir])
77      fi
78    fi
79
80    _RTEMS_POP_BUILDDIR
81  done
82fi],
83[
84RTEMS_BUILD_SUBDIRS="$RTEMS_BUILD_SUBDIRS"
85])
86])
87
88## FIXME: This is obsolete. Only kept for backward compatibility
89AU_DEFUN([RTEMS_OUTPUT_BUILD_SUBDIRS],[])
Note: See TracBrowser for help on using the repository browser.