do
if test $targ = all; then
all_targets=true
- assocvecs="$assocvecs $targ_defvec $targ_selvecs"
elif test $targ != plugin; then
. $srcdir/config.bfd
if test $targ = $target; then
defvec=$targ_defvec
+ assocvecs="$targ_defvec $targ_selvecs"
fi
selvecs="$selvecs $targ_defvec $targ_selvecs"
selarchs="$selarchs $targ_archs"
done
selvecs="$f"
-
-# uniq the associated vectors in all the configured targets.
-f=""
-for i in $assocvecs ; do
- case " $f " in
- *" $i "*) ;;
- *) f="$f $i" ;;
- esac
-done
-assocvecs="$f"
-
-
# uniq the architectures in all the configured targets.
f=""
for i in $selarchs ; do
selvecs=
havevecs=-DHAVE_all_vecs
selarchs=
- test -n "$assocvecs" &&
- assocvecs=`echo $assocvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
+ f=
+ for i in $assocvecs ; do
+ case "&${f}," in
+ *"&${i},"*) ;;
+ *) f="${f}&${i}," ;;
+ esac
+ done
+ assocvecs=$f
else # all_targets is true
# Only set these if they will be nonempty, for the clever echo.
havevecs=
do
if test $targ = all; then
all_targets=true
- assocvecs="$assocvecs $targ_defvec $targ_selvecs"
elif test $targ != plugin; then
. $srcdir/config.bfd
if test $targ = $target; then
defvec=$targ_defvec
+ assocvecs="$targ_defvec $targ_selvecs"
fi
selvecs="$selvecs $targ_defvec $targ_selvecs"
selarchs="$selarchs $targ_archs"
done
selvecs="$f"
-
-# uniq the associated vectors in all the configured targets.
-f=""
-for i in $assocvecs ; do
- case " $f " in
- *" $i "*) ;;
- *) f="$f $i" ;;
- esac
-done
-assocvecs="$f"
-
-
# uniq the architectures in all the configured targets.
f=""
for i in $selarchs ; do
selvecs=
havevecs=-DHAVE_all_vecs
selarchs=
- test -n "$assocvecs" &&
- assocvecs=`echo $assocvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
+ f=
+ for i in $assocvecs ; do
+ case "&${f}," in
+ *"&${i},"*) ;;
+ *) f="${f}&${i}," ;;
+ esac
+ done
+ assocvecs=$f
else # all_targets is true
# Only set these if they will be nonempty, for the clever echo.
havevecs=
NULL
};
-/* bfd_associated_vector[] contains the associated target vectors used
- to reduce the ambiguity in bfd_check_format_matches. */
+/* bfd_associated_vector[] contains the main target vectors when
+ configuring with --enable-targets=all, to match those
+ preferentially over others that might match. */
static const bfd_target *const _bfd_associated_vector[] = {
#ifdef ASSOCIATED_VECS
- ASSOCIATED_VECS,
+ ASSOCIATED_VECS
#endif
NULL
};