Tell Cabal where hsc2hs; fixes trac #3147
authorIan Lynagh <igloo@earth.li>
Fri, 10 Apr 2009 14:45:02 +0000 (14:45 +0000)
committerIan Lynagh <igloo@earth.li>
Fri, 10 Apr 2009 14:45:02 +0000 (14:45 +0000)
Patch from gwright.

testsuite/mk/boilerplate.mk
testsuite/timeout/Makefile

index 41a72bd..b5ae28a 100644 (file)
@@ -53,6 +53,7 @@ OLD_BUILD_SYSTEM_STAGE1_GHC := $(abspath $(TOP)/../ghc/stage1-inplace/ghc)
 OLD_BUILD_SYSTEM_STAGE2_GHC := $(abspath $(TOP)/../ghc/stage2-inplace/ghc)
 OLD_BUILD_SYSTEM_STAGE3_GHC := $(abspath $(TOP)/../ghc/stage3-inplace/ghc)
 OLD_BUILD_SYSTEM_GHC_PKG    := $(abspath $(TOP)/../utils/ghc-pkg/install-inplace/bin/ghc-pkg)
+OLD_BUILD_SYSTEM_HSC2HS     := $(abspath $(TOP)/../utils/hsc2hs/install-inplace/bin/hsc2hs)
 OLD_BUILD_SYSTEM_HP2PS      := $(abspath $(TOP)/../utils/hp2ps/hp2ps)
 ifneq "$(wildcard $(OLD_BUILD_SYSTEM_STAGE1_GHC) $(OLD_BUILD_SYSTEM_STAGE1_GHC).exe)" ""
 
@@ -67,6 +68,7 @@ TEST_HC := $(OLD_BUILD_SYSTEM_STAGE2_GHC)
 endif
 endif
 GHC_PKG := $(OLD_BUILD_SYSTEM_GHC_PKG)
+HSC2HS := $(OLD_BUILD_SYSTEM_HSC2HS)
 HP2PS_ABS := $(OLD_BUILD_SYSTEM_HP2PS)
 # XXX This GCC definition is a hack. Once the in-tree GHC has a gcc in the
 # right place we won't need to do this, as Cabal will be able to find
@@ -105,6 +107,10 @@ ifeq "$(GHC_PKG)" ""
 GHC_PKG := $(dir $(TEST_HC))/ghc-pkg
 endif
 
+ifeq "$(HSC2HS)" ""
+HSC2HS := $(dir $(TEST_HC))/hsc2hs
+endif
+
 ifeq "$(HP2PS_ABS)" ""
 HP2PS_ABS := $(dir $(TEST_HC))/hp2ps
 endif
@@ -119,6 +125,11 @@ ifeq "$(wildcard $(GHC_PKG))" ""
 $(error Cannot find ghc-pkg: $(GHC_PKG))
 endif
 
+$(eval $(call canonicaliseExecutable,HSC2HS))
+ifeq "$(wildcard $(HSC2HS))" ""
+$(error Cannot find ghc-pkg: $(HSC2HS))
+endif
+
 $(eval $(call canonicaliseExecutable,HP2PS_ABS))
 ifeq "$(wildcard $(HP2PS_ABS))" ""
 $(error Cannot find hp2ps: $(HP2PS_ABS))
index be7023a..5b6e166 100644 (file)
@@ -32,6 +32,7 @@ $(TIMEOUT_PROGRAM): timeout.hs
        $(TEST_HC) --make Setup
        ./Setup configure --with-compiler=$(TEST_HC) \
                          --with-hc-pkg=$(GHC_PKG) \
+                         --with-hsc2hs=$(HSC2HS) \
                          $(WITH_GCC) \
                          --ghc-option=-threaded --prefix=$(PREFIX)
        ./Setup build