Commit f684f630 authored by Simon Marlow's avatar Simon Marlow
Browse files

Add support for 'make help' in subdirectories

Including help for directory-specific targets, such as 'make 1' in ghc
parent 2dfd2ac7
...@@ -26,3 +26,12 @@ include $(TOP)/mk/sub-makefile.mk ...@@ -26,3 +26,12 @@ include $(TOP)/mk/sub-makefile.mk
3: 3:
+$(TOPMAKE) stage=3 all_ghc_stage3 compiler_stage3_NO_BUILD_DEPS=YES OMIT_PHASE_1=YES OMIT_PHASE_2=YES OMIT_PHASE_3=YES +$(TOPMAKE) stage=3 all_ghc_stage3 compiler_stage3_NO_BUILD_DEPS=YES OMIT_PHASE_1=YES OMIT_PHASE_2=YES OMIT_PHASE_3=YES
.PHONY: extra-help
help : extra-help
extra-help :
@echo " make 1"
@echo " make 2"
@echo " make 3"
@echo
@echo " Build the stage 1, 2 or 3 GHC respectively, omitting dependencies"
@echo " and initial phases for speed."
...@@ -26,3 +26,12 @@ include $(TOP)/mk/sub-makefile.mk ...@@ -26,3 +26,12 @@ include $(TOP)/mk/sub-makefile.mk
3: 3:
+$(TOPMAKE) stage=3 all_ghc_stage3 compiler_stage3_NO_BUILD_DEPS=YES +$(TOPMAKE) stage=3 all_ghc_stage3 compiler_stage3_NO_BUILD_DEPS=YES
.PHONY: extra-help
help : extra-help
extra-help :
@echo " make 1"
@echo " make 2"
@echo " make 3"
@echo
@echo " Build the stage 1, 2 or 3 GHC respectively, omitting dependencies"
@echo " and initial phases for speed."
...@@ -5,3 +5,11 @@ include $(TOP)/mk/sub-makefile.mk ...@@ -5,3 +5,11 @@ include $(TOP)/mk/sub-makefile.mk
.PHONY: 1 .PHONY: 1
1 : 1 :
+$(TOPMAKE) stage1_libs +$(TOPMAKE) stage1_libs
.PHONY: extra-help
help : extra-help
extra-help :
@echo " make 1"
@echo
@echo " Build all libraries that are built by the stage1 GHC"
@echo
...@@ -30,7 +30,16 @@ STD_TARGETS = all clean distclean maintainer_clean install html ps pdf ...@@ -30,7 +30,16 @@ STD_TARGETS = all clean distclean maintainer_clean install html ps pdf
$(STD_TARGETS): $(STD_TARGETS):
+$(TOPMAKE) $@_$(dir) +$(TOPMAKE) $@_$(dir)
OTHERTARGETS=$(filter-out fast $(STD_TARGETS) $(SPEC_TARGETS),$(MAKECMDGOALS)) OTHERTARGETS=$(filter-out fast help $(STD_TARGETS) $(SPEC_TARGETS),$(MAKECMDGOALS))
.PHONY: $(OTHERTARGETS) .PHONY: $(OTHERTARGETS)
$(OTHERTARGETS): $(OTHERTARGETS):
+$(TOPMAKE) $(dir)/$@ +$(TOPMAKE) $(dir)/$@
.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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment