Call the final build system phase "final" rather than ""
authorIan Lynagh <igloo@earth.li>
Mon, 7 Feb 2011 14:20:46 +0000 (14:20 +0000)
committerIan Lynagh <igloo@earth.li>
Mon, 7 Feb 2011 14:20:46 +0000 (14:20 +0000)
Makefile
docs/man/ghc.mk
ghc.mk
rules/build-package.mk
rules/build-prog.mk
rules/docbook.mk

index 8166e55..1a23e2e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -69,7 +69,7 @@ ifneq "$(OMIT_PHASE_1)" "YES"
        $(MAKE) -r --no-print-directory -f ghc.mk phase=1 phase_1_builds
 endif
        @echo "===--- building final phase"
        $(MAKE) -r --no-print-directory -f ghc.mk phase=1 phase_1_builds
 endif
        @echo "===--- building final phase"
-       $(MAKE) -r --no-print-directory -f ghc.mk $@
+       $(MAKE) -r --no-print-directory -f ghc.mk phase=final $@
 
 binary-dist: binary-dist-prep
 ifeq "$(mingw32_TARGET_OS)" "1"
 
 binary-dist: binary-dist-prep
 ifeq "$(mingw32_TARGET_OS)" "1"
index 6775c55..96fef2d 100644 (file)
@@ -39,7 +39,7 @@ docs/man/flags.xml: docs/users_guide/flags.xml
        sed 1d $< >> $@
 
 ifeq "$(BUILD_MAN)" "YES"
        sed 1d $< >> $@
 
 ifeq "$(BUILD_MAN)" "YES"
-ifeq "$(phase)" ""
+ifeq "$(phase)" "final"
 $(eval $(call all-target,docs/man,$(MAN_PATH)))
 endif
 
 $(eval $(call all-target,docs/man,$(MAN_PATH)))
 endif
 
diff --git a/ghc.mk b/ghc.mk
index d2e4e35..46b6c4e 100644 (file)
--- a/ghc.mk
+++ b/ghc.mk
@@ -136,6 +136,10 @@ $(error $$(GhcLibWays) is empty, it must contain at least one way)
 endif
 endif
 
 endif
 endif
 
+ifeq "$(phase)" ""
+phase = final
+endif
+
 # -----------------------------------------------------------------------------
 # Utility definitions
 
 # -----------------------------------------------------------------------------
 # Utility definitions
 
@@ -507,7 +511,7 @@ endif
 # ----------------------------------------------
 # Checking packages with 'cabal check'
 
 # ----------------------------------------------
 # Checking packages with 'cabal check'
 
-ifeq "$(phase)" ""
+ifeq "$(phase)" "final"
 ifeq "$(CHECK_PACKAGES)" "YES"
 all: check_packages
 endif
 ifeq "$(CHECK_PACKAGES)" "YES"
 all: check_packages
 endif
@@ -644,7 +648,7 @@ $(foreach p,$(STAGE0_PACKAGES),$(eval libraries/$p_dist-boot_DO_HADDOCK = NO))
 ifeq "$(HADDOCK_DOCS)" "YES"
 libraries/index.html: inplace/bin/haddock$(exeext) $(ALL_HADDOCK_FILES)
        cd libraries && sh gen_contents_index --inplace
 ifeq "$(HADDOCK_DOCS)" "YES"
 libraries/index.html: inplace/bin/haddock$(exeext) $(ALL_HADDOCK_FILES)
        cd libraries && sh gen_contents_index --inplace
