docs: AM_CFLAGS: remove reference to non-existing "more detailed" desc
[automake.git] / lib / am / subdirs.am
blob3fc28884b616146f9930775c24cd0906f7621ce1
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)
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, 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.
35 $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS):
36 ## Using $failcom allows "-k" to keep its natural meaning when running a
37 ## recursive rule.
38         @fail= failcom='exit 1'; \
39         for f in x $$MAKEFLAGS; do \
40           case $$f in \
41             *=* | --[!k]*);; \
42             *k*) failcom='fail=yes';; \
43           esac; \
44         done; \
45         dot_seen=no; \
46         target=`echo $@ | sed s/-recursive//`; \
47 ## For distclean and maintainer-clean we make sure to use the full
48 ## list of subdirectories.  We do this so that 'configure; make
49 ## distclean' really is a no-op, even if SUBDIRS is conditional.
50         case "$@" in \
51           distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
52           *) list='$(SUBDIRS)' ;; \
53         esac; \
54         for subdir in $$list; do \
55           echo "Making $$target in $$subdir"; \
56           if test "$$subdir" = "."; then \
57             dot_seen=yes; \
58             local_target="$$target-am"; \
59           else \
60             local_target="$$target"; \
61           fi; \
62           ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
63           || eval $$failcom; \
64         done; \
65         if test "$$dot_seen" = "no"; then \
66           $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
67         fi; test -z "$$fail"
70 mostlyclean: mostlyclean-recursive
71 clean: clean-recursive
72 distclean: distclean-recursive
73 maintainer-clean: maintainer-clean-recursive