aboutsummaryrefslogtreecommitdiff
path: root/lang/ghc/files/patch-utils-hsc2hs-Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'lang/ghc/files/patch-utils-hsc2hs-Makefile')
-rw-r--r--lang/ghc/files/patch-utils-hsc2hs-Makefile20
1 files changed, 20 insertions, 0 deletions
diff --git a/lang/ghc/files/patch-utils-hsc2hs-Makefile b/lang/ghc/files/patch-utils-hsc2hs-Makefile
new file mode 100644
index 000000000000..a9cfdf7a5879
--- /dev/null
+++ b/lang/ghc/files/patch-utils-hsc2hs-Makefile
@@ -0,0 +1,20 @@
+diff -rNup ./utils/hsc2hs/Makefile.orig ./utils/hsc2hs/Makefile
+--- ./utils/hsc2hs/Makefile.orig Mon Dec 10 19:11:32 2007
++++ ./utils/hsc2hs/Makefile Sun Dec 30 21:53:09 2007
+@@ -39,9 +39,15 @@ else
+ extra_flags=
+ endif
+
++ifneq "$(GMP_INCLUDE_DIRS)" ""
++gmp_includes=-I$(GMP_INCLUDE_DIRS)
++else
++gmp_includes=
++endif
++
+ $(INPLACE_HS): Makefile $(FPTOOLS_TOP)/mk/config.mk
+ echo "import System.Cmd; import System.Environment; import System.Exit" > $@
+- echo "main = do args <- getArgs; rawSystem \"$(FPTOOLS_TOP_ABS)/$(GHC_HSC2HS_DIR_REL)/$(HS_PROG)\" (\"--template=$(FPTOOLS_TOP_ABS)/$(GHC_HSC2HS_DIR_REL)/template-hsc.h\":\"--cc=$(CC)\":\"--ld=$(CC)\"$(patsubst %,:\"%\",$(extra_flags)):\"--cflag=-D__GLASGOW_HASKELL__=$(ProjectVersionInt)\":\"-I$(FPTOOLS_TOP_ABS)/$(GHC_INCLUDE_DIR_REL)\":\"-I$(FPTOOLS_TOP_ABS)/gmp/gmpbuild\":args) >>= exitWith" >> $@
++ echo "main = do args <- getArgs; rawSystem \"$(FPTOOLS_TOP_ABS)/$(GHC_HSC2HS_DIR_REL)/$(HS_PROG)\" (\"--template=$(FPTOOLS_TOP_ABS)/$(GHC_HSC2HS_DIR_REL)/template-hsc.h\":\"--cc=$(CC)\":\"--ld=$(CC)\"$(patsubst %,:\"%\",$(extra_flags)):\"--cflag=-D__GLASGOW_HASKELL__=$(ProjectVersionInt)\":\"-I$(FPTOOLS_TOP_ABS)/$(GHC_INCLUDE_DIR_REL)\":\"-I$(FPTOOLS_TOP_ABS)/gmp/gmpbuild\":\"$(gmp_includes)\":args) >>= exitWith" >> $@
+
+ $(INPLACE_PROG): $(INPLACE_HS)
+ $(HC) --make $< -o $@