Merged revisions 333203 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/10

................
  r333203 | qwell | 2011-08-25 10:29:56 -0500 (Thu, 25 Aug 2011) | 15 lines
  
  Merged revisions 333201 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r333201 | qwell | 2011-08-25 10:27:06 -0500 (Thu, 25 Aug 2011) | 8 lines
    
    Fix installation into directories containing spaces.
    
    This also vastly simplifies the logic in sounds/Makefile
    
    (Closes issue ASTERISK-18290)
    Reported by: Paul Belanger
    Review: https://reviewboard.asterisk.org/r/1379/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@333204 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Jason Parker
2011-08-25 15:30:46 +00:00
parent 590391c038
commit 00a8f14fb1
6 changed files with 486 additions and 806 deletions

View File

@@ -555,6 +555,7 @@ installdirs:
$(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/keys"
$(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/phoneprov"
$(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/static-http"
$(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/sounds"
$(INSTALL) -d "$(DESTDIR)$(ASTMANDIR)/man8"
$(INSTALL) -d "$(DESTDIR)$(AGI_DIR)"
$(INSTALL) -d "$(DESTDIR)$(ASTDBDIR)"
@@ -617,17 +618,7 @@ ifneq ($(findstring ~,$(DESTDIR)),)
@exit 1
endif
preinstall_spaces:
ifneq ($(MAKE_PREINSTALL),)
$(MAKE_PREINSTALL)
endif
postinstall_spaces:
ifneq ($(MAKE_POSTINSTALL),)
$(MAKE_POSTINSTALL)
endif
install: preinstall_spaces badshell bininstall datafiles postinstall_spaces
install: badshell bininstall datafiles
@if [ -x /usr/sbin/asterisk-post-install ]; then \
/usr/sbin/asterisk-post-install "$(DESTDIR)" . ; \
fi
@@ -664,32 +655,32 @@ adsi:
$(INSTALL) -d "$(DESTDIR)$(ASTETCDIR)"
@for x in configs/*.adsi; do \
dst="$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x`" ; \
if [ -f $${dst} ] ; then \
if [ -f "$${dst}" ] ; then \
echo "Overwriting $$x" ; \
else \
echo "Installing $$x" ; \
fi ; \
$(INSTALL) -m 644 $$x "$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x`" ; \
$(INSTALL) -m 644 "$$x" "$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x`" ; \
done
samples: adsi
@echo Installing other config files...
@for x in configs/*.sample; do \
dst="$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample`" ; \
if [ -f $${dst} ]; then \
if [ -f "$${dst}" ]; then \
if [ "$(OVERWRITE)" = "y" ]; then \
if cmp -s $${dst} $$x ; then \
if cmp -s "$${dst}" "$$x" ; then \
echo "Config file $$x is unchanged"; \
continue; \
fi ; \
mv -f $${dst} $${dst}.old ; \
mv -f "$${dst}" "$${dst}.old" ; \
else \
echo "Skipping config file $$x"; \
continue; \
fi ;\
fi ; \
echo "Installing file $$x"; \
$(INSTALL) -m 644 $$x $${dst} ;\
$(INSTALL) -m 644 "$$x" "$${dst}" ;\
done
if [ "$(OVERWRITE)" = "y" ]; then \
echo "Updating asterisk.conf" ; \