Fix "make 1" etc following the build system changes
[ghc-hetmet.git] / rules / include-dependencies.mk
index b933110..ad1c230 100644 (file)
@@ -17,7 +17,17 @@ $(call profStart, include-dependencies($1,$2,$3))
 # $2 = distdir
 # $3 = GHC stage to use (0 == bootstrapping compiler)
 
-ifneq "$$(NO_INCLUDE_DEPS)" "YES"
+$1_$2_INCLUDE_DEPFILES = YES
+ifeq "$$(NO_INCLUDE_DEPS)" "YES"
+$1_$2_INCLUDE_DEPFILES = NO
+endif
+ifneq "$$(ONLY_DEPS_FOR)" ""
+ifeq "$$(filter $1_$2,$$(ONLY_DEPS_FOR))" ""
+$1_$2_INCLUDE_DEPFILES = NO
+endif
+endif
+
+ifeq "$$($1_$2_INCLUDE_DEPFILES)" "YES"
 ifneq "$$(strip $$($1_$2_HS_SRCS) $$($1_$2_HS_BOOT_SRCS))" ""
 ifneq "$$(NO_STAGE$3_DEPS)" "YES"
 include $$($1_$2_depfile_haskell)