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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [aclocal/] [target.m4] - Blame information for rev 461

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
dnl $Id: target.m4,v 1.2 2001-09-27 11:59:11 chris Exp $
2
 
3
AC_DEFUN(RTEMS_CONFIG_SUBDIRS,
4
[
5
define([RTEMS_TGT_SUBDIRS],
6
ifdef([RTEMS_TGT_SUBDIRS], [RTEMS_TGT_SUBDIRS ],)[$1])dnl
7
target_subdirs="RTEMS_TGT_SUBDIRS"
8
AC_SUBST(target_subdirs)
9
])
10
 
11
dnl This is a subroutine of AC_OUTPUT.
12
dnl It is called after running config.status.
13
dnl AC_OUTPUT_SUBDIRS(DIRECTORY...)
14
AC_DEFUN(RTEMS_OUTPUT_SUBDIRS,
15
[
16
if 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
 
69
changequote(, )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'`
72
changequote([, ])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
106
ifdef([AC_PROVIDE_AC_PROG_INSTALL],
107
      [  case "$ac_given_INSTALL" in
108
changequote(, )dnl
109
        [/$]*) INSTALL="$ac_given_INSTALL" ;;
110
changequote([, ])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
128
fi
129
])

powered by: WebSVN 2.1.0

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