Improve the way we call "rm" in the build system; fixes trac #4916
authorIan Lynagh <igloo@earth.li>
Sat, 19 Nov 2011 01:29:05 +0000 (01:29 +0000)
committerIan Lynagh <igloo@earth.li>
Sat, 19 Nov 2011 01:52:32 +0000 (01:52 +0000)
commit80e9070c77718b7ff0e913182e54842754726ce8
tree12804916372a3675a7d1beb00bd41e70083c5edf
parent042841713eb6468696eeb437de994c52eb7a858e
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.
19 files changed:
compiler/ghc.mk
docs/man/ghc.mk
driver/ghci/ghc.mk
ghc.mk
ghc/ghc.mk
includes/ghc.mk
libffi/ghc.mk
mk/tree.mk
rules/build-dependencies.mk
rules/build-package-way.mk
rules/build-package.mk
rules/build-perl.mk
rules/clean-target.mk
rules/docbook.mk
rules/manual-package-config.mk
rules/shell-wrapper.mk
utils/ghc-pkg/ghc.mk
utils/mkdirhier/ghc.mk
utils/runghc/ghc.mk