Keep C main separate from rts lib and link it in for standalone progs
[ghc-hetmet.git] / ghc.mk
diff --git a/ghc.mk b/ghc.mk
index fb6ba93..2bea829 100644 (file)
--- a/ghc.mk
+++ b/ghc.mk
@@ -329,6 +329,7 @@ endif
 
 PACKAGES += haskeline
 
+ifneq "$(BootingFromHc)" "YES"
 PACKAGES_STAGE2 += \
        dph/dph-base \
        dph/dph-prim-interface \
@@ -336,6 +337,7 @@ PACKAGES_STAGE2 += \
        dph/dph-prim-par \
        dph/dph-seq \
        dph/dph-par
+endif
 
 BOOT_PKGS = Cabal hpc extensible-exceptions
 
@@ -497,9 +499,12 @@ BUILD_DIRS += \
 
 ifneq "$(CLEANING)" "YES"
 BUILD_DIRS += \
-   $(patsubst %, libraries/%, $(PACKAGES) $(PACKAGES_STAGE2)) \
+   $(patsubst %, libraries/%, $(PACKAGES) $(PACKAGES_STAGE2))
+ifneq "$(BootingFromHc)" "YES"
+BUILD_DIRS += \
    libraries/dph
 endif
+endif
 
 BUILD_DIRS += \
    compiler \
@@ -924,7 +929,7 @@ maintainer-clean : distclean
 .PHONY: all_libraries
 
 .PHONY: bootstrapping-files
-bootstrapping-files: $(GMP_LIB)
+bootstrapping-files: $(OTHER_LIBS)
 bootstrapping-files: includes/ghcautoconf.h
 bootstrapping-files: includes/DerivedConstants.h
 bootstrapping-files: includes/GHCConstants.h