]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Do not install empty directories; add ASTLIBDIR
authorMatthew Jordan <mjordan@digium.com>
Wed, 13 Jun 2012 14:27:57 +0000 (14:27 +0000)
committerMatthew Jordan <mjordan@digium.com>
Wed, 13 Jun 2012 14:27:57 +0000 (14:27 +0000)
r368830 modified the installation script to only create a directory if that
directory does not exist.  If some directory variable was empty, it would attempt
to create the empty location.  It also failed to create the ASTLIBDIR directory.
This patch fixes it such that the correct directories are made and only created if
a value specifying them actually exists.

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

Makefile

index a8e4b57389785138f3c4ffa7e052394efd829add..8e5537f73761f5fa57800f4e6acb2bcd98e2df06 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -466,7 +466,7 @@ update:
 
 NEWHEADERS=$(notdir $(wildcard include/asterisk/*.h))
 OLDHEADERS=$(filter-out $(NEWHEADERS) $(notdir $(DESTDIR)$(ASTHEADERDIR)),$(notdir $(wildcard $(DESTDIR)$(ASTHEADERDIR)/*.h)))
-INSTALLDIRS="$(MODULES_DIR)" "$(ASTSBINDIR)" "$(ASTETCDIR)" "$(ASTVARRUNDIR)" \
+INSTALLDIRS="$(ASTLIBDIR)" "$(MODULES_DIR)" "$(ASTSBINDIR)" "$(ASTETCDIR)" "$(ASTVARRUNDIR)" \
        "$(ASTSPOOLDIR)" "$(ASTSPOOLDIR)/dictate" "$(ASTSPOOLDIR)/meetme" \
        "$(ASTSPOOLDIR)/monitor" "$(ASTSPOOLDIR)/system" "$(ASTSPOOLDIR)/tmp" \
        "$(ASTSPOOLDIR)/voicemail" "$(ASTHEADERDIR)" "$(ASTHEADERDIR)/doxygen" \
@@ -478,8 +478,8 @@ INSTALLDIRS="$(MODULES_DIR)" "$(ASTSBINDIR)" "$(ASTETCDIR)" "$(ASTVARRUNDIR)" \
        "$(ASTDATADIR)/moh" "$(ASTMANDIR)/man8" "$(AGI_DIR)" "$(ASTDBDIR)"
 
 installdirs:
-       for i in $(INSTALLDIRS); do \
-               if [ ! -d "$(DESTDIR)$${i}" ]; then \
+       @for i in $(INSTALLDIRS); do \
+               if [ ! -z "$${i}" -a ! -d "$(DESTDIR)$${i}" ]; then \
                        $(INSTALL) -d "$(DESTDIR)$${i}"; \
                fi; \
        done