]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
build: Relax badshell tilde test to allow for ~ in middle of DESTDIR.
authorWalter Doekes <walter+asterisk@wjd.nu>
Sun, 12 Oct 2014 07:50:23 +0000 (07:50 +0000)
committerWalter Doekes <walter+asterisk@wjd.nu>
Sun, 12 Oct 2014 07:50:23 +0000 (07:50 +0000)
The main Makefile has a target test called 'badshell' that tests if
DESTDIR does not happen to have an an-expanded tilde (~).  This might
be the case if you run: make install DESTDIR=~/somewhere/

That test also disallowed valid tildes in directory names. The test is
now changed to only trigger on a tilde at the start of the path.

ASTERISK-13797 #close
Reported by: Tzafrir Cohen

Review: https://reviewboard.asterisk.org/r/4064/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@425291 65c4cc65-6c06-0410-ace0-fbb531ad65f3

Makefile

index 36a8b7e0c5f97a4e371724b9ce5d8549433b35f7..91b2fb27e1fd3c894c1c803139cad0d2a9726399 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -539,7 +539,7 @@ oldmodcheck:
        fi
 
 badshell:
-ifneq ($(findstring ~,$(DESTDIR)),)
+ifneq ($(filter ~%,$(DESTDIR)),)
        @echo "Your shell doesn't do ~ expansion when expected (specifically, when doing \"make install DESTDIR=~/path\")."
        @echo "Try replacing ~ with \$$HOME, as in \"make install DESTDIR=\$$HOME/path\"."
        @exit 1