X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rules%2Fbuild-perl.mk;h=669f3d7be4fc7c6a74e2457057991a7f84ba3a76;hb=071f080ab938648063db1e3c9e0b4d01e9621b1f;hp=468572c5714856515446a053aba1b00e14c0777b;hpb=0ef6ba7b28187a4bf5309f9702eeaf53a281204b;p=ghc-hetmet.git diff --git a/rules/build-perl.mk b/rules/build-perl.mk index 468572c..669f3d7 100644 --- a/rules/build-perl.mk +++ b/rules/build-perl.mk @@ -22,8 +22,8 @@ define build-perl # $1 = dir # $2 = distdir -ifeq "$$($1_$2_LIBEXEC)" "YES" -$1_$2_INPLACE = $(INPLACE_LIB)/$$($1_$2_PROG) +ifeq "$$($1_$2_TOPDIR)" "YES" +$1_$2_INPLACE = $(INPLACE_TOPDIR)/$$($1_$2_PROG) else $1_$2_INPLACE = $(INPLACE_BIN)/$$($1_$2_PROG) endif @@ -34,10 +34,10 @@ $(call clean-target,$1,$2,$1/$2 $$($1_$2_INPLACE)) .PHONY: clean_$1 clean_$1 : clean_$1_$2 +# INPLACE_BIN etc. might be empty if we're cleaning +ifeq "$(findstring clean,$(MAKECMDGOALS))" "" ifneq "$$(BINDIST)" "YES" -$1/$2/$$($1_$2_PROG).prl: $1/$$($1_PERL_SRC) $$(UNLIT) - "$$(MKDIRHIER)" $1/$2 - "$$(RM)" $$(RM_OPTS) $$@ +$1/$2/$$($1_$2_PROG).prl: $1/$$($1_PERL_SRC) $$(UNLIT) | $$$$(dir $$$$@)/. "$$(UNLIT)" $$(UNLIT_OPTS) $$< $$@ $1/$2/$$($1_$2_PROG): $1/$2/$$($1_$2_PROG).prl @@ -47,11 +47,10 @@ $1/$2/$$($1_$2_PROG): $1/$2/$$($1_$2_PROG).prl cat $$< >> $$@ $$(EXECUTABLE_FILE) $$@ -$$($1_$2_INPLACE): $1/$2/$$($1_$2_PROG) - "$$(MKDIRHIER)" $$(dir $$@) - "$$(RM)" $$(RM_OPTS) $$@ +$$($1_$2_INPLACE): $1/$2/$$($1_$2_PROG) | $$$$(dir $$$$@)/. "$$(CP)" $$< $$@ $$(EXECUTABLE_FILE) $$@ endif +endif endef