Make sure all the clean rules are always included
[ghc-hetmet.git] / ghc / ghc.mk
index 1f0b287..4c98b3e 100644 (file)
@@ -103,20 +103,15 @@ define ghc_stage$(INSTALL_GHC_STAGE)_INSTALL_SHELL_WRAPPER_EXTRA
 echo 'executablename="$$exedir/ghc"' >> "$(WRAPPER)"
 endef
 
-# stage 1 is enabled unless $(stage) is set to something other than 1
-ifeq "$(filter-out 1,$(stage))" ""
-$(eval $(call build-prog,ghc,stage1,0))
+ifeq "$(stage)" "1"
+ghc_stage2_NOT_NEEDED = YES
 endif
-
-# stage 2 is enabled unless $(stage) is set to something other than 2
-ifeq "$(filter-out 2,$(stage))" ""
-$(eval $(call build-prog,ghc,stage2,1))
+ifneq "$(stage)" "3"
+ghc_stage3_NOT_NEEDED = YES
 endif
-
-# stage 3 has to be requested explicitly with stage=3
-ifeq "$(stage)" "3"
+$(eval $(call build-prog,ghc,stage1,0))
+$(eval $(call build-prog,ghc,stage2,1))
 $(eval $(call build-prog,ghc,stage3,2))
-endif
 
 ifneq "$(BINDIST)" "YES"