OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [aclocal/] [target.m4] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1026 ivang
dnl target.m4,v 1.9 2002/01/06 20:12:13 joel Exp
2
 
3
## HACK: Work-around to structural issue with RTEMS
4
## The macros below violate most autoconf and canonicalization standards
5
AC_DEFUN(RTEMS_CONFIG_BUILD_SUBDIRS,
6
[AC_REQUIRE([_RTEMS_OUTPUT_BUILD_SUBDIRS])
7
RTEMS_BUILD_SUBDIRS="$RTEMS_BUILD_SUBDIRS [$1]"
8
])
9
 
10
dnl Derived from automake-1.4's AC_OUTPUT_SUBDIRS
11
AC_DEFUN([_RTEMS_OUTPUT_BUILD_SUBDIRS],
12
[AC_CONFIG_COMMANDS([bsp-tools],
13
[
14
# HACK: This is a blantant hack and breaks Canadian crosses
15
build_alias="$build_alias"
16
host_alias="$build_alias"
17
if 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 $rtems_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
82
fi],
83
[
84
RTEMS_BUILD_SUBDIRS="$RTEMS_BUILD_SUBDIRS"
85
rtems_configure_args="$ac_configure_args"
86
])
87
])
88
 
89
## FIXME: This is obsolete. Only kept for backward compatibility
90
AU_DEFUN([RTEMS_OUTPUT_BUILD_SUBDIRS],[])
91
 
92
 
93
dnl
94
dnl Misc utility macros for subdir handling to work around missing abilities
95
dnl in autoconf, automake and structural issues with RTEMS
96
dnl
97
dnl Contains parts derived from autoconf-2.13 AC_OUTPUT_SUBDIRS and Cygnus'
98
dnl configure.in.
99
dnl
100
 
101
dnl
102
dnl _RTEMS_PUSH_BUILDDIR(SUBDIR)
103
dnl
104
AC_DEFUN(_RTEMS_PUSH_BUILDDIR,
105
[
106
# _RTEMS_PUSH_BUILDDIR
107
    echo configuring in $1
108
    case "$srcdir" in
109
    .) ;;
110
    *) AS_MKDIR_P([$1])
111
      ;;
112
    esac
113
 
114
    ac_popdir=`pwd`
115
    cd $1
116
])
117
 
118
dnl
119
dnl _RTEMS_POP_BUILDDIR
120
dnl
121
AC_DEFUN(_RTEMS_POP_BUILDDIR,
122
[
123
  cd $ac_popdir
124
])
125
 
126
dnl
127
dnl _RTEMS_GIVEN_INSTALL
128
dnl
129
AC_DEFUN(_RTEMS_GIVEN_INSTALL,
130
[
131
ifdef([AC_PROVIDE_AC_PROG_INSTALL],[
132
  case "$ac_given_INSTALL" in
133
  [[\\/]]* | ?:[[\\/]]*) INSTALL="$ac_given_INSTALL" ;;
134
  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
135
  esac
136
])dnl
137
])
138
 
139
dnl
140
dnl _RTEMS_SUB_SRCDIR(AC_CONFIG_DIR[,TARGET_SUBDIR])
141
dnl
142
AC_DEFUN(_RTEMS_SUB_SRCDIR,[
143
# _RTEMS_SUB_SRCDIR
144
    _RTEMS_ADJUST_SRCDIR(ac_sub_srcdir,$1,$2)
145
 
146
    # Check for configure
147
    if test -f $ac_sub_srcdir/configure; then
148
      ac_sub_configure=$ac_sub_srcdir/configure
149
    else
150
      AC_MSG_WARN([no configuration information is in $1])
151
      ac_sub_configure=
152
    fi
153
])

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.