1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003,
3 ## 2004, 2008, 2009 Free Software Foundation, Inc.
5 ## This program is free software; you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation; either version 2, or (at your option)
10 ## This program is distributed in the hope that it will be useful,
11 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ## GNU General Public License for more details.
15 ## You should have received a copy of the GNU General Public License
16 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
18 RECURSIVE_TARGETS += all-recursive check-recursive installcheck-recursive
19 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
20 distclean-recursive maintainer-clean-recursive
21 ## All documented targets which invoke `make' recursively, or depend
22 ## on targets that do so.
23 AM_RECURSIVE_TARGETS += $(RECURSIVE_TARGETS:-recursive=) \
24 $(RECURSIVE_CLEAN_TARGETS:-recursive=)
26 .PHONY: $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS)
27 .MAKE: $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS)
29 # This directory's subdirectories are mostly independent; you can cd
30 # into them and run `make' without going through this Makefile.
31 # To change the values of `make' variables: instead of editing Makefiles,
32 # (1) if the variable is set in `config.status', edit `config.status'
33 # (which will cause the Makefiles to be regenerated when you run `make');
34 # (2) otherwise, pass the desired values on the `make' command line.
37 ## Using $failcom allows "-k" to keep its natural meaning when running a
39 @fail= failcom='exit 1'; \
40 for f in x $$MAKEFLAGS; do \
43 *k*) failcom='fail=yes';; \
47 target=`echo $@ | sed s/-recursive//`; \
48 list='$(SUBDIRS)'; for subdir in $$list; do \
49 echo "Making $$target in $$subdir"; \
50 if test "$$subdir" = "."; then \
52 local_target="$$target-am"; \
54 local_target="$$target"; \
56 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
59 if test "$$dot_seen" = "no"; then \
60 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
64 mostlyclean: mostlyclean-recursive
65 clean: clean-recursive
66 distclean: distclean-recursive
67 maintainer-clean: maintainer-clean-recursive
69 ## We run all `clean' targets in reverse order. Why? It's an attempt
70 ## to alleviate a problem that can happen when dependencies are
71 ## enabled. In this case, the .P file in one directory can depend on
72 ## some automatically generated header in an earlier directory. Since
73 ## the dependencies are required before any target is examined, make
75 $(RECURSIVE_CLEAN_TARGETS):
76 ## Using $failcom allows "-k" to keep its natural meaning when running a
78 @fail= failcom='exit 1'; \
79 for f in x $$MAKEFLAGS; do \
82 *k*) failcom='fail=yes';; \
86 ## For distclean and maintainer-clean we make sure to use the full
87 ## list of subdirectories. We do this so that `configure; make
88 ## distclean' really is a no-op, even if SUBDIRS is conditional. For
89 ## other clean targets this doesn't matter.
91 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
92 *) list='$(SUBDIRS)' ;; \
94 rev=''; for subdir in $$list; do \
95 if test "$$subdir" = "."; then :; else \
96 rev="$$subdir $$rev"; \
99 ## Always do `.' last.
101 target=`echo $@ | sed s/-recursive//`; \
102 for subdir in $$rev; do \
103 echo "Making $$target in $$subdir"; \
104 if test "$$subdir" = "."; then \
105 local_target="$$target-am"; \
107 local_target="$$target"; \
109 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
111 done && test -z "$$fail"