aclocal fix
[automake.git] / subdirs.am
blob46d62a72a7581fcf21f063dc979af0ea7830d8fe
1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
4 ## This program is free software; you can redistribute it and/or modify
5 ## it under the terms of the GNU General Public License as published by
6 ## the Free Software Foundation; either version 2, or (at your option)
7 ## any later version.
9 ## This program is distributed in the hope that it will be useful,
10 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 ## GNU General Public License for more details.
14 ## You should have received a copy of the GNU General Public License
15 ## along with this program; if not, write to the Free Software
16 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
17 ## 02111-1307, USA.
18 # This directory's subdirectories are mostly independent; you can cd
19 # into them and run `make' without going through this Makefile.
20 # To change the values of `make' variables: instead of editing Makefiles,
21 # (1) if the variable is set in `config.status', edit `config.status'
22 #     (which will cause the Makefiles to be regenerated when you run `make');
23 # (2) otherwise, pass the desired values on the `make' command line.
25 @SET_MAKE@
27 all-recursive install-data-recursive install-exec-recursive \
28 installdirs-recursive install-recursive uninstall-recursive @INSTALLINFO@ \
29 check-recursive installcheck-recursive info-recursive dvi-recursive:
30         @set fnord $(MAKEFLAGS); amf=$$2; \
31         for subdir in $(SUBDIRS); do \
32           target=`echo $@ | sed s/-recursive//`; \
33           echo "Making $$target in $$subdir"; \
34           (cd $$subdir && $(MAKE) $$target) \
35 ## This trick allows "-k" to keep its natural meaning when running a
36 ## recursive rule.
37            || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
38         done && test -z "$$fail"
40 ## We run all `clean' targets in reverse order.  Why?  It's an attempt
41 ## to alleviate a problem that can happen when dependencies are
42 ## enabled.  In this case, the .P file in one directory can depend on
43 ## some automatically generated header in an earlier directory.  Since
44 ## the dependencies are required before any target is examined, make
45 ## bombs.
46 mostlyclean-recursive clean-recursive distclean-recursive \
47 maintainer-clean-recursive:
48         @set fnord $(MAKEFLAGS); amf=$$2; \
49         rev=''; for subdir in $(SUBDIRS); do rev="$$subdir $$rev"; done; \
50         for subdir in $$rev; do \
51           target=`echo $@ | sed s/-recursive//`; \
52           echo "Making $$target in $$subdir"; \
53           (cd $$subdir && $(MAKE) $$target) \
54 ## This trick allows "-k" to keep its natural meaning when running a
55 ## recursive rule.
56            || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
57         done && test -z "$$fail"