From: Ian Lance Taylor Date: Fri, 3 Apr 1998 18:30:15 +0000 (+0000) Subject: * configure.in: Put the tdirs in a file and use AC_SUBST_FILE, X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=03abc2bd652b49325b5a66563c7a5dbdf158fd39;p=binutils-gdb.git * configure.in: Put the tdirs in a file and use AC_SUBST_FILE, 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. --- diff --git a/ld/Makefile.am b/ld/Makefile.am index 3a4d6a536c1..41377f505b5 100644 --- a/ld/Makefile.am +++ b/ld/Makefile.am @@ -708,7 +708,9 @@ install-data-local: 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). diff --git a/ld/Makefile.in b/ld/Makefile.in index 719b22bd572..e000ac06dc8 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -73,7 +73,6 @@ NATIVE_LIB_DIRS = @NATIVE_LIB_DIRS@ NM = @NM@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ -TDIRS = @TDIRS@ VERSION = @VERSION@ AUTOMAKE_OPTIONS = cygnus dejagnu @@ -313,7 +312,7 @@ CLEANFILES = dep.sed .dep .dep1 bfdsumm.texi # 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 @@ -704,7 +703,7 @@ clean: clean-hdr clean-noinstPROGRAMS clean-compile clean-libtool \ 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 @@ -1201,6 +1200,8 @@ install-data-local: $(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). diff --git a/ld/configure b/ld/configure index 0281b17556f..529249d6a75 100755 --- a/ld/configure +++ b/ld/configure @@ -2298,7 +2298,8 @@ fi all_targets= EMUL= all_emuls= -TDIRS= + +rm -f tdirs for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` do @@ -2326,8 +2327,7 @@ 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 @@ -2336,6 +2336,8 @@ done +TDIRS=tdirs + if test x${all_targets} = xtrue; then if test x${want64} = xtrue; then @@ -2524,7 +2526,8 @@ s%@HOSTING_CRT0@%$HOSTING_CRT0%g 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 diff --git a/ld/configure.in b/ld/configure.in index 8fb33a6fd6a..8a27a724bc2 100644 --- a/ld/configure.in +++ b/ld/configure.in @@ -70,7 +70,12 @@ BFD_NEED_DECLARATION(getenv) 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 @@ -98,8 +103,7 @@ 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 @@ -107,7 +111,9 @@ tdir_$i=$result" 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