]> 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:30:34 +0000 (14:30 +0000)
committerMatthew Jordan <mjordan@digium.com>
Wed, 13 Jun 2012 14:30:34 +0000 (14:30 +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.
........

Merged revisions 368852 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

Makefile

index fc8ac6795686f67872c358ea8db7339ec91da9c9..f302ce68802fe57228cf96a1f094346191486041 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -476,7 +476,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" \
@@ -489,7 +489,7 @@ INSTALLDIRS="$(MODULES_DIR)" "$(ASTSBINDIR)" "$(ASTETCDIR)" "$(ASTVARRUNDIR)" \
 
 installdirs:
        @for i in $(INSTALLDIRS); do \
-               if [ ! -d "$(DESTDIR)$${i}" ]; then \
+               if [ ! -z "$${i}" -a ! -d "$(DESTDIR)$${i}" ]; then \
                        $(INSTALL) -d "$(DESTDIR)$${i}"; \
                fi; \
        done