diff options
author | Simon Marlow <marlowsd@gmail.com> | 2009-06-16 08:53:41 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2009-06-16 08:53:41 +0000 |
commit | f684f630a90eea64a13542c3bb0a1ab54a5067b7 (patch) | |
tree | 78dad3c53b00b6154a5898aee88b27bd007545af | |
parent | 2dfd2ac773482f26e393a199e9d04fc9c23d5794 (diff) | |
download | haskell-f684f630a90eea64a13542c3bb0a1ab54a5067b7.tar.gz |
Add support for 'make help' in subdirectories
Including help for directory-specific targets, such as 'make 1' in ghc
-rw-r--r-- | compiler/Makefile | 9 | ||||
-rw-r--r-- | ghc/Makefile | 9 | ||||
-rw-r--r-- | libraries/Makefile | 8 | ||||
-rw-r--r-- | mk/sub-makefile.mk | 11 |
4 files changed, 36 insertions, 1 deletions
diff --git a/compiler/Makefile b/compiler/Makefile index aaecaf14b1..7618f680a1 100644 --- a/compiler/Makefile +++ b/compiler/Makefile @@ -26,3 +26,12 @@ include $(TOP)/mk/sub-makefile.mk 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 +.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." diff --git a/ghc/Makefile b/ghc/Makefile index ea15e9d3d4..7e6b416cf3 100644 --- a/ghc/Makefile +++ b/ghc/Makefile @@ -26,3 +26,12 @@ include $(TOP)/mk/sub-makefile.mk 3: +$(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." diff --git a/libraries/Makefile b/libraries/Makefile index 238a73bbfe..98cc8bf38d 100644 --- a/libraries/Makefile +++ b/libraries/Makefile @@ -5,3 +5,11 @@ include $(TOP)/mk/sub-makefile.mk .PHONY: 1 1 : +$(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 diff --git a/mk/sub-makefile.mk b/mk/sub-makefile.mk index a1d1e9b608..989c0c91b9 100644 --- a/mk/sub-makefile.mk +++ b/mk/sub-makefile.mk @@ -30,7 +30,16 @@ STD_TARGETS = all clean distclean maintainer_clean install html ps pdf $(STD_TARGETS): +$(TOPMAKE) $@_$(dir) -OTHERTARGETS=$(filter-out fast $(STD_TARGETS) $(SPEC_TARGETS),$(MAKECMDGOALS)) +OTHERTARGETS=$(filter-out fast help $(STD_TARGETS) $(SPEC_TARGETS),$(MAKECMDGOALS)) .PHONY: $(OTHERTARGETS) $(OTHERTARGETS): +$(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 |