disable all docs in the "quick" and "devel" builds
[ghc-hetmet.git] / mk / sub-makefile.mk
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.
5 #
6 # eg.
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
10 #
11
12 # Important, otherwise we get silly built-in rules:
13 .SUFFIXES:
14
15 TOPMAKE = $(MAKE) -C $(TOP)
16
17 default :
18         +$(TOPMAKE) all_$(dir)
19
20 # We must not execute multiple recursive invocations of make in parallel.
21 .NOTPARALLEL:
22
23 # all comes first, we want it to be the default target
24 STD_TARGETS = all clean distclean maintainer_clean install html ps pdf
25
26 # The + tells make that we're recursively invoking make, otherwise 'make -j2'
27 # goes wrong.
28 $(STD_TARGETS): 
29         +$(TOPMAKE) $@_$(dir)
30
31 OTHERTARGETS=$(filter-out $(STD_TARGETS) $(SPEC_TARGETS),$(MAKECMDGOALS))
32 .PHONY: $(OTHERTARGETS)
33 $(OTHERTARGETS):
34         +$(TOPMAKE) $(dir)/$@