Build system: add `make show!` command (#7810)
authorThomas Miedema <thomasmiedema@gmail.com>
Fri, 10 Jul 2015 16:38:02 +0000 (18:38 +0200)
committerThomas Miedema <thomasmiedema@gmail.com>
Mon, 13 Jul 2015 19:07:42 +0000 (21:07 +0200)
A normal `make show` starts a build of the ghc-stage1 compiler, to
create package-data.mk files. This version doesn't read those, so it
will work right after ./configure.

Differential Revision: https://phabricator.haskell.org/D1064

MAKEHELP.md
Makefile
mk/sub-makefile.mk

index ff0e434..3b58292 100644 (file)
@@ -36,6 +36,11 @@ Common commands:
 
     Displays the value of make variable <var>
 
+  - `make show! VALUE=<var>`
+
+    Same as `make show`, but works right after ./configure (it skips reading
+    package-data.mk files).
+
   - make clean
   - make distclean
   - make maintainer-clean
index c08ccc5..b1b1742 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -78,6 +78,7 @@ REALGOALS=$(filter-out \
     distclean \
     maintainer-clean \
     show \
+    show! \
     echo \
     help \
     test \
@@ -142,6 +143,10 @@ $(filter clean_%, $(MAKECMDGOALS)) : clean_% :
 bootstrapping-files show echo:
        $(MAKE) --no-print-directory -f ghc.mk $@
 
+.PHONY: show!
+show!:
+       $(MAKE) --no-print-directory -f ghc.mk show NO_INCLUDE_PKGDATA=YES
+
 ifeq "$(darwin_TARGET_OS)" "1"
 .PHONY: framework-pkg
 framework-pkg:
index 12f47f0..73d98c9 100644 (file)
@@ -42,7 +42,7 @@ endif
 .NOTPARALLEL:
 
 STD_TARGETS = all clean distclean maintainer_clean install html ps pdf
-DIRECTORY_INDEPENDENT_TARGETS = show
+DIRECTORY_INDEPENDENT_TARGETS = show show!
 
 # The + tells make that we're recursively invoking make, otherwise 'make -j2'
 # goes wrong.
@@ -52,7 +52,7 @@ $(STD_TARGETS):
 $(DIRECTORY_INDEPENDENT_TARGETS):
        +$(TOPMAKE) $@ $(EXTRA_MAKE_OPTS)
 
-OTHERTARGETS=$(filter-out fast help show $(STD_TARGETS) $(SPEC_TARGETS),$(MAKECMDGOALS))
+OTHERTARGETS=$(filter-out fast help $(DIRECTORY_INDEPENDENT_TARGETS) $(STD_TARGETS) $(SPEC_TARGETS),$(MAKECMDGOALS))
 .PHONY: $(OTHERTARGETS)
 $(OTHERTARGETS):
        +$(TOPMAKE) $(dir)/$@ $(EXTRA_MAKE_OPTS)