[commit: ghc] master: Automatically define _INPLACE variables for perl programs too (7cef437)

Ian Lynagh igloo at earth.li
Mon Mar 4 01:45:02 CET 2013


Repository : http://darcs.haskell.org/ghc.git/

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/7cef4375e696fd226399ea2b22efef0927680e8e

>---------------------------------------------------------------

commit 7cef4375e696fd226399ea2b22efef0927680e8e
Author: Ian Lynagh <ian at well-typed.com>
Date:   Sun Mar 3 22:29:57 2013 +0000

    Automatically define _INPLACE variables for perl programs too
    
    and use them for split

>---------------------------------------------------------------

 compiler/ghc.mk     | 2 +-
 driver/split/ghc.mk | 2 +-
 ghc/ghc.mk          | 6 +++---
 mk/config.mk.in     | 3 ---
 rules/build-perl.mk | 9 +++++++--
 5 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/compiler/ghc.mk b/compiler/ghc.mk
index a27208b..181aba9 100644
--- a/compiler/ghc.mk
+++ b/compiler/ghc.mk
@@ -104,7 +104,7 @@ endif
 	@echo 'cGHC_UNLIT_PGM        :: String'                             >> $@
 	@echo 'cGHC_UNLIT_PGM        = "$(utils/unlit_dist_PROG)"'          >> $@
 	@echo 'cGHC_SPLIT_PGM        :: String'                             >> $@
-	@echo 'cGHC_SPLIT_PGM        = "$(GHC_SPLIT_PGM)"'                  >> $@
+	@echo 'cGHC_SPLIT_PGM        = "$(driver/split_dist_PROG)"'         >> $@
 	@echo 'cLibFFI               :: Bool'                               >> $@
 ifeq "$(UseLibFFIForAdjustors)" "YES"
 	@echo 'cLibFFI               = True'                                >> $@
diff --git a/driver/split/ghc.mk b/driver/split/ghc.mk
index 11e3eed..9ee4cd6 100644
--- a/driver/split/ghc.mk
+++ b/driver/split/ghc.mk
@@ -11,7 +11,7 @@
 # -----------------------------------------------------------------------------
 
 driver/split_PERL_SRC  = ghc-split.lprl
-driver/split_dist_PROG = $(GHC_SPLIT_PGM)
+driver/split_dist_PROG = ghc-split
 driver/split_dist_TOPDIR = YES
 driver/split_dist_INSTALL = YES
 driver/split_dist_INSTALL_INPLACE = YES
diff --git a/ghc/ghc.mk b/ghc/ghc.mk
index 73d0253..292ae92 100644
--- a/ghc/ghc.mk
+++ b/ghc/ghc.mk
@@ -150,9 +150,9 @@ $(GHC_STAGE2) : | $(GHC_DEPENDENCIES)
 $(GHC_STAGE3) : | $(GHC_DEPENDENCIES)
 
 ifeq "$(GhcUnregisterised)" "NO"
-$(GHC_STAGE1) : | $(SPLIT)
-$(GHC_STAGE2) : | $(SPLIT)
-$(GHC_STAGE3) : | $(SPLIT)
+$(GHC_STAGE1) : | $$(ghc-split_INPLACE)
+$(GHC_STAGE2) : | $$(ghc-split_INPLACE)
+$(GHC_STAGE3) : | $$(ghc-split_INPLACE)
 endif
 
 ifeq "$(Windows_Host)" "YES"
diff --git a/mk/config.mk.in b/mk/config.mk.in
index 69bb2b8..5cd1667 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -434,9 +434,6 @@ SRC_FLEX_OPTS	+= -8
 #      xxx_PGM          the name of an executable, without the path
 #      xxx              the executable relative to the current dir
 
-GHC_SPLIT_PGM           = ghc-split
-
-SPLIT               = $(INPLACE_LIB)/$(GHC_SPLIT_PGM)
 TOUCHY              = $(INPLACE_LIB)/touchy$(exeext)
 MKDIRHIER           = $(INPLACE_BIN)/mkdirhier
 
diff --git a/rules/build-perl.mk b/rules/build-perl.mk
index ff2a6ff..2c1908d 100644
--- a/rules/build-perl.mk
+++ b/rules/build-perl.mk
@@ -24,12 +24,17 @@ $(call profStart, build-perl($1,$2))
 # $1 = dir
 # $2 = distdir
 
+ifneq "$$($$($1_$2_PROG)_INPLACE)" ""
+$$(error $$($1_$2_PROG)_INPLACE defined twice)
+endif
 ifeq "$$($1_$2_TOPDIR)" "YES"
-$1_$2_INPLACE = $$(INPLACE_TOPDIR)/$$($1_$2_PROG)
+$$($1_$2_PROG)_INPLACE = $$(INPLACE_TOPDIR)/$$($1_$2_PROG)
 else
-$1_$2_INPLACE = $$(INPLACE_BIN)/$$($1_$2_PROG)
+$$($1_$2_PROG)_INPLACE = $$(INPLACE_BIN)/$$($1_$2_PROG)
 endif
 
+$1_$2_INPLACE = $$($$($1_$2_PROG)_INPLACE)
+
 $(call all-target,$1_$2,$$($1_$2_INPLACE))
 
 $(call clean-target,$1,$2,$1/$2 $$($1_$2_INPLACE))





More information about the ghc-commits mailing list