1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright (C) 1994-2012 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)
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, see <http://www.gnu.org/licenses/>.
17 RECURSIVE_TARGETS += all-recursive check-recursive installcheck-recursive
18 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
19 distclean-recursive maintainer-clean-recursive
20 ## All documented targets which invoke `make' recursively, or depend
21 ## on targets that do so.
22 AM_RECURSIVE_TARGETS += $(RECURSIVE_TARGETS:-recursive=) \
23 $(RECURSIVE_CLEAN_TARGETS:-recursive=)
25 .PHONY: $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS)
26 .MAKE: $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS)
28 # This directory's subdirectories are mostly independent; you can cd
29 # into them and run `make' without going through this Makefile.
30 # To change the values of `make' variables: instead of editing Makefiles,
31 # (1) if the variable is set in `config.status', edit `config.status'
32 # (which will cause the Makefiles to be regenerated when you run `make');
33 # (2) otherwise, pass the desired values on the `make' command line.
36 ## Using $failcom allows "-k" to keep its natural meaning when running a
38 @fail= failcom='exit 1'; \
39 for f in x $$MAKEFLAGS; do \
42 *k*) failcom='fail=yes';; \
46 target=`echo $@ | sed s/-recursive//`; \
47 list='$(SUBDIRS)'; for subdir in $$list; do \
48 echo "Making $$target in $$subdir"; \
49 if test "$$subdir" = "."; then \
51 local_target="$$target-am"; \
53 local_target="$$target"; \
55 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
58 if test "$$dot_seen" = "no"; then \
59 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
63 mostlyclean: mostlyclean-recursive
64 clean: clean-recursive
65 distclean: distclean-recursive
66 maintainer-clean: maintainer-clean-recursive
68 ## We run all `clean' targets in reverse order. Why? It's an attempt
69 ## to alleviate a problem that can happen when dependencies are
70 ## enabled. In this case, the .P file in one directory can depend on
71 ## some automatically generated header in an earlier directory. Since
72 ## the dependencies are required before any target is examined, make
74 $(RECURSIVE_CLEAN_TARGETS):
75 ## Using $failcom allows "-k" to keep its natural meaning when running a
77 @fail= failcom='exit 1'; \
78 for f in x $$MAKEFLAGS; do \
81 *k*) failcom='fail=yes';; \
85 ## For distclean and maintainer-clean we make sure to use the full
86 ## list of subdirectories. We do this so that `configure; make
87 ## distclean' really is a no-op, even if SUBDIRS is conditional. For
88 ## other clean targets this doesn't matter.
90 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
91 *) list='$(SUBDIRS)' ;; \
93 rev=''; for subdir in $$list; do \
94 if test "$$subdir" = "."; then :; else \
95 rev="$$subdir $$rev"; \
98 ## Always do `.' last.
100 target=`echo $@ | sed s/-recursive//`; \
101 for subdir in $$rev; do \
102 echo "Making $$target in $$subdir"; \
103 if test "$$subdir" = "."; then \
104 local_target="$$target-am"; \
106 local_target="$$target"; \
108 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
110 done && test -z "$$fail"