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 maintainer-clean distclean binary-dist,$(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"
endif
endif
-ifeq "$(stage)" "2"
+ifeq "$(DO_STAGE_2_LIBS)" "YES"
ifneq "$(GhcBootLibs)" "YES"
ifneq "$(wildcard dph)" ""
SUBDIRS += dph/dph-base
CONFIGURE_STAMP_EXTRAS := $(CONFIGURE_STAMP_EXTRAS)-splitting
endif
-ifeq "$(HSCOLOUR_SRCS)" "YES"
-CONFIGURE_OPTS += --with-hscolour="$(HSCOLOUR)"
-endif
-
.PHONY: subdirs
subdirs: