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.
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) \
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>
## 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) \
## 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) \