[asterisk-commits] qwell: branch 1.4 r104139 - /branches/1.4/Makefile

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Feb 26 12:09:14 CST 2008


Author: qwell
Date: Tue Feb 26 12:09:13 2008
New Revision: 104139

URL: http://svn.digium.com/view/asterisk?view=rev&rev=104139
Log:
Since all shells aren't as awesome as bash, we have to fail if somebody tries to use a literal "~" in DESTDIR.

Modified:
    branches/1.4/Makefile

Modified: branches/1.4/Makefile
URL: http://svn.digium.com/view/asterisk/branches/1.4/Makefile?view=diff&rev=104139&r1=104138&r2=104139
==============================================================================
--- branches/1.4/Makefile (original)
+++ branches/1.4/Makefile Tue Feb 26 12:09:13 2008
@@ -498,7 +498,14 @@
 		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




More information about the asterisk-commits mailing list