Remove hardtop_plat/FPTOOLS_TOP_ABS_PLATFORM
authorIan Lynagh <igloo@earth.li>
Thu, 6 Sep 2007 12:20:36 +0000 (12:20 +0000)
committerIan Lynagh <igloo@earth.li>
Thu, 6 Sep 2007 12:20:36 +0000 (12:20 +0000)
They are now the same as hardtop/FPTOOLS_TOP_ABS, so use those instead.

Also removed some substitutions of / for \, as we now use a Haskell
program to find the top path, and it only makes paths with /s in.

aclocal.m4
compiler/Makefile
mk/config.mk.in
utils/ghc-pkg/Makefile
utils/hsc2hs/Makefile

index db0904b..d30b101 100644 (file)
@@ -1121,10 +1121,7 @@ dnl Remove common automounter nonsense
 dnl
 hardtop=`echo $hardtop | sed 's|^/tmp_mnt.*\(/local/.*\)$|\1|' | sed 's|^/tmp_mnt/|/|'`
 
-hardtop_plat="$hardtop"
-
 AC_SUBST(hardtop)
-AC_SUBST(hardtop_plat)
 
 AC_MSG_RESULT(${hardtop})
 
index dd96bff..f3cd6ea 100644 (file)
@@ -734,18 +734,14 @@ SRC_LD_OPTS += -no-link-chk
 INPLACE_PROG = $(odir)/ghc-inplace$(exeext)
 EXCLUDED_C_SRCS += ghc-inplace.c
 
-# FPTOOLS_TOP_ABS platform uses backslashes, at least on Cygwin, but that
-# will go wrong when we use it in a Haskell string below.
-TOP_ABS=$(subst \\,/,$(FPTOOLS_TOP_ABS_PLATFORM))
-
-GHC_PATH=$(TOP_ABS)/$(GHC_COMPILER_DIR_REL)/$(GHC_PROG)$(exeext)
+GHC_PATH=$(FPTOOLS_TOP_ABS)/$(GHC_COMPILER_DIR_REL)/$(GHC_PROG)$(exeext)
 
 ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32"
 INPLACE_EXTRA_FLAGS = -optc-DWINDOWS
 endif
 
 $(INPLACE_PROG): ghc-inplace.c
-       $(HC) -cpp -optc-DGHC_PATH=$(DQ)$(GHC_PATH)$(DQ) -optc-DTOP_ABS=$(DQ)$(TOP_ABS)$(DQ) $(INPLACE_EXTRA_FLAGS) $< -o $@
+       $(HC) -cpp -optc-DGHC_PATH=$(DQ)$(GHC_PATH)$(DQ) -optc-DTOP_ABS=$(DQ)$(FPTOOLS_TOP_ABS)$(DQ) $(INPLACE_EXTRA_FLAGS) $< -o $@
 
 all :: $(INPLACE_PROG)
 
index 417d6e4..7e00d18 100644 (file)
@@ -497,10 +497,9 @@ ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
 DEFAULT_TMPDIR         = /C/TEMP
 endif
 
-# FPTOOLS_TOP: the top of the fptools hierarchy, absolute path. (POSIX / unix-style path).
+# FPTOOLS_TOP: the top of the fptools hierarchy, absolute path.
+# On Windows this is a c:/foo/bar style path.
 FPTOOLS_TOP_ABS                = @hardtop@
-# The platform specific version of 'hardtop'.
-FPTOOLS_TOP_ABS_PLATFORM = @hardtop_plat@
 
 # This gets used in the default docdir
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
index 67ed7ce..d456750 100644 (file)
@@ -65,13 +65,9 @@ INPLACE_HS=ghc-pkg-inplace.hs
 INPLACE_PROG=ghc-pkg-inplace
 EXCLUDED_SRCS+=$(INPLACE_HS)
 
-# FPTOOLS_TOP_ABS platform uses backslashes, at least on Cygwin, but that
-# will go wrong when we use it in a Haskell string below.
-TOP_ABS=$(subst \\,/,$(FPTOOLS_TOP_ABS_PLATFORM))
-
 $(INPLACE_HS): Makefile $(FPTOOLS_TOP)/mk/config.mk
        echo "import System.Cmd; import System.Environment; import System.Exit" > $@
-       echo "main = do args <- getArgs; rawSystem \"$(TOP_ABS)/$(GHC_PKG_DIR_REL)/$(HS_PROG)\" (\"--global-conf\":\"$(TOP_ABS)/driver/package.conf.inplace\":args) >>= exitWith" >> $@
+       echo "main = do args <- getArgs; rawSystem \"$(FPTOOLS_TOP_ABS)/$(GHC_PKG_DIR_REL)/$(HS_PROG)\" (\"--global-conf\":\"$(FPTOOLS_TOP_ABS)/driver/package.conf.inplace\":args) >>= exitWith" >> $@
 
 $(INPLACE_PROG): $(INPLACE_HS)
        $(HC) --make $< -o $@
index 29995d0..b9bcaf1 100644 (file)
@@ -33,10 +33,6 @@ INPLACE_HS=hsc2hs-inplace.hs
 INPLACE_PROG=hsc2hs-inplace
 EXCLUDED_SRCS+=$(INPLACE_HS)
 
-# FPTOOLS_TOP_ABS platform uses backslashes, at least on Cygwin, but that
-# will go wrong when we use it in a Haskell string below.
-TOP_ABS=$(subst \\,/,$(FPTOOLS_TOP_ABS_PLATFORM))
-
 ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32"
 extra_flags=$(addprefix --cflag=,$(filter-out -O,$(SRC_CC_OPTS)))
 else
@@ -45,7 +41,7 @@ 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 \"$(TOP_ABS)/$(GHC_HSC2HS_DIR_REL)/$(HS_PROG)\" (\"--template=$(TOP_ABS)/$(GHC_HSC2HS_DIR_REL)/template-hsc.h\":\"--cc=$(CC)\":\"--ld=$(CC)\"$(patsubst %,:\"%\",$(extra_flags)):\"--cflag=-D__GLASGOW_HASKELL__=$(ProjectVersionInt)\":\"-I$(TOP_ABS)/$(GHC_INCLUDE_DIR_REL)\":\"-I$(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\":args) >>= exitWith" >> $@
 
 $(INPLACE_PROG): $(INPLACE_HS)
        $(HC) --make $< -o $@