put template-hsc.h in $(topdir) in an installation (on Unix)
authorSimon Marlow <marlowsd@gmail.com>
Thu, 17 Sep 2009 09:39:14 +0000 (09:39 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Thu, 17 Sep 2009 09:39:14 +0000 (09:39 +0000)
and make sure hsc2hs can find it

ghc.mk
hsc2hs.wrapper

diff --git a/ghc.mk b/ghc.mk
index e509b84..8af2458 100644 (file)
--- a/ghc.mk
+++ b/ghc.mk
@@ -21,7 +21,7 @@ utils/hsc2hs_dist-install_MODULES = $(utils/hsc2hs_dist_MODULES)
 utils/hsc2hs_dist_HC_OPTS         += -DNEW_GHC_LAYOUT
 utils/hsc2hs_dist-install_HC_OPTS += -DNEW_GHC_LAYOUT
 
-utils/hsc2hs_template=$(INPLACE_LIB)/template-hsc.h
+utils/hsc2hs_template=$(INPLACE_TOPDIR)/template-hsc.h
 
 ifneq "$(BINDIST)" "YES"
 
@@ -48,7 +48,7 @@ install: install_utils/hsc2hs_dist_install
 
 .PHONY: install_utils/hsc2hs_dist_install
 install_utils/hsc2hs_dist_install: utils/hsc2hs/template-hsc.h
-       $(INSTALL_DATA) $(INSTALL_OPTS) $< $(DESTDIR)$(datadir)
+       $(INSTALL_HEADER) $(INSTALL_OPTS) $< $(DESTDIR)$(topdir)
 
 BINDIST_EXTRAS += utils/hsc2hs/template-hsc.h
 
index 50116bb..1b675c2 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
-tflag="--template=$datadir/template-hsc.h"
-Iflag="-I$datadir/../include/"
+tflag="--template=$topdir/template-hsc.h"
+Iflag="-I$topdir/include/"
 for arg do
     case "$arg" in
         -c*)          HSC2HS_EXTRA=;;