]> sourceware.org Git - automake.git/commitdiff
run clean subdirs in reverse order
authorTom Tromey <tromey@redhat.com>
Wed, 30 Apr 1997 01:30:35 +0000 (01:30 +0000)
committerTom Tromey <tromey@redhat.com>
Wed, 30 Apr 1997 01:30:35 +0000 (01:30 +0000)
ChangeLog
Makefile.in
THANKS
lib/am/subdirs.am
subdirs.am

index b910c1f56087e9648332760c904c3e138ec1ed89..570a7adb17bc7a8135e3d463c741ac873d20b80c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 Tue Apr 29 19:11:45 1997  Tom Tromey  <tromey@cygnus.com>
 
+       * subdirs.am: Clean targets now run in reverse order.  From Kevin
+       Dalley.
+
        * automake.in (handle_texinfo): Put `aminfo', not `info' on
        @clean.
 
index 889568d0dc037fc5d85359c281b76dba1051ab0e..3aa3347adf974b24053ea769c393d0f201f4cff7 100644 (file)
@@ -313,10 +313,18 @@ uninstall-pkgdataDATA:
 
 all-recursive install-data-recursive install-exec-recursive \
 installdirs-recursive install-recursive uninstall-recursive  \
-check-recursive installcheck-recursive info-recursive dvi-recursive \
+check-recursive installcheck-recursive info-recursive dvi-recursive:
+       @for subdir in $(SUBDIRS); do \
+         target=`echo $@ | sed s/-recursive//`; \
+         echo "Making $$target in $$subdir"; \
+         (cd $$subdir && $(MAKE) $$target) \
+          || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
+       done && test -z "$$fail"
+
 mostlyclean-recursive clean-recursive distclean-recursive \
 maintainer-clean-recursive:
-       @for subdir in $(SUBDIRS); do \
+       @rev=''; for subdir in $(SUBDIRS); do rev="$$rev $$subdir"; done; \
+       for subdir in $$rev; do \
          target=`echo $@ | sed s/-recursive//`; \
          echo "Making $$target in $$subdir"; \
          (cd $$subdir && $(MAKE) $$target) \
diff --git a/THANKS b/THANKS
index c60cef88a115a09254ba1a30e35d25593b203f69..344469f43dc3c94a8114feaba96bb797d4fd985c 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -29,6 +29,7 @@ Joerg-Martin Schwarz <jms@jms.prima.ruhr.de>
 Josh MacDonald <jmacd@cs.berkeley.edu>
 Joshua Cowan <jcowan@jcowan.reslife.okstate.edu>
 Karl Berry <kb@cs.umb.edu>
+Kevin Dalley <kevin@aimnet.com>
 Marius Vollmer <mvo@zagadka.ping.de>
 Mark Eichin <eichin@cygnus.com>
 Mark Galassi <rosalia@nis.lanl.gov>
index 5b7571de323340f5ab31a7fad7e360c936d5c6ba..0622e8dda33e15c45ec869f4909a947f35130e27 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+## Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
 
 all-recursive install-data-recursive install-exec-recursive \
 installdirs-recursive install-recursive uninstall-recursive @INSTALLINFO@ \
-check-recursive installcheck-recursive info-recursive dvi-recursive \
+check-recursive installcheck-recursive info-recursive dvi-recursive:
+       @for subdir in $(SUBDIRS); do \
+         target=`echo $@ | sed s/-recursive//`; \
+         echo "Making $$target in $$subdir"; \
+         (cd $$subdir && $(MAKE) $$target) \
+## This trick allows "-k" to keep its natural meaning when running a
+## recursive rule.
+          || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
+       done && test -z "$$fail"
+
+## We run all `clean' targets in reverse order.  Why?  It's an attempt
+## to alleviate a problem that can happen when dependencies are
+## enabled.  In this case, the .P file in one directory can depend on
+## some automatically generated header in an earlier directory.  Since
+## the dependencies are required before any target is examined, make
+## bombs.
 mostlyclean-recursive clean-recursive distclean-recursive \
 maintainer-clean-recursive:
-       @for subdir in $(SUBDIRS); do \
+       @rev=''; for subdir in $(SUBDIRS); do rev="$$rev $$subdir"; done; \
+       for subdir in $$rev; do \
          target=`echo $@ | sed s/-recursive//`; \
          echo "Making $$target in $$subdir"; \
          (cd $$subdir && $(MAKE) $$target) \
index 5b7571de323340f5ab31a7fad7e360c936d5c6ba..0622e8dda33e15c45ec869f4909a947f35130e27 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+## Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
 
 all-recursive install-data-recursive install-exec-recursive \
 installdirs-recursive install-recursive uninstall-recursive @INSTALLINFO@ \
-check-recursive installcheck-recursive info-recursive dvi-recursive \
+check-recursive installcheck-recursive info-recursive dvi-recursive:
+       @for subdir in $(SUBDIRS); do \
+         target=`echo $@ | sed s/-recursive//`; \
+         echo "Making $$target in $$subdir"; \
+         (cd $$subdir && $(MAKE) $$target) \
+## This trick allows "-k" to keep its natural meaning when running a
+## recursive rule.
+          || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
+       done && test -z "$$fail"
+
+## We run all `clean' targets in reverse order.  Why?  It's an attempt
+## to alleviate a problem that can happen when dependencies are
+## enabled.  In this case, the .P file in one directory can depend on
+## some automatically generated header in an earlier directory.  Since
+## the dependencies are required before any target is examined, make
+## bombs.
 mostlyclean-recursive clean-recursive distclean-recursive \
 maintainer-clean-recursive:
-       @for subdir in $(SUBDIRS); do \
+       @rev=''; for subdir in $(SUBDIRS); do rev="$$rev $$subdir"; done; \
+       for subdir in $$rev; do \
          target=`echo $@ | sed s/-recursive//`; \
          echo "Making $$target in $$subdir"; \
          (cd $$subdir && $(MAKE) $$target) \
This page took 0.04408 seconds and 5 git commands to generate.