diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2007-11-17 01:02:01 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2007-11-17 01:02:01 +0000 |
commit | d0c678e6de1230671406e8b9fde61d1d471769c7 (patch) | |
tree | 7e8fa076c83308f54423dfdda19c4ed32134419c /gdb/configure.ac | |
parent | 6ca0852e7a0010edcf20292ab79c8c42c74b5567 (diff) | |
download | gdb-d0c678e6de1230671406e8b9fde61d1d471769c7.zip gdb-d0c678e6de1230671406e8b9fde61d1d471769c7.tar.gz gdb-d0c678e6de1230671406e8b9fde61d1d471769c7.tar.bz2 |
* configure.ac (--enable-targets): New configure option.
Collect gdb_target_obs of multiple targets into TARGET_OBS.
Call configure.tgt multiple times, using $targ as operand.
* configure.tgt: Operate on $targ instead of $target.
* configure: Regenerate.
* Makefile.in (ALL_TARGET_OBS): Define.
* NEWS: Mention --enable-targets option.
Diffstat (limited to 'gdb/configure.ac')
-rw-r--r-- | gdb/configure.ac | 57 |
1 files changed, 53 insertions, 4 deletions
diff --git a/gdb/configure.ac b/gdb/configure.ac index 30df02e..0f1a3d8 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -91,6 +91,16 @@ esac AC_CONFIG_SUBDIRS(doc testsuite) +# Check whether to support alternative target configurations +AC_ARG_ENABLE(targets, +[ --enable-targets alternative target configurations], +[case "${enableval}" in + yes | "") AC_ERROR(enable-targets option must specify target names or 'all') + ;; + no) enable_targets= ;; + *) enable_targets=$enableval ;; +esac]) + # Provide defaults for some variables set by the per-host and per-target # configuration. gdb_host_obs=posix-hdep.o @@ -103,7 +113,49 @@ fi . $srcdir/configure.host -. $srcdir/configure.tgt +# Accumulate some settings from configure.tgt over all enabled targets + +TARGET_OBS= +all_targets= + +for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` +do + if test "$targ_alias" = "all"; then + all_targets=true + else + # Canonicalize the secondary target names. + result=`$ac_config_sub $targ_alias 2>/dev/null` + if test -n "$result"; then + targ=$result + else + targ=$targ_alias + fi + + . ${srcdir}/configure.tgt + + # Target-specific object files + for i in ${gdb_target_obs}; do + case " $TARGET_OBS " in + *" ${i} "*) ;; + *) + TARGET_OBS="$TARGET_OBS ${i}" + ;; + esac + done + fi +done + +if test x${all_targets} = xtrue; then + TARGET_OBS='$(ALL_TARGET_OBS)' +fi + +AC_SUBST(TARGET_OBS) + +# For other settings, only the main target counts. +gdb_sim= +gdb_osabi= +build_gdbserver= +targ=$target; . ${srcdir}/configure.tgt # Fetch the default architecture and default target vector from BFD. targ=$target; . $srcdir/../bfd/config.bfd @@ -121,9 +173,6 @@ if test "x$targ_defvec" != x; then [Define to BFD's default target vector. ]) fi -TARGET_OBS="${gdb_target_obs}" -AC_SUBST(TARGET_OBS) - AC_ARG_PROGRAM # The CLI cannot be disabled yet, but may be in the future. |