summaryrefslogtreecommitdiff
path: root/includes/ghc.mk
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-09-13 12:54:04 +0100
committerIan Lynagh <ian@well-typed.com>2012-09-13 12:54:04 +0100
commitf89b73e677ce1988ce2384b8918cec2b9443d466 (patch)
treeee2d4b9b21604a1445684471f3ef922f9f82d559 /includes/ghc.mk
parent86054b4ab5125a8b71887b06786d0a428539fb9c (diff)
downloadhaskell-f89b73e677ce1988ce2384b8918cec2b9443d466.tar.gz
Add more modes to mkDerivedConstants
We now generate a platformConstants file that we can read at runtime.
Diffstat (limited to 'includes/ghc.mk')
-rw-r--r--includes/ghc.mk22
1 files changed, 19 insertions, 3 deletions
diff --git a/includes/ghc.mk b/includes/ghc.mk
index 7a5969c04e..e8b9837407 100644
--- a/includes/ghc.mk
+++ b/includes/ghc.mk
@@ -132,6 +132,8 @@ endif
includes_DERIVEDCONSTANTS = includes/dist-derivedconstants/header/DerivedConstants.h
includes_GHCCONSTANTS = includes/dist-derivedconstants/header/GHCConstants.h
+includes_GHCCONSTANTS_HASKELL_TYPE = includes/dist-derivedconstants/header/GHCConstantsHaskellType.hs
+includes_GHCCONSTANTS_HASKELL_VALUE = includes/dist-derivedconstants/header/platformConstants
ifeq "$(PORTING_HOST)-$(AlienScript)" "YES-"
@@ -170,7 +172,21 @@ $(includes_GHCCONSTANTS) : $(INPLACE_BIN)/mkDerivedConstants$(exeext) | $$(dir $
ifeq "$(AlienScript)" ""
./$< --gen-haskell >$@
else
- $(AlienScript) run ./$< >$@
+ $(AlienScript) run ./$< --gen-haskell >$@
+endif
+
+$(includes_GHCCONSTANTS_HASKELL_TYPE) : $(INPLACE_BIN)/mkDerivedConstants$(exeext) | $$(dir $$@)/.
+ifeq "$(AlienScript)" ""
+ ./$< --gen-haskell-type >$@
+else
+ $(AlienScript) run ./$< --gen-haskell-type >$@
+endif
+
+$(includes_GHCCONSTANTS_HASKELL_VALUE) : $(INPLACE_BIN)/mkDerivedConstants$(exeext) | $$(dir $$@)/.
+ifeq "$(AlienScript)" ""
+ ./$< --gen-haskell-value >$@
+else
+ $(AlienScript) run ./$< --gen-haskell-value >$@
endif
endif
@@ -181,11 +197,11 @@ endif
$(eval $(call clean-target,includes,,\
$(includes_H_CONFIG) $(includes_H_PLATFORM) \
- $(includes_GHCCONSTANTS) $(includes_DERIVEDCONSTANTS)))
+ $(includes_GHCCONSTANTS) $(includes_GHCCONSTANTS_HASKELL_TYPE) $(includes_GHCCONSTANTS_HASKELL_VALUE) $(includes_DERIVEDCONSTANTS)))
$(eval $(call all-target,includes,,\
$(includes_H_CONFIG) $(includes_H_PLATFORM) \
- $(includes_GHCCONSTANTS) $(includes_DERIVEDCONSTANTS)))
+ $(includes_GHCCONSTANTS) $(includes_GHCCONSTANTS_HASKELL_TYPE) $(includes_GHCCONSTANTS_HASKELL_VALUE) $(includes_DERIVEDCONSTANTS)))
install: install_includes