From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4673 invoked by alias); 13 Nov 2002 18:45:40 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 4654 invoked from network); 13 Nov 2002 18:45:37 -0000 Received: from unknown (HELO mailout6-0.nyroc.rr.com) (24.92.226.125) by sources.redhat.com with SMTP; 13 Nov 2002 18:45:37 -0000 Received: from doctormoo (syr-24-24-16-193.twcny.rr.com [24.24.16.193]) by mailout6-0.nyroc.rr.com (8.11.6/RoadRunner 1.20) with ESMTP id gADIjYk26838; Wed, 13 Nov 2002 13:45:34 -0500 (EST) Received: from neroden by doctormoo with local (Exim 3.36 #1 (Debian)) id 18C2Vw-0004Ud-00; Wed, 13 Nov 2002 13:45:24 -0500 Date: Wed, 13 Nov 2002 10:45:00 -0000 To: gcc-patches@gcc.gnu.org Cc: dj@redhat.com, binutils@sources.redhat.com, gdb-patches@sources.redhat.com Subject: Toplevel patch: Autogenerate Makefile targets 1 (do-*) Message-ID: <20021113184524.GA17271@doctormoo> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i From: Nathanael Nerode X-SW-Source: 2002-11/txt/msg00380.txt.bz2 This is the first of several patches to replace (ab)use of Makefile macros with use of Autogen. This changes the do-* targets. These changes lengthen Makefile.in, but they shorten Makefile.tpl and enable a *lot* of subsequent improvements to the Makefile, including some which I consider necessary before auoconfiscation. Tested on i686-pc-linux-gnu, all works. (Not surprisingly, since it's supposed to do exactly the same thing.) As usual, this goes into gcc 3.4 bib and doesn't hit src until gcc 3.3 branches. * Makefile.def: Add list of recursive targets to autogenerate. * Makefile.tpl: Autogenerate do-* targets. * Makefile.in: Regenerate. Index: Makefile.def =================================================================== RCS file: /cvs/gcc/gcc/Makefile.def,v retrieving revision 1.2.2.4 diff -u -r1.2.2.4 Makefile.def --- Makefile.def 9 Nov 2002 22:10:17 -0000 1.2.2.4 +++ Makefile.def 13 Nov 2002 18:37:57 -0000 @@ -85,3 +85,15 @@ target_modules = { module= boehm-gc; }; target_modules = { module= qthreads; }; target_modules = { module= rda; }; + +// These are (some of) the targets to be done in each subdirectory. +// Not all; these are the ones which don't have special options. +recursive_targets = { target= clean; }; +recursive_targets = { target= distclean; }; +recursive_targets = { target= dvi; }; +recursive_targets = { target= info; }; +recursive_targets = { target= install-info; }; +recursive_targets = { target= installcheck; }; +recursive_targets = { target= mostlyclean; }; +recursive_targets = { target= maintainer-clean; }; +recursive_targets = { target= TAGS; }; Index: Makefile.in =================================================================== RCS file: /cvs/gcc/gcc/Makefile.in,v retrieving revision 1.111.4.8 diff -u -r1.111.4.8 Makefile.in --- Makefile.in 12 Nov 2002 22:09:15 -0000 1.111.4.8 +++ Makefile.in 13 Nov 2002 18:37:59 -0000 @@ -962,19 +962,10 @@ # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once, # because it is so large that it can easily overflow the command line # length limit on some systems. -DO_X = \ - do-clean \ - do-distclean \ - do-dvi \ - do-info \ - do-install-info \ - do-installcheck \ - do-mostlyclean \ - do-maintainer-clean \ - do-TAGS -.PHONY: $(DO_X) -$(DO_X): - @target=`echo $@ | sed -e 's/^do-//'`; \ +# This is being rewritten for cleanliness. + +.PHONY: do-clean +do-clean: r=`${PWD}`; export r; \ s=`cd $(srcdir); ${PWD}`; export s; \ $(SET_LIB_PATH) \ @@ -997,11 +988,11 @@ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ - $${target}); \ + clean); \ then true; else exit 1; fi; \ else true; fi; \ done - @target=`echo $@ | sed -e 's/^do-//'`; \ + # Break into two pieces r=`${PWD}`; export r; \ s=`cd $(srcdir); ${PWD}`; export s; \ $(SET_LIB_PATH) \ @@ -1015,10 +1006,388 @@ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ - $${target}); \ + clean); \ then true; else exit 1; fi; \ else true; fi; \ done + +.PHONY: do-distclean +do-distclean: + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ + $(SET_LIB_PATH) \ + for i in $(SUBDIRS) -dummy-; do \ + if [ -f ./$$i/Makefile ]; then \ + case $$i in \ + gcc) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + ;; \ + *) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + ;; \ + esac ; \ + if (cd ./$$i; \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean); \ + then true; else exit 1; fi; \ + else true; fi; \ + done + # Break into two pieces + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ + $(SET_LIB_PATH) \ + for i in $(TARGET_CONFIGDIRS) -dummy-; do \ + if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + if (cd $(TARGET_SUBDIR)/$$i; \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean); \ + then true; else exit 1; fi; \ + else true; fi; \ + done + +.PHONY: do-dvi +do-dvi: + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ + $(SET_LIB_PATH) \ + for i in $(SUBDIRS) -dummy-; do \ + if [ -f ./$$i/Makefile ]; then \ + case $$i in \ + gcc) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + ;; \ + *) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + ;; \ + esac ; \ + if (cd ./$$i; \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi); \ + then true; else exit 1; fi; \ + else true; fi; \ + done + # Break into two pieces + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ + $(SET_LIB_PATH) \ + for i in $(TARGET_CONFIGDIRS) -dummy-; do \ + if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + if (cd $(TARGET_SUBDIR)/$$i; \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi); \ + then true; else exit 1; fi; \ + else true; fi; \ + done + +.PHONY: do-info +do-info: + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ + $(SET_LIB_PATH) \ + for i in $(SUBDIRS) -dummy-; do \ + if [ -f ./$$i/Makefile ]; then \ + case $$i in \ + gcc) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + ;; \ + *) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + ;; \ + esac ; \ + if (cd ./$$i; \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info); \ + then true; else exit 1; fi; \ + else true; fi; \ + done + # Break into two pieces + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ + $(SET_LIB_PATH) \ + for i in $(TARGET_CONFIGDIRS) -dummy-; do \ + if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + if (cd $(TARGET_SUBDIR)/$$i; \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info); \ + then true; else exit 1; fi; \ + else true; fi; \ + done + +.PHONY: do-install-info +do-install-info: + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ + $(SET_LIB_PATH) \ + for i in $(SUBDIRS) -dummy-; do \ + if [ -f ./$$i/Makefile ]; then \ + case $$i in \ + gcc) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + ;; \ + *) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + ;; \ + esac ; \ + if (cd ./$$i; \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info); \ + then true; else exit 1; fi; \ + else true; fi; \ + done + # Break into two pieces + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ + $(SET_LIB_PATH) \ + for i in $(TARGET_CONFIGDIRS) -dummy-; do \ + if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + if (cd $(TARGET_SUBDIR)/$$i; \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info); \ + then true; else exit 1; fi; \ + else true; fi; \ + done + +.PHONY: do-installcheck +do-installcheck: + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ + $(SET_LIB_PATH) \ + for i in $(SUBDIRS) -dummy-; do \ + if [ -f ./$$i/Makefile ]; then \ + case $$i in \ + gcc) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + ;; \ + *) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + ;; \ + esac ; \ + if (cd ./$$i; \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck); \ + then true; else exit 1; fi; \ + else true; fi; \ + done + # Break into two pieces + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ + $(SET_LIB_PATH) \ + for i in $(TARGET_CONFIGDIRS) -dummy-; do \ + if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + if (cd $(TARGET_SUBDIR)/$$i; \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck); \ + then true; else exit 1; fi; \ + else true; fi; \ + done + +.PHONY: do-mostlyclean +do-mostlyclean: + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ + $(SET_LIB_PATH) \ + for i in $(SUBDIRS) -dummy-; do \ + if [ -f ./$$i/Makefile ]; then \ + case $$i in \ + gcc) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + ;; \ + *) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + ;; \ + esac ; \ + if (cd ./$$i; \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean); \ + then true; else exit 1; fi; \ + else true; fi; \ + done + # Break into two pieces + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ + $(SET_LIB_PATH) \ + for i in $(TARGET_CONFIGDIRS) -dummy-; do \ + if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + if (cd $(TARGET_SUBDIR)/$$i; \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean); \ + then true; else exit 1; fi; \ + else true; fi; \ + done + +.PHONY: do-maintainer-clean +do-maintainer-clean: + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ + $(SET_LIB_PATH) \ + for i in $(SUBDIRS) -dummy-; do \ + if [ -f ./$$i/Makefile ]; then \ + case $$i in \ + gcc) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + ;; \ + *) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + ;; \ + esac ; \ + if (cd ./$$i; \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean); \ + then true; else exit 1; fi; \ + else true; fi; \ + done + # Break into two pieces + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ + $(SET_LIB_PATH) \ + for i in $(TARGET_CONFIGDIRS) -dummy-; do \ + if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + if (cd $(TARGET_SUBDIR)/$$i; \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean); \ + then true; else exit 1; fi; \ + else true; fi; \ + done + +.PHONY: do-TAGS +do-TAGS: + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ + $(SET_LIB_PATH) \ + for i in $(SUBDIRS) -dummy-; do \ + if [ -f ./$$i/Makefile ]; then \ + case $$i in \ + gcc) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + ;; \ + *) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + ;; \ + esac ; \ + if (cd ./$$i; \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS); \ + then true; else exit 1; fi; \ + else true; fi; \ + done + # Break into two pieces + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ + $(SET_LIB_PATH) \ + for i in $(TARGET_CONFIGDIRS) -dummy-; do \ + if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + if (cd $(TARGET_SUBDIR)/$$i; \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS); \ + then true; else exit 1; fi; \ + else true; fi; \ + done + + # Here are the targets which correspond to the do-X targets. Index: Makefile.tpl =================================================================== RCS file: /cvs/gcc/gcc/Makefile.tpl,v retrieving revision 1.5.2.6 diff -u -r1.5.2.6 Makefile.tpl --- Makefile.tpl 12 Nov 2002 22:09:15 -0000 1.5.2.6 +++ Makefile.tpl 13 Nov 2002 18:38:01 -0000 @@ -652,19 +652,10 @@ # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once, # because it is so large that it can easily overflow the command line # length limit on some systems. -DO_X = \ - do-clean \ - do-distclean \ - do-dvi \ - do-info \ - do-install-info \ - do-installcheck \ - do-mostlyclean \ - do-maintainer-clean \ - do-TAGS -.PHONY: $(DO_X) -$(DO_X): - @target=`echo $@ | sed -e 's/^do-//'`; \ +# This is being rewritten for cleanliness. +[+ FOR recursive_targets +] +.PHONY: do-[+target+] +do-[+target+]: r=`${PWD}`; export r; \ s=`cd $(srcdir); ${PWD}`; export s; \ $(SET_LIB_PATH) \ @@ -687,11 +678,11 @@ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ - $${target}); \ + [+target+]); \ then true; else exit 1; fi; \ else true; fi; \ done - @target=`echo $@ | sed -e 's/^do-//'`; \ + # Break into two pieces r=`${PWD}`; export r; \ s=`cd $(srcdir); ${PWD}`; export s; \ $(SET_LIB_PATH) \ @@ -705,10 +696,12 @@ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ - $${target}); \ + [+target+]); \ then true; else exit 1; fi; \ else true; fi; \ done +[+ ENDFOR recursive_targets +] + # Here are the targets which correspond to the do-X targets.