summaryrefslogtreecommitdiff
path: root/rules/build-package.mk
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2011-11-19 01:29:05 +0000
committerIan Lynagh <igloo@earth.li>2011-11-19 01:52:32 +0000
commit80e9070c77718b7ff0e913182e54842754726ce8 (patch)
tree12804916372a3675a7d1beb00bd41e70083c5edf /rules/build-package.mk
parent042841713eb6468696eeb437de994c52eb7a858e (diff)
downloadhaskell-80e9070c77718b7ff0e913182e54842754726ce8.tar.gz
Improve the way we call "rm" in the build system; fixes trac #4916
We avoid calling "rm -rf" with no file arguments; this fixes cleaning on Solaris, where that fails. We also check for suspicious arguments: anything containing "..", starting "/", or containing a "*" (you need to call $(wildcard ...) yourself now if you really want globbing). This should make things a little safer.
Diffstat (limited to 'rules/build-package.mk')
-rw-r--r--rules/build-package.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/rules/build-package.mk b/rules/build-package.mk
index 32556579cb..d83a79d89d 100644
--- a/rules/build-package.mk
+++ b/rules/build-package.mk
@@ -47,8 +47,8 @@ maintainer-clean : distclean
.PHONY: clean_$1_$2_config
clean_$1_$2_config:
- "$$(RM)" $$(RM_OPTS) $1/config.log $1/config.status $1/include/Hs*Config.h
- "$$(RM)" $$(RM_OPTS_REC) $1/autom4te.cache
+ $$(call removeFiles,$1/config.log $1/config.status $(wildcard $1/include/Hs*Config.h))
+ $$(call removeTrees,$1/autom4te.cache)
ifneq "$$($1_$2_NOT_NEEDED)" "YES"
$$(eval $$(call build-package-helper,$1,$2,$3))