diff options
author | Ian Lance Taylor <ian@airs.com> | 1995-09-04 18:31:40 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1995-09-04 18:31:40 +0000 |
commit | 2b79a10471177329465a195f19440a8c8dbbb8ff (patch) | |
tree | be5b500c7f75d94761b3764228638a1dda51eda7 /bfd/configure.in | |
parent | c62d12746b2f1bfcf38fa7de6ded9287e751e927 (diff) | |
download | gdb-2b79a10471177329465a195f19440a8c8dbbb8ff.zip gdb-2b79a10471177329465a195f19440a8c8dbbb8ff.tar.gz gdb-2b79a10471177329465a195f19440a8c8dbbb8ff.tar.bz2 |
* config.bfd: Rewrite to incorporate the contents of the Makefile
fragments by setting shell variables, rather than merely returning
the name of a Makefile fragment.
* configure.in: Use shell variables set by config.bfd rather than
looking at the target Makefile fragment files. Don't substitute
target_makefile_frag. Do substitute TDEFINES.
* configure: Rebuild.
* Makefile.in (@target_makefile_frag@): Remove.
(ALL_CFLAGS): Change $(TDEFINES) to @TDEFINES@.
* config/*.mt: Remove.
Diffstat (limited to 'bfd/configure.in')
-rw-r--r-- | bfd/configure.in | 85 |
1 files changed, 31 insertions, 54 deletions
diff --git a/bfd/configure.in b/bfd/configure.in index 83acbea..42af6b9 100644 --- a/bfd/configure.in +++ b/bfd/configure.in @@ -49,6 +49,11 @@ else host_makefile_frag=/dev/null fi AC_SUBST_FILE(host_makefile_frag) +frags= +if test $host_makefile_frag != /dev/null ; then + frags="$host_makefile_frag" +fi +AC_SUBST(frags) # If we are configured native, pick a core file support file. COREFILE= @@ -139,35 +144,25 @@ if test -n "$enable_targets" ; then fi all_targets=false - +defvec= +selvecs= +selarchs= +TDEFINES= for targ in $target $canon_targets do - bfd_target=`${config_shell} $srcdir/config.bfd $targ` - - if test "x$bfd_target" = "xall" ; then + if test "x$targ" = "xall"; then all_targets=true else - if test ! -f ${srcdir}/config/${bfd_target}.mt ; then - AC_MSG_ERROR(*** No file ${srcdir}/config/${bfd_target}.mt. -*** BFD does not support target ${bfd_target}. -*** Look in bfd/config.bfd for supported targets.) - exit 1 - fi - - if test "x$targ" = "x$target" ; then - target_makefile_frag=${srcdir}/config/${bfd_target}.mt - else - target_extra_frags="$target_extra_frags ${srcdir}/config/${bfd_target}.mt" + . $srcdir/config.bfd + if test "x$targ" = "x$target"; then + defvec=$targ_defvec fi + selvecs="$selvecs $targ_defvec $targ_selvecs" + selarchs="$selarchs $targ_archs" + TDEFINES="$TDEFINES $targ_cflags" fi done - -frags=$target_makefile_frag -if test $host_makefile_frag != /dev/null ; then - frags="$frags $host_makefile_frag" -fi -AC_SUBST_FILE(target_makefile_frag) -AC_SUBST(frags) +AC_SUBST(TDEFINES) # This processing still needs to be done if we're to decide properly whether # 64-bit support needs to be compiled in. Currently, it will be included if @@ -176,50 +171,32 @@ AC_SUBST(frags) # no "--with-64-bit-bfd" option is given, even if "--with-targets=all" is # used. -changequote(,)dnl -# The default vector in the primary target. -DEFAULT_VECTOR=`sed -n ' -s/DEFAULT_VECTOR[ ]*=[ ]*\([^ ]*\)/\1/p -' $target_makefile_frag` - -allfrags="$target_makefile_frag $target_extra_frags" - -# The default and selected vectors in all the configured targets. -SELECT_VECS=`sed -n ' -s/DEFAULT_VECTOR[ ]*=[ ]*\([^ ]*\)/\1/p -s/SELECT_VECS[ ]*=[ ]*\([^ ]*\)/\1/p -' $allfrags` -# uniq the list. +# uniq the default and selected vectors in all the configured targets. f="" -for i in $SELECT_VECS ; do +for i in $selvecs ; do case " $f " in *" $i "*) ;; *) f="$f $i" ;; esac done -SELECT_VECS="$f" +selvecs="$f" -# The architectures in all the configured targets. -SELECT_ARCHITECTURES=`sed -n ' -s/SELECT_ARCHITECTURES[ ]*=[ ]*//p -' $allfrags` -# uniq the list. +# uniq the architectures in all the configured targets. f="" -for i in $SELECT_ARCHITECTURES ; do +for i in $selarchs ; do case " $f " in *" $i "*) ;; *) f="$f $i" ;; esac done -SELECT_ARCHITECTURES="$f" -changequote([,])dnl +selarchs="$f" # Target backend .o files. tb= elf="elf.o elflink.o" -for vec in $SELECT_VECS +for vec in $selvecs do case "$vec" in # This list is alphabetized to make it easy to compare @@ -329,7 +306,7 @@ do done # Target architecture .o files. -ta=`echo $SELECT_ARCHITECTURES | sed -e s/bfd_/cpu-/g -e s/_arch/.o/g` +ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.o/g` # Weed out duplicate .o files. f="" @@ -356,12 +333,14 @@ bfd_machines="$ta" if test x${all_targets} = xtrue ; then bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)' bfd_machines="${bfd_machines}"' $(ALL_MACHINES)' + selvecs= + selarchs= else # all_targets is true # Only set these if they will be nonempty, for the clever echo. - test -n "$SELECT_VECS" && - selvecs=`echo $SELECT_VECS | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'` - test -n "SELECT_ARCHITECTURES" && - selarchs=`echo $SELECT_ARCHITECTURES | sed -e 's/ \(.\)/,\1/g'` + test -n "$selvecs" && + selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'` + test -n "$selarchs" && + selarchs=`echo $selarchs | sed -e 's/ \(.\)/,\1/g'` fi # all_targets is true case ${host64}-${target64}-${want64} in @@ -380,8 +359,6 @@ AC_SUBST(all_backends) AC_SUBST(bfd_backends) AC_SUBST(bfd_machines) -test -n "$DEFAULT_VECTOR" && defvec="$DEFAULT_VECTOR" - tdefaults="" test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}" test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'" |