This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Toplevel patch: Autogenerate Makefile targets 1 (do-*)


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.
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]