summaryrefslogtreecommitdiff
path: root/utils/mkdirhier/ghc.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 /utils/mkdirhier/ghc.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 'utils/mkdirhier/ghc.mk')
-rw-r--r--utils/mkdirhier/ghc.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/mkdirhier/ghc.mk b/utils/mkdirhier/ghc.mk
index fe7a47b2c4..0d0013e02f 100644
--- a/utils/mkdirhier/ghc.mk
+++ b/utils/mkdirhier/ghc.mk
@@ -14,7 +14,7 @@ $(MKDIRHIER) : utils/mkdirhier/mkdirhier.sh
-mkdir $(INPLACE)
-mkdir $(INPLACE_BIN)
-mkdir $(INPLACE_LIB)
- "$(RM)" $(RM_OPTS) $@
+ $(call removeFiles,$@)
echo '#!$(SHELL)' >> $@
cat utils/mkdirhier/mkdirhier.sh >> $@
$(EXECUTABLE_FILE) $@