summaryrefslogtreecommitdiff
path: root/rules
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2013-02-15 23:41:21 +0000
committerIan Lynagh <ian@well-typed.com>2013-02-15 23:45:13 +0000
commitcdf16555ef5e2670a01bb5fa1462e7177b921fe0 (patch)
treec9a6cd9ce9a84c2734f8d4f08d383e8e4a1a0163 /rules
parent3c839acd302115e5e43668f348b64784cd76413f (diff)
downloadhaskell-cdf16555ef5e2670a01bb5fa1462e7177b921fe0.tar.gz
Build system tweak: Do the package checks at configure time
This removes the '.PHONY' rule, so means that "make" in a built tree won't repeat the check. We also now check the .cabal files for the executables as well as the libraries.
Diffstat (limited to 'rules')
-rw-r--r--rules/build-package-data.mk8
-rw-r--r--rules/build-package.mk8
2 files changed, 8 insertions, 8 deletions
diff --git a/rules/build-package-data.mk b/rules/build-package-data.mk
index 17def03638..7cee00b71c 100644
--- a/rules/build-package-data.mk
+++ b/rules/build-package-data.mk
@@ -102,6 +102,14 @@ $1/$2/build/autogen/cabal_macros.h : $1/$2/package-data.mk
# for our build system, and registers the package for use in-place in
# the build tree.
$1/$2/package-data.mk : $$(GHC_CABAL_INPLACE) $$($1_$2_GHC_PKG_DEP) $1/$$($1_PACKAGE).cabal $$(wildcard $1/configure) $$(LAX_DEPS_FOLLOW) $$($1_$2_HC_CONFIG_DEP)
+# Checking packages built with the bootstrapping compiler would
+# generally be a waste of time. Either we will rebuild them with
+# stage1/stage2, or we don't really care about them.
+ifneq "$3" "0"
+ifneq "$$($1_NO_CHECK)" "YES"
+ CROSS_COMPILE="$(CrossCompilePrefix)" "$$(GHC_CABAL_INPLACE)" check $1
+endif
+endif
CROSS_COMPILE="$(CrossCompilePrefix)" "$$(GHC_CABAL_INPLACE)" configure --with-ghc="$$($1_$2_HC_CONFIG)" --with-ghc-pkg="$$($1_$2_GHC_PKG)" $$($1_CONFIGURE_OPTS) $$($1_$2_CONFIGURE_OPTS) -- $2 $1
ifeq "$$($1_$2_PROG)" ""
ifneq "$$($1_$2_REGISTER_PACKAGE)" "NO"
diff --git a/rules/build-package.mk b/rules/build-package.mk
index e64754cb3f..47b706e718 100644
--- a/rules/build-package.mk
+++ b/rules/build-package.mk
@@ -137,14 +137,6 @@ ifneq "$$($1_$2_GROUP)" ""
all_$$($1_$2_GROUP): all_$1_$2
endif
-ifneq "$$(CHECKED_$1)" "YES"
-CHECKED_$1 = YES
-check_packages: check_$1
-.PHONY: check_$1
-check_$1: $$(GHC_CABAL_INPLACE)
- CROSS_COMPILE="$(CrossCompilePrefix)" $$(GHC_CABAL_INPLACE) check $1
-endif
-
ifneq "$3" "0"
$(call haddock,$1,$2)
endif