* m4/mktime.m4 (bigtime_test, main): Move alarm from
[automake.git] / subdirs.am
blobab96f5b6539d5c0f9d8526a472fcc4960bf96dac
1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999 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         dot_seen=no; \
32         target=`echo $@ | sed s/-recursive//`; \
33         list='$(SUBDIRS)'; for subdir in $$list; do \
34           echo "Making $$target in $$subdir"; \
35           if test "$$subdir" = "."; then \
36             dot_seen=yes; \
37             local_target="$$target-am"; \
38           else \
39             local_target="$$target"; \
40           fi; \
41           (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
42 ## This trick allows "-k" to keep its natural meaning when running a
43 ## recursive rule.
44            || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
45         done; \
46         if test "$$dot_seen" = "no"; then \
47           $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
48         fi; test -z "$$fail"
50 ## We run all `clean' targets in reverse order.  Why?  It's an attempt
51 ## to alleviate a problem that can happen when dependencies are
52 ## enabled.  In this case, the .P file in one directory can depend on
53 ## some automatically generated header in an earlier directory.  Since
54 ## the dependencies are required before any target is examined, make
55 ## bombs.
56 mostlyclean-recursive clean-recursive distclean-recursive \
57 maintainer-clean-recursive:
58         @set fnord $(MAKEFLAGS); amf=$$2; \
59         dot_seen=no; \
60         rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
61           rev="$$subdir $$rev"; \
62 ## FreeBSD make/sh will exit if the test fails and we use "&&";
63 ## hence the `if'.
64           if test "$$subdir" = "."; then dot_seen=yes; else :; fi; \
65         done; \
66 ## If we haven't seen `.', then add it at the beginning.
67         test "$$dot_seen" = "no" && rev=". $$rev"; \
68         target=`echo $@ | sed s/-recursive//`; \
69         for subdir in $$rev; do \
70           echo "Making $$target in $$subdir"; \
71           if test "$$subdir" = "."; then \
72             local_target="$$target-am"; \
73           else \
74             local_target="$$target"; \
75           fi; \
76           (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
77 ## This trick allows "-k" to keep its natural meaning when running a
78 ## recursive rule.
79            || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
80         done && test -z "$$fail"