summaryrefslogtreecommitdiff
path: root/libraries/Makefile
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2009-02-10 22:55:38 +0000
committerIan Lynagh <igloo@earth.li>2009-02-10 22:55:38 +0000
commitef378f7cd93227321ce127f542865f1d799e0ccb (patch)
treedfa2e6a5a6777f9ef374bad9aaa1a1e3d7824f14 /libraries/Makefile
parenta233641531c30f3ae5839a02d60e342fd2c87e58 (diff)
downloadhaskell-ef378f7cd93227321ce127f542865f1d799e0ccb.tar.gz
Fix cleaning and installing the libraries
When cleaning or installing, we need to ignore what $stage is, and just clean/install all the libraries.
Diffstat (limited to 'libraries/Makefile')
-rw-r--r--libraries/Makefile17
1 files changed, 15 insertions, 2 deletions
diff --git a/libraries/Makefile b/libraries/Makefile
index 56c1b7b386..6954659ac4 100644
--- a/libraries/Makefile
+++ b/libraries/Makefile
@@ -40,11 +40,24 @@ ifeq "$(stage)" ""
stage := 1
endif
+DO_STAGE_1_LIBS := NO
+DO_STAGE_2_LIBS := NO
+ifeq "$(stage)" "1"
+DO_STAGE_1_LIBS := YES
+endif
+ifeq "$(stage)" "2"
+DO_STAGE_2_LIBS := YES
+endif
+ifneq "$(filter install clean,$(MAKECMDGOALS))" ""
+DO_STAGE_1_LIBS := YES
+DO_STAGE_2_LIBS := YES
+endif
+
# Any libraries listed here should also be in ../packages
SUBDIRS :=
-ifeq "$(stage)" "1"
+ifeq "$(DO_STAGE_1_LIBS)" "YES"
SUBDIRS += ghc-prim $(INTEGER_LIBRARY) base syb base3-compat array packedstring
SUBDIRS += containers bytestring old-locale old-time filepath
ifeq "$(GhcLibsWithUnix)" "YES"
@@ -75,7 +88,7 @@ SUBDIRS += $(wildcard parallel)
endif
endif
-ifeq "$(stage)" "2"
+ifeq "$(DO_STAGE_2_LIBS)" "YES"
ifneq "$(GhcBootLibs)" "YES"
ifneq "$(wildcard dph)" ""
SUBDIRS += dph/dph-base