From 056997a285a368f5f78905b4b325a3258484f71d Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Sun, 3 Mar 2013 13:35:41 +0000 Subject: Add PACKAGES_STAGE0 to build-dirs too; fixes #7700 This is sometimes needed when cross-compiling, as some packages may be built in stage 0 but not stage 1. In order to make everything work out, this also removes the requirement that the build-dirs are in dependency order --- ghc.mk | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'ghc.mk') diff --git a/ghc.mk b/ghc.mk index 191987c41d..f9f9785b7c 100644 --- a/ghc.mk +++ b/ghc.mk @@ -583,9 +583,6 @@ endif # ----------------------------------------------------------------------------- # Include build instructions from all subdirs -# These need to be in dependency order, as some of the rules refer to -# variables defined by their dependencies - ifneq "$(BINDIST)" "YES" BUILD_DIRS += utils/mkdirhier endif @@ -621,7 +618,15 @@ BUILD_DIRS += utils/genapply endif ifneq "$(CLEANING)" "YES" +# These are deliberately in reverse order, so as to ensure that +# there is no need to have them in dependency order. That's important +# because it's tricky to ensure that they are in dependency order when +# cross-compiling, as some packages may only be in PACKAGES_STAGE0 +# or PACKAGES_STAGE1. +BUILD_DIRS += $(patsubst %, libraries/%, $(PACKAGES_STAGE2)) BUILD_DIRS += $(patsubst %, libraries/%, $(PACKAGES_STAGE1)) +BUILD_DIRS += $(patsubst %, libraries/%, $(filter-out $(PACKAGES_STAGE1),$(PACKAGES_STAGE0)) +BUILD_DIRS += libraries/dph endif @@ -655,11 +660,6 @@ BUILD_DIRS += $(MAYBE_HPC) BUILD_DIRS += $(MAYBE_RUNGHC) BUILD_DIRS += ghc -ifneq "$(CLEANING)" "YES" -BUILD_DIRS += $(patsubst %, libraries/%, $(PACKAGES_STAGE2)) -BUILD_DIRS += libraries/dph -endif - ifneq "$(BINDIST)" "YES" ifneq "$(CrossCompiling)-$(phase)" "YES-final" BUILD_DIRS += utils/mkUserGuidePart -- cgit v1.2.1