From c140c1415a91991c617f8ba153b54e6e69cf9640 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Thu, 6 Sep 2007 12:20:36 +0000 Subject: [PATCH] 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. --- aclocal.m4 | 3 --- compiler/Makefile | 8 ++------ mk/config.mk.in | 5 ++--- utils/ghc-pkg/Makefile | 6 +----- utils/hsc2hs/Makefile | 6 +----- 5 files changed, 6 insertions(+), 22 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index db0904b..d30b101 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 dd96bff..f3cd6ea 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 417d6e4..7e00d18 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 67ed7ce..d456750 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 29995d0..b9bcaf1 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 $@ -- 1.7.10.4