1 # This file is included by all the "stub makefiles" in every directory
2 # in the tree except the root. Its job is to invoke $(MAKE) on the
3 # top-level Makefile, but modifying the target so that it applies to
4 # the current directory only.
7 # make foo.o ==> make -C $(TOP) dir/foo.o
8 # make all ==> make -C $(TOP) all_dir
9 # make clean ==> make -C $(TOP) clean_dir
12 # Important, otherwise we get silly built-in rules:
15 TOPMAKE = $(MAKE) -C $(TOP)
22 $(dir)_dist_NO_BUILD_DEPS=YES \
23 $(dir)_dist-boot_NO_BUILD_DEPS=YES \
24 $(dir)_dist-install_NO_BUILD_DEPS=YES \
25 NO_GENERATED_MAKEFILE_RULES=YES \
26 OMIT_PHASE_0=YES OMIT_PHASE_1=YES
28 ifneq "$(filter fast,$(MAKECMDGOALS))" ""
29 EXTRA_MAKE_OPTS += $(FAST_MAKE_OPTS)
32 EXTRA_MAKE_OPTS += $(FAST_MAKE_OPTS)
36 # We must not execute multiple recursive invocations of make in parallel.
39 STD_TARGETS = all clean distclean maintainer_clean install html ps pdf
40 DIRECTORY_INDEPENDENT_TARGETS = show
42 # The + tells make that we're recursively invoking make, otherwise 'make -j2'
45 +$(TOPMAKE) $@_$(dir) $(EXTRA_MAKE_OPTS)
47 $(DIRECTORY_INDEPENDENT_TARGETS):
48 +$(TOPMAKE) $@ $(EXTRA_MAKE_OPTS)
50 OTHERTARGETS=$(filter-out fast help show $(STD_TARGETS) $(SPEC_TARGETS),$(MAKECMDGOALS))
51 .PHONY: $(OTHERTARGETS)
53 +$(TOPMAKE) $(dir)/$@ $(EXTRA_MAKE_OPTS)
60 @echo "You are in subdirectory \"$(dir)\"."
61 @echo "Useful targets in this directory:"
62 @cat $(TOP)/SUBMAKEHELP