summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2007-09-06 12:20:36 +0000
committerIan Lynagh <igloo@earth.li>2007-09-06 12:20:36 +0000
commitc140c1415a91991c617f8ba153b54e6e69cf9640 (patch)
tree0f98d50cbf17bd315eae612f8b459f361a3b1a8f
parentb7f448a4ebb2b924f279bf49432f07338f41a764 (diff)
downloadhaskell-c140c1415a91991c617f8ba153b54e6e69cf9640.tar.gz
Remove hardtop_plat/FPTOOLS_TOP_ABS_PLATFORM
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.
-rw-r--r--aclocal.m43
-rw-r--r--compiler/Makefile8
-rw-r--r--mk/config.mk.in5
-rw-r--r--utils/ghc-pkg/Makefile6
-rw-r--r--utils/hsc2hs/Makefile6
5 files changed, 6 insertions, 22 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index db0904beb0..d30b10146d 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -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})
diff --git a/compiler/Makefile b/compiler/Makefile
index dd96bff2dd..f3cd6eaca2 100644
--- a/compiler/Makefile
+++ b/compiler/Makefile
@@ -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)
diff --git a/mk/config.mk.in b/mk/config.mk.in
index 417d6e4583..7e00d1852d 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -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@
diff --git a/utils/ghc-pkg/Makefile b/utils/ghc-pkg/Makefile
index 67ed7ceb0c..d456750c3a 100644
--- a/utils/ghc-pkg/Makefile
+++ b/utils/ghc-pkg/Makefile
@@ -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 $@
diff --git a/utils/hsc2hs/Makefile b/utils/hsc2hs/Makefile
index 29995d0480..b9bcaf1c40 100644
--- a/utils/hsc2hs/Makefile
+++ b/utils/hsc2hs/Makefile
@@ -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 $@