aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-26 18:09:13 +0000
committerqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-26 18:09:13 +0000
commit3f09efbf82b165c675996cc863a4f66621722fe7 (patch)
treee53a3d845d423a1fdb2f77237430bdcf5fe462bc /Makefile
parent9fad40167e24addbbd713b0353b69894009c7044 (diff)
Since all shells aren't as awesome as bash, we have to fail if somebody tries to use a literal "~" in DESTDIR.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@104139 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 8 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 534367237..c7f166150 100644
--- a/Makefile
+++ b/Makefile
@@ -498,7 +498,14 @@ oldmodcheck:
echo " WARNING WARNING WARNING" ;\
fi
-install: datafiles bininstall $(SUBDIRS_INSTALL)
+badshell:
+ifneq ($(findstring ~,$(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
+endif
+
+install: badshell datafiles bininstall $(SUBDIRS_INSTALL)
@if [ -x /usr/sbin/asterisk-post-install ]; then \
/usr/sbin/asterisk-post-install $(DESTDIR) . ; \
fi