[project @ 2003-02-11 11:53:51 by wolfgang]
[ghc-hetmet.git] / ghc / compiler / Makefile
index 7eca529..f5bc1db 100644 (file)
@@ -104,7 +104,7 @@ boot ::
 #     Hence the "../.." in the ln command line
 ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32"
        for i in */*hi-boot*; do \
-           cp -f $$i stage$(stage)/$$i; \
+           cp -u -f $$i stage$(stage)/$$i; \
        done
 else
        for i in */*hi-boot*; do \
@@ -234,7 +234,7 @@ CLEAN_FILES += $(CONFIG_HS)
 ALL_DIRS = \
   utils basicTypes types hsSyn prelude rename typecheck deSugar coreSyn \
   specialise simplCore stranal stgSyn simplStg codeGen absCSyn main \
-  profiling parser usageSP cprAnalysis compMan ndpFlatten
+  profiling parser cprAnalysis compMan ndpFlatten
 
 # Make sure we include Config.hs even if it doesn't exist yet...
 ALL_SRCS += $(CONFIG_HS)
@@ -277,7 +277,10 @@ ifeq "$(GhcWithInterpreter) $(bootstrapped)" "YES YES"
 # Yes, include the interepreter, readline, and Template Haskell extensions
 SRC_HC_OPTS += -DGHCI -package haskell-src
 ifneq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
-SRC_HC_OPTS += -package unix -package readline 
+SRC_HC_OPTS += -package unix
+ifeq "$(GhcLibsWithReadline)" "YES"
+SRC_HC_OPTS += -package readline 
+endif
 endif
 ALL_DIRS += ghci
 else
@@ -294,7 +297,11 @@ HS_OBJS     += $(C_OBJS)
 # Big Fudge to get around inherent problem that Makefile setup
 # has got with 'mkdependC'.
 # 
-SRC_MKDEPENDC_OPTS += -D__GLASGOW_HASKELL__=$(ProjectVersionInt) -I$(GHC_INCLUDE_DIR)
+SRC_MKDEPENDC_OPTS += -D__GLASGOW_HASKELL__=$(ProjectVersionInt)
+
+# XXX not really correct, hschooks.c actually gets include files like
+# RtsFlags.c from the installed GHC, but we can't tell mkdependC about that.
+SRC_MKDEPENDC_OPTS += -I$(GHC_INCLUDE_DIR)
 
 # -----------------------------------------------------------------------------
 #              Haskell compilations
@@ -329,7 +336,7 @@ endif
 endif
 
 SRC_CC_OPTS += -Iparser -I. -O
-SRC_HC_OPTS += -recomp $(GhcHcOpts)
+SRC_HC_OPTS += -recomp $(GhcHcOpts) $(GhcStage$(stage)HcOpts)
 SRC_HC_OPTS += -H16M
 
 ifeq "$(BootingFromHc)" "YES"
@@ -420,7 +427,6 @@ PRIMOP_BITS=primop-data-decl.hs-incl \
             primop-needs-wrapper.hs-incl  \
             primop-can-fail.hs-incl  \
             primop-strictness.hs-incl  \
-            primop-usage.hs-incl  \
             primop-primop-info.hs-incl
 
 CLEAN_FILES += prelude/primops.txt
@@ -455,11 +461,14 @@ primop-can-fail.hs-incl: prelude/primops.txt
        $(GENPOC) --can-fail           < $< > $@
 primop-strictness.hs-incl: prelude/primops.txt
        $(GENPOC) --strictness         < $< > $@
-primop-usage.hs-incl: prelude/primops.txt
-       $(GENPOC) --usage              < $< > $@
 primop-primop-info.hs-incl: prelude/primops.txt
        $(GENPOC) --primop-primop-info < $< > $@
 
+# Usages aren't used any more; but the generator 
+# can still generate them if we want them back
+primop-usage.hs-incl: prelude/primops.txt
+       $(GENPOC) --usage              < $< > $@
+
 
 
 # ----------------------------------------------------------------------------