Changeset 3174a7ed in rtems for configure.in


Ignore:
Timestamp:
Oct 31, 2000, 9:20:00 PM (19 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
6fd829a
Parents:
846027b
Message:

2000-10-30 Ralf Corsepius <corsepiu@…>

  • configure.in: New, Cygnus/GNU style configuration.
  • Makefile.am: Add macros/, reflect new configure.in, ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/macros
  • automake/compile.am: BSP_SPECS, remove RTEMS_CANONICALIZATION.
  • automake/lib.am: Remove RTEMS_CANONICALIZATION.
  • macros/tool-prefix.m4: Remove.
  • macros/target.m4: Remove RTEMS_CONFIG_SUBDIRS, RTEMS_OUTPUT_SUBDIRS.
  • macros/enable-rtemsbsp.m4: Add RTEMS_CONFIG_PER_BSP, add setting RTEMS_ROOT.
  • macros/i386-gas-code16.m4: Define NEW_GAS only for 16bit mode-
  • macros/multilib.m4: Various minor fixes.
  • macros/project-root.m4: Remove setting PROJECT_TOPdir, PROJECT_ROOT, RTEMS_ROOT.
  • macros/rtems-top.m4: Remove RTEMS_CANONICALIZATION, TARGET_SUBDIRS; Add with_target_subdirs, PROJECT_TOPdir, PROJECT_ROOT.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure.in

    r846027b r3174a7ed  
    1515fi
    1616
    17 RTEMS_CANONICAL_TARGET_CPU
    18 AM_INIT_AUTOMAKE(rtems,$RTEMS_VERSION,no)
     17AC_CANONICAL_SYSTEM
     18AM_INIT_AUTOMAKE(cross,0,no)
    1919AM_MAINTAINER_MODE
    20 
    21 dnl RTEMS_ENABLE_BARE
    22 dnl RTEMS_ENABLE_RTEMSBSP(rtems_bsp)
    2320
    2421dnl These option are only in here to let --help report all supported
     
    3330RTEMS_ENABLE_GCC28
    3431RTEMS_ENABLE_LIBCDIR
    35 RTEMS_ENABLE_TESTS
     32RTEMS_ENABLE_TESTS 
    3633RTEMS_ENABLE_RTEMS_DEBUG
    3734
    38 RTEMS_CHECK_CPU
    39 RTEMS_CANONICAL_HOST
    40 
    41 AC_CONFIG_SUBDIRS(tools/build)
    42 AC_CONFIG_SUBDIRS(tools/update)
    43 AC_CONFIG_SUBDIRS(tools/cpu)
    44 
    45 # List all subdirectories to be compiled for the target here
    46 RTEMS_CONFIG_SUBDIRS(c)
    47 
    48 if test "$target_alias" != "$host_alias"; then
     35# these tools are built for the build environment
     36#
     37build_tools="tools/build tools/update tools/cpu"
     38
     39# these libraries are used for the host environment
     40#
     41host_libs=""
     42
     43# these tools are built for the host environment
     44#
     45host_tools=""
     46
     47# these libraries are built for the target environment, and are built after
     48# the host libraries and the host tools (which may be a cross compiler)
     49#
     50target_libs="c"
     51
     52# these tools are built using the target libs, and are intended to run only
     53# in the target environment
     54#
     55target_tools=""
     56
     57## All tools belong in one of the four categories, and are assigned above
     58## We assign ${configdirs} this way to remove all embedded newlines.  This
     59## is important because configure will choke if they ever get through.
     60## ${configdirs} is directories we build using the host tools.
     61## ${target_configdirs} is directories we build using the target tools.
     62#
     63configdirs="${host_libs} ${host_tools}"
     64AC_SUBST(configdirs)
     65
     66target_configdirs="${target_libs} ${target_tools}"
     67AC_SUBST(target_configdirs)
     68
     69# Record target_configdirs and the configure arguments in Makefile.
     70targargs=`echo "${ac_configure_args}" | \
     71        sed -e 's/--no[^        ]*//' \
     72            -e 's/--cache[a-z-]*=[^     ]*//' \
     73            -e 's/--ho[a-z-]*=[^        ]*//' \
     74            -e 's/--bu[a-z-]*=[^        ]*//' \
     75            -e 's/--ta[a-z-]*=[^        ]*//'`;
     76
     77targargs="--host=${target_alias} --build=${build_alias} ${targargs}"
     78AC_SUBST(targargs)
     79
     80target_subdir=${target_alias}
     81
    4982changequote(,)dnl
    50 TARGET_SUBDIRS=`echo "$target_subdirs" | \
    51  sed -e "s%\([a-zA-Z0-9][a-zA-Z0-9]*\)%${target_alias}/\1%g"`
     83if test $target_alias = $host_alias;
     84then
     85  HOST_SUBDIRS="$configdirs $target_configdirs"
     86  TARGET_SUBDIRS=""
     87else
     88  HOST_SUBDIRS="$configdirs"
     89  TARGET_SUBDIRS=`echo "$target_configdirs" | \
     90    sed -e "s%\([^ ]\+\)%$target_alias/\1%g"`
     91fi
    5292changequote([,])dnl
     93
     94if test $host_alias = $build_alias;
     95then
     96  HOST_SUBDIRS="$build_tools $HOST_SUBDIRS"
    5397else
    54 TARGET_SUBDIRS="$target_subdirs"
     98  build_configdirs="$build_tools"
    5599fi
     100
     101AC_CONFIG_SUBDIRS($HOST_SUBDIRS)
    56102AC_SUBST(TARGET_SUBDIRS)
    57 
    58 # Explicitly list all Makefiles here
    59 AC_OUTPUT( 
     103AC_SUBST(HOST_SUBDIRS)
     104
     105AC_OUTPUT(
    60106Makefile
    61107tools/Makefile
     
    63109make/custom/Makefile
    64110make/Templates/Makefile
    65 make/compilers/Makefile
     111make/compilers/Makefile 
    66112doc/Makefile)
    67113
    68 RTEMS_OUTPUT_SUBDIRS(RTEMS_TGT_SUBDIRS)
     114if test "$no_recursion" != yes; then
     115
     116 if test $target_alias != $host_alias; then
     117  # Remove --srcdir arguments so they do not pile up.
     118  ac_sub_configure_args=
     119  ac_prev=
     120  for ac_arg in $targargs; do
     121    if test -n "$ac_prev"; then
     122      ac_prev=
     123      continue
     124    fi
     125    case "$ac_arg" in
     126    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
     127      ac_prev=srcdir ;;
     128    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
     129      ;;
     130    *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
     131    esac
     132  done
     133
     134  test -d $target_subdir || mkdir $target_subdir
     135  for ac_config_dir in $target_configdirs; do
     136    # Do not complain, so a configure script can configure whichever
     137    # parts of a large source tree are present.
     138    if test ! -d $srcdir/$ac_config_dir; then
     139      continue
     140    fi
     141
     142    echo configuring in $target_subdir/$ac_config_dir
     143
     144    case "$srcdir" in
     145    .) ;;
     146    *)
     147      if test -d $target_subdir/$ac_config_dir || mkdir $target_subdir/$ac_config_dir; then :;
     148      else
     149        AC_MSG_ERROR(can not create `pwd`/$target_subdir/$ac_config_dir)
     150      fi
     151      ;;
     152    esac
     153
     154    ac_popdir=`pwd`
     155    cd $target_subdir/$ac_config_dir
     156
     157changequote(, )dnl
     158      # A "../" for each directory in /$ac_config_dir.
     159      ac_dots=`echo $target_subdir/$ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
     160changequote([, ])dnl
     161
     162    case "$srcdir" in
     163    .) # No --srcdir option.  We are building in place.
     164      ac_sub_srcdir=$srcdir ;;
     165    /*) # Absolute path.
     166      ac_sub_srcdir=$srcdir/$ac_config_dir ;;
     167    *) # Relative path.
     168      ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
     169    esac
     170
     171    # Check for configure
     172    if test -f $ac_sub_srcdir/configure; then
     173      ac_sub_configure=$ac_sub_srcdir/configure
     174    else
     175      AC_MSG_WARN(no configuration information is in $ac_config_dir)
     176      ac_sub_configure=
     177    fi
     178
     179    # The recursion is here.
     180    if test -n "$ac_sub_configure"; then
     181
     182      # Make the cache file name correct relative to the subdirectory.
     183      ac_sub_cache_file=$cache_file
     184ifdef([AC_PROVIDE_AC_PROG_INSTALL],
     185      [  case "$ac_given_INSTALL" in
     186changequote(, )dnl
     187        [/$]*) INSTALL="$ac_given_INSTALL" ;;
     188changequote([, ])dnl
     189        *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
     190        esac
     191])dnl
     192
     193      echo "[running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file] --srcdir=$ac_sub_srcdir"
     194      # The eval makes quoting arguments work.
     195      if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure \
     196        $ac_sub_configure_args --srcdir=$ac_sub_srcdir \
     197        --with-target-subdir=$target_subdir \
     198        --cache-file=$ac_sub_cache_file \
     199        --libdir='${exec_prefix}'/$target_alias/lib
     200      then :
     201      else
     202        AC_MSG_ERROR($ac_sub_configure failed for $ac_config_dir)
     203      fi
     204    fi
     205
     206    cd $ac_popdir
     207  done
     208 fi
     209
     210 if test $build_alias != $host_alias; then
     211  # Remove --srcdir arguments so they do not pile up.
     212  ac_sub_configure_args=
     213  ac_prev=
     214  for ac_arg in $targargs; do
     215    if test -n "$ac_prev"; then
     216      ac_prev=
     217      continue
     218    fi
     219    case "$ac_arg" in
     220    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
     221      ac_prev=srcdir ;;
     222    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
     223      ;;
     224    *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
     225    esac
     226  done
     227
     228#  test -d $target_subdir || mkdir $target_subdir
     229  for ac_config_dir in $build_configdirs; do
     230    # Do not complain, so a configure script can configure whichever
     231    # parts of a large source tree are present.
     232    if test ! -d $srcdir/$ac_config_dir; then
     233      continue
     234    fi
     235
     236    echo configuring in $ac_config_dir
     237
     238    case "$srcdir" in
     239    .) ;;
     240    *)
     241      if test -d $ac_config_dir || mkdir $ac_config_dir; then :;
     242      else
     243        AC_MSG_ERROR(can not create `pwd`/$ac_config_dir)
     244      fi
     245      ;;
     246    esac
     247
     248    ac_popdir=`pwd`
     249    cd $ac_config_dir
     250
     251changequote(, )dnl
     252      # A "../" for each directory in /$ac_config_dir.
     253      ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
     254changequote([, ])dnl
     255
     256    case "$srcdir" in
     257    .) # No --srcdir option.  We are building in place.
     258      ac_sub_srcdir=$srcdir ;;
     259    /*) # Absolute path.
     260      ac_sub_srcdir=$srcdir/$ac_config_dir ;;
     261    *) # Relative path.
     262      ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
     263    esac
     264
     265    # Check for guested configure; otherwise get Cygnus style configure.
     266    if test -f $ac_sub_srcdir/configure; then
     267      ac_sub_configure=$ac_sub_srcdir/configure
     268    else
     269      AC_MSG_WARN(no configuration information is in $ac_config_dir)
     270      ac_sub_configure=
     271    fi
     272
     273    # The recursion is here.
     274    if test -n "$ac_sub_configure"; then
     275
     276      # Make the cache file name correct relative to the subdirectory.
     277      ac_sub_cache_file=$cache_file
     278ifdef([AC_PROVIDE_AC_PROG_INSTALL],
     279      [  case "$ac_given_INSTALL" in
     280changequote(, )dnl
     281        [/$]*) INSTALL="$ac_given_INSTALL" ;;
     282changequote([, ])dnl
     283        *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
     284        esac
     285])dnl
     286
     287      echo "[running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file] --srcdir=$ac_sub_srcdir"
     288      # The eval makes quoting arguments work.
     289      if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure \
     290        $ac_sub_configure_args --srcdir=$ac_sub_srcdir \
     291        --cache-file=$ac_sub_cache_file \
     292        --build=$build_alias --host=$build_alias
     293      then :
     294      else
     295        AC_MSG_ERROR($ac_sub_configure failed for $ac_config_dir)
     296      fi
     297    fi
     298
     299    cd $ac_popdir
     300  done
     301 fi
     302fi
Note: See TracChangeset for help on using the changeset viewer.