rather than in a shell variable and using AC_SUBST.
* Makefile.am (DISTCLEANFILES): Remove ldscripts. Add tdirs.
(distclean-local): New target.
* configure, Makefile.in: Rebuild.
LDDISTSTUFF = ldgram.c ldgram.h ldlex.c
diststuff: $(LDDISTSTUFF) info
-DISTCLEANFILES = ldscripts
+DISTCLEANFILES = tdirs
+distclean-local:
+ rm -rf ldscripts
# Targets to rebuild dependencies in this Makefile.
# Have to get rid of .dep1 here so that "$?" later includes all of $(CFILES).
NM = @NM@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
-TDIRS = @TDIRS@
VERSION = @VERSION@
AUTOMAKE_OPTIONS = cygnus dejagnu
# target is run by the taz target in ../Makefile.in.
LDDISTSTUFF = ldgram.c ldgram.h ldlex.c
-DISTCLEANFILES = ldscripts
+DISTCLEANFILES = tdirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = config.h
distclean: distclean-hdr distclean-noinstPROGRAMS distclean-compile \
distclean-libtool distclean-aminfo distclean-tags \
- distclean-generic clean
+ distclean-generic clean distclean-local
-rm -f config.status
-rm -f libtool
$(INSTALL_DATA) $$f $(scriptdir)/$$f ; \
done
diststuff: $(LDDISTSTUFF) info
+distclean-local:
+ rm -rf ldscripts
# Targets to rebuild dependencies in this Makefile.
# Have to get rid of .dep1 here so that "$?" later includes all of $(CFILES).
all_targets=
EMUL=
all_emuls=
-TDIRS=
+
+rm -f tdirs
for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
do
all_emuls="$all_emuls e${i}.o"
eval result=\$tdir_$i
test -z "$result" && result=$targ_alias
- TDIRS="$TDIRS\\
-tdir_$i=$result"
+ echo tdir_$i=$result >> tdirs
;;
esac
done
+TDIRS=tdirs
+
if test x${all_targets} = xtrue; then
if test x${want64} = xtrue; then
s%@HOSTING_LIBS@%$HOSTING_LIBS%g
s%@NATIVE_LIB_DIRS@%$NATIVE_LIB_DIRS%g
s%@EMUL@%$EMUL%g
-s%@TDIRS@%$TDIRS%g
+/@TDIRS@/r $TDIRS
+s%@TDIRS@%%g
s%@EMULATION_OFILES@%$EMULATION_OFILES%g
CEOF
all_targets=
EMUL=
all_emuls=
-TDIRS=
+
+dnl We need to get an arbitrary number of tdir definitions into
+dnl Makefile. We can't do it using AC_SUBST, because autoconf does
+dnl not permit literal newlines in an AC_SUBST variables. So we use a
+dnl file.
+rm -f tdirs
for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
do
all_emuls="$all_emuls e${i}.o"
eval result=\$tdir_$i
test -z "$result" && result=$targ_alias
- TDIRS="$TDIRS\\
-tdir_$i=$result"
+ echo tdir_$i=$result >> tdirs
;;
esac
done
done
AC_SUBST(EMUL)
-AC_SUBST(TDIRS)
+
+TDIRS=tdirs
+AC_SUBST_FILE(TDIRS)
dnl FIXME: We will build a 64 bit BFD for a 64 bit host or a 64 bit
dnl target, and in those cases we should also build the 64 bit