summaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>1999-10-28 08:26:42 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>1999-10-28 08:26:42 +0000
commit4bc57096762a349650849e70d168e7ff9dee6566 (patch)
tree23bda6952471d5a1bb0e03317d58f1c15a7121b6 /libiberty
parent33782ec76d96577b1e7ceb9ce78abef1efd15f7e (diff)
downloadgcc-4bc57096762a349650849e70d168e7ff9dee6566.tar.gz
* Makefile.in (SUBDIRS): New macro.
(mostlyclean, clean, distclean, maintainer-clean): Adjust to avoid multiple subdirectory cleaning. (*-subdir): Use SUBDIRS. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30229 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog7
-rw-r--r--libiberty/Makefile.in18
2 files changed, 21 insertions, 4 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 58dca5328c1..0d286158d2e 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,10 @@
+1999-10-28 Nathan Sidwell <nathan@acm.org>
+
+ * Makefile.in (SUBDIRS): New macro.
+ (mostlyclean, clean, distclean, maintainer-clean): Adjust to
+ avoid multiple subdirectory cleaning.
+ (*-subdir): Use SUBDIRS.
+
1999-10-25 Jim Kingdon <http://developer.redhat.com/>
* cplus-dem.c: Move declarations of standard_symbol_characters and
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
index a42ea625ce5..f5a18336268 100644
--- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in
@@ -92,6 +92,9 @@ FLAGS_TO_PASS = \
"libsubdir=$(libsubdir)" \
"tooldir=$(tooldir)"
+# Subdirectories to recurse into. We need to override this during cleaning
+SUBDIRS = testsuite
+
all: stamp-picdir $(TARGETLIB) needed-list required-list all-subdir
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all
@@ -204,19 +207,24 @@ ls:
# Need to deal with profiled libraries, too.
+# Cleaning has to be done carefully to ensure that we don't clean our SUBDIRS
+# multiple times, hence our explicit recursion with an empty SUBDIRS.
mostlyclean: mostlyclean-subdir
rm -rf *.o pic core errs \#* *.E a.out
rm -f needed.awk needed2.awk errors dummy needed-list config.h stamp-*
rm -f $(CONFIG_H) $(NEEDED_LIST) stamp-picdir
@$(MULTICLEAN) multi-clean DO=mostlyclean
-clean: mostlyclean clean-subdir
+clean: clean-subdir
+ $(MAKE) SUBDIRS="" mostlyclean
rm -f *.a required-list tmpmulti.out
@$(MULTICLEAN) multi-clean DO=clean
-distclean: clean distclean-subdir
+distclean: distclean-subdir
+ $(MAKE) SUBDIRS="" clean
@$(MULTICLEAN) multi-clean DO=distclean
rm -f *~ Makefile config.status xhost-mkfrag TAGS multilib.out
rm -f config.log
-maintainer-clean realclean: distclean maintainer-clean-subdir
+maintainer-clean realclean: maintainer-clean-subdir
+ $(MAKE) SUBDIRS="" distclean
force:
@@ -236,7 +244,9 @@ install-info-subdir clean-info-subdir dvi-subdir install-subdir \
etags-subdir mostlyclean-subdir clean-subdir distclean-subdir \
maintainer-clean-subdir:
@target=`echo $@ | sed -e 's/-subdir//'`; \
- cd testsuite && $(MAKE) $$target
+ for dir in . $(SUBDIRS) ; do \
+ test $$dir = . || (cd $$dir && $(MAKE) $$target) || exit 1; \
+ done
$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) $(ALLOCA): stamp-picdir