X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=mk%2Fsub-makefile.mk;h=caeefa6c4acc5f2a80ba05c9c695b44b9759dc44;hb=2fda738875042f7d2339f18b6c8b43ef7901bc94;hp=031d62a1b702ac7121b273cca678da01e4dd4400;hpb=c40387edc47e28241cc4f52b0fdf49e60bc234c6;p=ghc-hetmet.git diff --git a/mk/sub-makefile.mk b/mk/sub-makefile.mk index 031d62a..caeefa6 100644 --- a/mk/sub-makefile.mk +++ b/mk/sub-makefile.mk @@ -16,6 +16,22 @@ TOPMAKE = $(MAKE) -C $(TOP) default: all +fast: all + +FAST_MAKE_OPTS =\ + $(dir)_dist_NO_BUILD_DEPS=YES \ + $(dir)_dist-boot_NO_BUILD_DEPS=YES \ + $(dir)_dist-install_NO_BUILD_DEPS=YES \ + OMIT_PHASE_1=YES OMIT_PHASE_2=YES OMIT_PHASE_3=YES + +ifneq "$(filter fast,$(MAKECMDGOALS))" "" +EXTRA_MAKE_OPTS += $(FAST_MAKE_OPTS) +else +ifeq "$(FAST)" "YES" +EXTRA_MAKE_OPTS += $(FAST_MAKE_OPTS) +endif +endif + # We must not execute multiple recursive invocations of make in parallel. .NOTPARALLEL: @@ -24,9 +40,18 @@ STD_TARGETS = all clean distclean maintainer_clean install html ps pdf # The + tells make that we're recursively invoking make, otherwise 'make -j2' # goes wrong. $(STD_TARGETS): - +$(TOPMAKE) $@_$(dir) + +$(TOPMAKE) $@_$(dir) $(EXTRA_MAKE_OPTS) -OTHERTARGETS=$(filter-out $(STD_TARGETS) $(SPEC_TARGETS),$(MAKECMDGOALS)) +OTHERTARGETS=$(filter-out fast help $(STD_TARGETS) $(SPEC_TARGETS),$(MAKECMDGOALS)) .PHONY: $(OTHERTARGETS) $(OTHERTARGETS): - +$(TOPMAKE) $(dir)/$@ + +$(TOPMAKE) $(dir)/$@ $(EXTRA_MAKE_OPTS) + +.PHONY: help +help : sub-help + +.PHONY: sub-help +sub-help : + @echo "You are in subdirectory \"$(dir)\"." + @echo "Useful targets in this directory:" + @cat $(TOP)/SUBMAKEHELP