$(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"
sed 1d $< >> $@
ifeq "$(BUILD_MAN)" "YES"
-ifeq "$(phase)" ""
+ifeq "$(phase)" "final"
$(eval $(call all-target,docs/man,$(MAN_PATH)))
endif
endif
endif
+ifeq "$(phase)" ""
+phase = final
+endif
+
# -----------------------------------------------------------------------------
# Utility definitions
# ----------------------------------------------
# Checking packages with 'cabal check'
-ifeq "$(phase)" ""
+ifeq "$(phase)" "final"
ifeq "$(CHECK_PACKAGES)" "YES"
all: check_packages
endif
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
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
# 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)
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
# 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)
.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
.PHONY: ps_$1
-ifeq "$$(phase)" ""
+ifeq "$$(phase)" "final"
ifeq "$$(BUILD_DOCBOOK_PS)" "YES"
$(call all-target,$1,ps_$1)
INSTALL_DOCS += $1/$2.ps
[ -f $$@ ]
endif
-ifeq "$$(phase)" ""
+ifeq "$$(phase)" "final"
ifeq "$$(BUILD_DOCBOOK_PDF)" "YES"
$(call all-target,$1,pdf_$1)
INSTALL_DOCS += $1/$2.pdf