summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-06-16 08:44:51 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-06-16 08:44:51 +0000
commit39253008705e3ca590afdfa1b87bfbb5a16da7e7 (patch)
tree32557e33997a574e2cedb0570ef4d299463f1772
parent47e182d4873add885735b831f3528ee5c208cca9 (diff)
downloadhaskell-39253008705e3ca590afdfa1b87bfbb5a16da7e7.tar.gz
eliminate "warning: overriding commnds..." from make when we're cleaning
-rw-r--r--rules/build-perl.mk3
-rw-r--r--rules/build-prog.mk2
2 files changed, 4 insertions, 1 deletions
diff --git a/rules/build-perl.mk b/rules/build-perl.mk
index 468572c571..57406766ca 100644
--- a/rules/build-perl.mk
+++ b/rules/build-perl.mk
@@ -34,6 +34,8 @@ $(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
@@ -53,5 +55,6 @@ $$($1_$2_INPLACE): $1/$2/$$($1_$2_PROG)
"$$(CP)" $$< $$@
$$(EXECUTABLE_FILE) $$@
endif
+endif
endef
diff --git a/rules/build-prog.mk b/rules/build-prog.mk
index 321de02241..6910e8f6e8 100644
--- a/rules/build-prog.mk
+++ b/rules/build-prog.mk
@@ -137,7 +137,7 @@ $(call all-target,$1_$2,$$($1_$2_INPLACE))
$(call clean-target,$1,$2_inplace,$$($1_$2_INPLACE))
# INPLACE_BIN might be empty if we're distcleaning
-ifneq "$$(INPLACE_BIN)" ""
+ifeq "$(findstring clean,$(MAKECMDGOALS))" ""
$$($1_$2_INPLACE) : $1/$2/build/tmp/$$($1_$2_PROG) $$(MKDIRHIER)
"$$(MKDIRHIER)" $$(dir $$@)
"$$(CP)" -p $$< $$@