# 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 \
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)
# 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
# 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
endif
endif
-SRC_CC_OPTS += -Iparser -I. -I$(GHC_INCLUDE_DIR) -O
+SRC_CC_OPTS += -Iparser -I. -O
SRC_HC_OPTS += -recomp $(GhcHcOpts) $(GhcStage$(stage)HcOpts)
SRC_HC_OPTS += -H16M
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
$(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 < $< > $@
+
# ----------------------------------------------------------------------------
MKDEPENDHS=$(HC)
-depend :: .depend-$(stage)
-
# Must do this *after* including target.mk, because $(HS_SRCS) isn't set yet.
-.depend-$(stage) : $(HS_SRCS) $(C_SRCS)
+depend :: $(HS_SRCS) $(C_SRCS)
$(MKDEPENDHS) -M -optdep-f -optdep.depend-BASE $(foreach way,$(WAYS),-optdep-s -optdep$(way)) $(foreach obj,$(MKDEPENDHS_OBJ_SUFFICES),-osuf $(obj)) $(MKDEPENDHS_OPTS) $(filter-out -split-objs, $(MKDEPENDHS_HC_OPTS)) $(HS_SRCS)
$(MKDEPENDC) -f .depend-BASE $(MKDEPENDC_OPTS) $(foreach way,$(WAYS),-s $(way)) -- $(CC_OPTS) -- $(C_SRCS)
$(PERL) -pe 'binmode(stdin); binmode(stdout); s@^(\S*\.o)@stage$(stage)/$$1@g; s@(\S*\.hi)@stage$(stage)/$$1@g' <.depend-BASE >.depend-$(stage)