-ifeq "$(GhcWithHscBuiltViaC)" "NO"
-SUBDIRS = utils driver includes rts docs compiler lib
-else
-SUBDIRS = utils driver includes rts docs lib compiler
-endif
+# -----------------------------------------------------------------------------
+
+dir = ghc
+TOP = ..
+SPEC_TARGETS = 1 2 3
+include $(TOP)/mk/sub-makefile.mk
+
+FAST_MAKE_OPTS += compiler_stage1_NO_BUILD_DEPS=YES \
+ compiler_stage2_NO_BUILD_DEPS=YES \
+ compiler_stage3_NO_BUILD_DEPS=YES \
+ ghc_stage1_NO_BUILD_DEPS=YES \
+ ghc_stage2_NO_BUILD_DEPS=YES \
+ ghc_stage3_NO_BUILD_DEPS=YES
+
+.PHONY: 1 2 3
+
+1:
+ +$(TOPMAKE) stage=1 all_ghc_stage1 $(FAST_MAKE_OPTS)
+
+2:
+ +$(TOPMAKE) stage=2 all_ghc_stage2 $(FAST_MAKE_OPTS)