-ifeq "$(phase)" ""
+ifeq "$(phase)" "final"
 $(eval $(call all-target,library_doc_index,libraries/index.html))
 endif
 INSTALL_LIBRARY_DOCS += libraries/*.html libraries/*.gif libraries/*.css libraries/*.js
 $(eval $(call all-target,library_doc_index,libraries/index.html))
 endif
 INSTALL_LIBRARY_DOCS += libraries/*.html libraries/*.gif libraries/*.css libraries/*.js
index 74ffbbd..ac0a8ee 100644 (file)
@@ -82,7 +82,7 @@ $(call build-package-data,$1,$2,$3)
 ifneq "$$(NO_INCLUDE_PKGDATA)" "YES"
 ifeq "$3" "0"
 include $1/$2/package-data.mk
 ifneq "$$(NO_INCLUDE_PKGDATA)" "YES"
 ifeq "$3" "0"
 include $1/$2/package-data.mk
-else ifeq "$(phase)" ""
+else ifeq "$(phase)" "final"
 include $1/$2/package-data.mk
 endif
 endif
 include $1/$2/package-data.mk
 endif
 endif
@@ -109,7 +109,7 @@ ifneq "$(phase)" "0"
 # bootstrapping stuff
 ifeq "$3" "0"
 $(call include-dependencies,$1,$2,$3)
 # bootstrapping stuff
 ifeq "$3" "0"
 $(call include-dependencies,$1,$2,$3)
-else ifeq "$(phase)" ""
+else ifeq "$(phase)" "final"
 # In the final phase, we also include the dependency files for
 # everything else
 $(call include-dependencies,$1,$2,$3)
 # In the final phase, we also include the dependency files for
 # everything else
 $(call include-dependencies,$1,$2,$3)
index c08c408..5c352a2 100644 (file)
@@ -82,7 +82,7 @@ $(call build-package-data,$1,$2,$3)
 ifneq "$$(NO_INCLUDE_PKGDATA)" "YES"
 ifeq "$3" "0"
 include $1/$2/package-data.mk
 ifneq "$$(NO_INCLUDE_PKGDATA)" "YES"
 ifeq "$3" "0"
 include $1/$2/package-data.mk
-else ifeq "$(phase)" ""
+else ifeq "$(phase)" "final"
 include $1/$2/package-data.mk
 endif
 endif
 include $1/$2/package-data.mk
 endif
 endif
@@ -197,7 +197,7 @@ ifneq "$(phase)" "0"
 # bootstrapping stuff
 ifeq "$3" "0"
 $(call include-dependencies,$1,$2,$3)
 # bootstrapping stuff
 ifeq "$3" "0"
 $(call include-dependencies,$1,$2,$3)
-else ifeq "$(phase)" ""
+else ifeq "$(phase)" "final"
 # In the final phase, we also include the dependency files for
 # everything else
 $(call include-dependencies,$1,$2,$3)
 # In the final phase, we also include the dependency files for
 # everything else
 $(call include-dependencies,$1,$2,$3)
index 8030fb7..5a7bfdf 100644 (file)
@@ -26,7 +26,7 @@ $(call all-target,$1,)
 
 .PHONY: html_$1
 
 
 .PHONY: html_$1
 
-ifeq "$$(phase)" ""
+ifeq "$$(phase)" "final"
 ifeq "$$(BUILD_DOCBOOK_HTML)" "YES"
 $(call all-target,$1,html_$1)
 INSTALL_HTML_DOC_DIRS += $1/$2
 ifeq "$$(BUILD_DOCBOOK_HTML)" "YES"
 $(call all-target,$1,html_$1)
 INSTALL_HTML_DOC_DIRS += $1/$2
@@ -50,7 +50,7 @@ endif
 
 
 .PHONY: ps_$1
 
 
 .PHONY: ps_$1
-ifeq "$$(phase)" ""
+ifeq "$$(phase)" "final"
 ifeq "$$(BUILD_DOCBOOK_PS)" "YES"
 $(call all-target,$1,ps_$1)
 INSTALL_DOCS += $1/$2.ps
 ifeq "$$(BUILD_DOCBOOK_PS)" "YES"
 $(call all-target,$1,ps_$1)
 INSTALL_DOCS += $1/$2.ps
@@ -65,7 +65,7 @@ $1/$2.ps: $$($1_DOCBOOK_SOURCES)
        [ -f $$@ ]
 endif
 
        [ -f $$@ ]
 endif
 
-ifeq "$$(phase)" ""
+ifeq "$$(phase)" "final"
 ifeq "$$(BUILD_DOCBOOK_PDF)" "YES"
 $(call all-target,$1,pdf_$1)
 INSTALL_DOCS += $1/$2.pdf
 ifeq "$$(BUILD_DOCBOOK_PDF)" "YES"
 $(call all-target,$1,pdf_$1)
 INSTALL_DOCS += $1/$2.pdf