diff --git a/gmp/ghc.mk b/gmp/ghc.mk
index 068d87d597e9309c7c17b2517abd443722c96c65..fd05db45477a0f03e9d3bae22ed6a5fe45ed8978 100644
--- a/gmp/ghc.mk
+++ b/gmp/ghc.mk
@@ -33,7 +33,7 @@ clean_gmp:
 	"$(RM)" $(RM_OPTS_REC) libraries/integer-gmp/gmp/gmpbuild
 endif
 
-ifeq "$(phase_3_done)" "YES"
+ifeq "$(phase)" ""
 
 ifeq "$(findstring clean,$(MAKECMDGOALS))" ""
 include libraries/integer-gmp/gmp/config.mk