From: malcolm Date: Thu, 10 Mar 2005 17:58:43 +0000 (+0000) Subject: [project @ 2005-03-10 17:58:42 by malcolm] X-Git-Tag: Initial_conversion_from_CVS_complete~921 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=81ab057b18a5d75335eef08eb65abb65d60ef7c7;p=ghc-hetmet.git [project @ 2005-03-10 17:58:42 by malcolm] Define __CYGWIN32__ for nhc98 build of hsc2hs. --- diff --git a/ghc/utils/hsc2hs/Main.hs b/ghc/utils/hsc2hs/Main.hs index 02bcb89..420111a 100644 --- a/ghc/utils/hsc2hs/Main.hs +++ b/ghc/utils/hsc2hs/Main.hs @@ -1,7 +1,7 @@ {-# OPTIONS -fffi -cpp #-} ------------------------------------------------------------------------ --- $Id: Main.hs,v 1.71 2005/01/29 12:15:33 ross Exp $ +-- $Id: Main.hs,v 1.72 2005/03/10 17:58:42 malcolm Exp $ -- -- Program for converting .hsc files to .hs files, by converting the -- file into a C program which is run to generate the Haskell source. @@ -512,7 +512,7 @@ output flags name toks = do let cProgName = outDir++outBase++"_hsc_make.c" oProgName = outDir++outBase++"_hsc_make.o" progName = outDir++outBase++"_hsc_make" -#if defined(mingw32_HOST_OS) +#if defined(mingw32_HOST_OS) || defined(__CYGWIN32__) -- This is a real hack, but the quoting mechanism used for calling the C preprocesseor -- via GHC has changed a few times, so this seems to be the only way... :-P * * * ++ ".exe" @@ -873,7 +873,7 @@ showCString = concatMap showCChar -- Convert paths foo/baz to foo\baz on Windows dosifyPath, unDosifyPath :: String -> String -#if defined(mingw32_HOST_OS) +#if defined(mingw32_HOST_OS) || defined(__CYGWIN32__) dosifyPath xs = subst '/' '\\' xs unDosifyPath xs = subst '\\' '/' xs diff --git a/ghc/utils/hsc2hs/Makefile.nhc98 b/ghc/utils/hsc2hs/Makefile.nhc98 index d853584..a35a0dc 100644 --- a/ghc/utils/hsc2hs/Makefile.nhc98 +++ b/ghc/utils/hsc2hs/Makefile.nhc98 @@ -34,7 +34,7 @@ realclean: clean cleanC $(TARGET): $(OBJDIR) $(SRCS) $(HMAKE) -hc=$(HC) Main -d$(OBJDIR) -DBUILD_NHC \ - $(shell echo "${BUILDOPTS}") $(HFLAGS) + $(shell echo "${BUILDOPTS}") $(HFLAGS) $(CYGFLAG) mv $(OBJDIR)/Main$(EXE) $(TARGET) $(STRIP) $(TARGET)