diff options
author | Ian Lynagh <igloo@earth.li> | 2008-07-05 18:58:29 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2008-07-05 18:58:29 +0000 |
commit | 2ef4a7e8d1bed972c9be694ab04158c2c3142792 (patch) | |
tree | 32b46a174d24841d6b724ae09d80005c80330ff8 /utils/hsc2hs | |
parent | 1cb262099e1d777a0413517633ba9de85d647635 (diff) | |
download | haskell-2ef4a7e8d1bed972c9be694ab04158c2c3142792.tar.gz |
Fix hsc2hs finding its template file on Windows
Diffstat (limited to 'utils/hsc2hs')
-rw-r--r-- | utils/hsc2hs/Main.hs | 8 | ||||
-rw-r--r-- | utils/hsc2hs/Makefile | 4 | ||||
-rw-r--r-- | utils/hsc2hs/hsc2hs.cabal | 7 |
3 files changed, 13 insertions, 6 deletions
diff --git a/utils/hsc2hs/Main.hs b/utils/hsc2hs/Main.hs index b291fd2abb..b422986967 100644 --- a/utils/hsc2hs/Main.hs +++ b/utils/hsc2hs/Main.hs @@ -58,6 +58,9 @@ import System ( system ) #endif #endif +import Distribution.Text +import qualified Paths_hsc2hs + version :: String version = "hsc2hs version 0.66\n" @@ -137,7 +140,10 @@ main = do case mb_path of Nothing -> return id Just path -> do - let templ = path ++ "/template-hsc.h" + -- Euch, this is horrible. Unfortunately + -- Paths_hsc2hs isn't too useful for a + -- relocatable binary, though. + let templ = path ++ "/hsc2hs-" ++ display Paths_hsc2hs.version ++ "/template-hsc.h" flg <- doesFileExist templ if flg then return ((Template templ):) diff --git a/utils/hsc2hs/Makefile b/utils/hsc2hs/Makefile index 46041716fd..3eeafa295a 100644 --- a/utils/hsc2hs/Makefile +++ b/utils/hsc2hs/Makefile @@ -3,7 +3,9 @@ TOP=../.. include $(TOP)/mk/boilerplate.mk include $(TOP)/mk/cabal-flags.mk -SRC_HC_OPTS += -Wall +# XXX We would like to turn thsi on, but Cabal generates paths files +# that are not -Wall clean! +# SRC_HC_OPTS += -Wall CABAL = $(FPTOOLS_TOP_ABS)/libraries/cabal-bin \ $(GHC) $(FPTOOLS_TOP_ABS)/libraries/bootstrapping.conf diff --git a/utils/hsc2hs/hsc2hs.cabal b/utils/hsc2hs/hsc2hs.cabal index 1e84ff3d11..8d06366090 100644 --- a/utils/hsc2hs/hsc2hs.cabal +++ b/utils/hsc2hs/hsc2hs.cabal @@ -34,9 +34,8 @@ Executable hsc2hs if flag(base3) Build-Depends: base >= 3 && < 4, directory >= 1 && < 1.1, - process >= 1 && < 1.1, - haskell98 + process >= 1 && < 1.1 else - Build-Depends: base < 3, - haskell98 + Build-Depends: base < 3 + Build-Depends: haskell98, Cabal |