summaryrefslogtreecommitdiff
path: root/includes/ghc.mk
diff options
context:
space:
mode:
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