Commit 7cef4375 authored by ian@well-typed.com's avatar ian@well-typed.com

Automatically define _INPLACE variables for perl programs too

and use them for split
parent 2bdc4fdc
......@@ -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' >> $@
......
......@@ -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
......
......@@ -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"
......
......@@ -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
......
......@@ -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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment