[svn-commits] tilghman: trunk r332388 - in /trunk: ./ agi/ include/asterisk/ sounds/ utils/
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Aug 17 14:30:55 CDT 2011
Author: tilghman
Date: Wed Aug 17 14:30:50 2011
New Revision: 332388
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=332388
Log:
Merged revisions 332369 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10
................
r332369 | tilghman | 2011-08-17 14:24:59 -0500 (Wed, 17 Aug 2011) | 17 lines
Merged revisions 332355 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r332355 | tilghman | 2011-08-17 14:21:36 -0500 (Wed, 17 Aug 2011) | 10 lines
Re-add support for spaces in pathnames, including now spaces in DESTDIR.
This was initially added to 1.8 prior to release, primarily to support the
standard paths on Mac OS X, but was partially reverted recently in Subversion,
due to the lack of support for spaces in DESTDIR. This commit restores support
for the standard paths on Mac OS X, and also includes support for spaces in
DESTDIR.
Review: https://reviewboard.asterisk.org/r/1326/
........
................
Modified:
trunk/ (props changed)
trunk/Makefile
trunk/Makefile.moddir_rules
trunk/agi/Makefile
trunk/configure
trunk/configure.ac
trunk/include/asterisk/autoconfig.h.in
trunk/makeopts.in
trunk/sounds/Makefile
trunk/utils/Makefile
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.
Modified: trunk/Makefile
URL: http://svnview.digium.com/svn/asterisk/trunk/Makefile?view=diff&rev=332388&r1=332387&r2=332388
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Wed Aug 17 14:30:50 2011
@@ -155,8 +155,8 @@
GLOBAL_MAKEOPTS=$(wildcard /etc/asterisk.makeopts)
USER_MAKEOPTS=$(wildcard ~/.asterisk.makeopts)
-MOD_SUBDIR_CFLAGS=-I$(ASTTOPDIR)/include
-OTHER_SUBDIR_CFLAGS=-I$(ASTTOPDIR)/include
+MOD_SUBDIR_CFLAGS="-I$(ASTTOPDIR)/include"
+OTHER_SUBDIR_CFLAGS="-I$(ASTTOPDIR)/include"
# Create OPTIONS variable, but probably we can assign directly to ASTCFLAGS
OPTIONS=
@@ -461,15 +461,15 @@
rm -f build_tools/menuselect-deps
datafiles: _all doc/core-en_US.xml
- CFLAGS="$(_ASTCFLAGS) $(ASTCFLAGS)" build_tools/mkpkgconfig $(DESTDIR)$(libdir)/pkgconfig;
+ CFLAGS="$(_ASTCFLAGS) $(ASTCFLAGS)" build_tools/mkpkgconfig "$(DESTDIR)$(libdir)/pkgconfig";
# Should static HTTP be installed during make samples or even with its own target ala
# webvoicemail? There are portions here that *could* be customized but might also be
# improved a lot. I'll put it here for now.
for x in static-http/*; do \
- $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTDATADIR)/static-http ; \
+ $(INSTALL) -m 644 $$x "$(DESTDIR)$(ASTDATADIR)/static-http" ; \
done
- $(INSTALL) -m 644 doc/core-en_US.xml $(DESTDIR)$(ASTDATADIR)/static-http;
+ $(INSTALL) -m 644 doc/core-en_US.xml "$(DESTDIR)$(ASTDATADIR)/static-http";
if [ -d doc/tex/asterisk ] ; then \
$(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/static-http/docs" ; \
for n in doc/tex/asterisk/* ; do \
@@ -477,7 +477,7 @@
done \
fi
for x in images/*.jpg; do \
- $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTDATADIR)/images ; \
+ $(INSTALL) -m 644 $$x "$(DESTDIR)$(ASTDATADIR)/images" ; \
done
$(MAKE) -C sounds install
@@ -526,7 +526,7 @@
fi
NEWHEADERS=$(notdir $(wildcard include/asterisk/*.h))
-OLDHEADERS=$(filter-out $(NEWHEADERS),$(notdir $(wildcard $(DESTDIR)$(ASTHEADERDIR)/*.h)))
+OLDHEADERS=$(filter-out $(NEWHEADERS) $(notdir $(DESTDIR)$(ASTHEADERDIR)),$(notdir $(wildcard $(DESTDIR)$(ASTHEADERDIR)/*.h)))
installdirs:
$(INSTALL) -d "$(DESTDIR)$(MODULES_DIR)"
@@ -560,37 +560,37 @@
$(INSTALL) -d "$(DESTDIR)$(ASTDBDIR)"
bininstall: _all installdirs $(SUBDIRS_INSTALL)
- $(INSTALL) -m 755 main/asterisk $(DESTDIR)$(ASTSBINDIR)/
- $(LN) -sf asterisk $(DESTDIR)$(ASTSBINDIR)/rasterisk
- $(INSTALL) -m 755 contrib/scripts/astgenkey $(DESTDIR)$(ASTSBINDIR)/
- $(INSTALL) -m 755 contrib/scripts/autosupport $(DESTDIR)$(ASTSBINDIR)/
- if [ ! -f $(DESTDIR)$(ASTSBINDIR)/safe_asterisk -a ! -f /sbin/launchd ]; then \
+ $(INSTALL) -m 755 main/asterisk "$(DESTDIR)$(ASTSBINDIR)/"
+ $(LN) -sf asterisk "$(DESTDIR)$(ASTSBINDIR)/rasterisk"
+ $(INSTALL) -m 755 contrib/scripts/astgenkey "$(DESTDIR)$(ASTSBINDIR)/"
+ $(INSTALL) -m 755 contrib/scripts/autosupport "$(DESTDIR)$(ASTSBINDIR)/"
+ if [ ! -f "$(DESTDIR)$(ASTSBINDIR)/safe_asterisk" -a ! -f /sbin/launchd ]; then \
cat contrib/scripts/safe_asterisk | sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;s|__ASTERISK_LOG_DIR__|$(ASTLOGDIR)|;' > contrib/scripts/safe.tmp ; \
- $(INSTALL) -m 755 contrib/scripts/safe.tmp $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ; \
+ $(INSTALL) -m 755 contrib/scripts/safe.tmp "$(DESTDIR)$(ASTSBINDIR)/safe_asterisk" ; \
rm -f contrib/scripts/safe.tmp ; \
fi
- $(INSTALL) -m 644 include/asterisk.h $(DESTDIR)$(includedir)
- $(INSTALL) -m 644 include/asterisk/*.h $(DESTDIR)$(ASTHEADERDIR)
- $(INSTALL) -m 644 include/asterisk/doxygen/*.h $(DESTDIR)$(ASTHEADERDIR)/doxygen
+ $(INSTALL) -m 644 include/asterisk.h "$(DESTDIR)$(includedir)"
+ $(INSTALL) -m 644 include/asterisk/*.h "$(DESTDIR)$(ASTHEADERDIR)"
+ $(INSTALL) -m 644 include/asterisk/doxygen/*.h "$(DESTDIR)$(ASTHEADERDIR)/doxygen"
if [ -n "$(OLDHEADERS)" ]; then \
- rm -f $(addprefix $(DESTDIR)$(ASTHEADERDIR)/,$(OLDHEADERS)) ;\
- fi
-
- $(INSTALL) -m 644 doc/core-*.xml $(DESTDIR)$(ASTDATADIR)/documentation
- $(INSTALL) -m 644 doc/appdocsxml.dtd $(DESTDIR)$(ASTDATADIR)/documentation
- $(INSTALL) -m 644 doc/asterisk.8 $(DESTDIR)$(ASTMANDIR)/man8
- $(INSTALL) -m 644 contrib/scripts/astgenkey.8 $(DESTDIR)$(ASTMANDIR)/man8
- $(INSTALL) -m 644 contrib/scripts/autosupport.8 $(DESTDIR)$(ASTMANDIR)/man8
- $(INSTALL) -m 644 contrib/scripts/safe_asterisk.8 $(DESTDIR)$(ASTMANDIR)/man8
+ for h in $(OLDHEADERS); do rm -f "$(DESTDIR)$(ASTHEADERDIR)/$$h"; done \
+ fi
+
+ $(INSTALL) -m 644 doc/core-*.xml "$(DESTDIR)$(ASTDATADIR)/documentation"
+ $(INSTALL) -m 644 doc/appdocsxml.dtd "$(DESTDIR)$(ASTDATADIR)/documentation"
+ $(INSTALL) -m 644 doc/asterisk.8 "$(DESTDIR)$(ASTMANDIR)/man8"
+ $(INSTALL) -m 644 contrib/scripts/astgenkey.8 "$(DESTDIR)$(ASTMANDIR)/man8"
+ $(INSTALL) -m 644 contrib/scripts/autosupport.8 "$(DESTDIR)$(ASTMANDIR)/man8"
+ $(INSTALL) -m 644 contrib/scripts/safe_asterisk.8 "$(DESTDIR)$(ASTMANDIR)/man8"
if [ -f contrib/firmware/iax/iaxy.bin ] ; then \
- $(INSTALL) -m 644 contrib/firmware/iax/iaxy.bin $(DESTDIR)$(ASTDATADIR)/firmware/iax/iaxy.bin; \
+ $(INSTALL) -m 644 contrib/firmware/iax/iaxy.bin "$(DESTDIR)$(ASTDATADIR)/firmware/iax/iaxy.bin"; \
fi
$(SUBDIRS_INSTALL):
+ at DESTDIR="$(DESTDIR)" ASTSBINDIR="$(ASTSBINDIR)" $(SUBMAKE) -C $(@:-install=) install
NEWMODS:=$(foreach d,$(MOD_SUBDIRS),$(notdir $(wildcard $(d)/*.so)))
-OLDMODS=$(filter-out $(NEWMODS),$(notdir $(wildcard $(DESTDIR)$(MODULES_DIR)/*.so)))
+OLDMODS=$(filter-out $(NEWMODS) $(notdir $(DESTDIR)$(MODULES_DIR)),$(notdir $(wildcard $(DESTDIR)$(MODULES_DIR)/*.so)))
oldmodcheck:
@if [ -n "$(OLDMODS)" ]; then \
@@ -617,9 +617,19 @@
@exit 1
endif
-install: badshell bininstall datafiles
+preinstall_spaces:
+ifneq ($(MAKE_PREINSTALL),)
+ $(MAKE_PREINSTALL)
+endif
+
+postinstall_spaces:
+ifneq ($(MAKE_POSTINSTALL),)
+ $(MAKE_POSTINSTALL)
+endif
+
+install: preinstall_spaces badshell bininstall datafiles postinstall_spaces
@if [ -x /usr/sbin/asterisk-post-install ]; then \
- /usr/sbin/asterisk-post-install $(DESTDIR) . ; \
+ /usr/sbin/asterisk-post-install "$(DESTDIR)" . ; \
fi
@echo " +---- Asterisk Installation Complete -------+"
@echo " + +"
@@ -651,7 +661,7 @@
# XXX why *.adsi is installed first ?
adsi:
@echo Installing adsi config files...
- $(INSTALL) -d $(DESTDIR)$(ASTETCDIR)
+ $(INSTALL) -d "$(DESTDIR)$(ASTETCDIR)"
@for x in configs/*.adsi; do \
dst="$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x`" ; \
if [ -f $${dst} ] ; then \
@@ -659,7 +669,7 @@
else \
echo "Installing $$x" ; \
fi ; \
- $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x` ; \
+ $(INSTALL) -m 644 $$x "$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x`" ; \
done
samples: adsi
@@ -693,38 +703,38 @@
-e 's|^astspooldir.*$$|astspooldir => $(ASTSPOOLDIR)|' \
-e 's|^astrundir.*$$|astrundir => $(ASTVARRUNDIR)|' \
-e 's|^astlogdir.*$$|astlogdir => $(ASTLOGDIR)|' \
- $(DESTDIR)$(ASTCONFPATH) > $(DESTDIR)$(ASTCONFPATH).tmp ; \
- $(INSTALL) -m 644 $(DESTDIR)$(ASTCONFPATH).tmp $(DESTDIR)$(ASTCONFPATH) ; \
- rm -f $(DESTDIR)$(ASTCONFPATH).tmp ; \
+ "$(DESTDIR)$(ASTCONFPATH)" > "$(DESTDIR)$(ASTCONFPATH).tmp" ; \
+ $(INSTALL) -m 644 "$(DESTDIR)$(ASTCONFPATH).tmp" "$(DESTDIR)$(ASTCONFPATH)" ; \
+ rm -f "$(DESTDIR)$(ASTCONFPATH).tmp" ; \
fi ; \
- $(INSTALL) -d $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/INBOX
- build_tools/make_sample_voicemail $(DESTDIR)/$(ASTDATADIR) $(DESTDIR)/$(ASTSPOOLDIR)
+ $(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/INBOX"
+ build_tools/make_sample_voicemail "$(DESTDIR)/$(ASTDATADIR)" "$(DESTDIR)/$(ASTSPOOLDIR)"
@for x in phoneprov/*; do \
dst="$(DESTDIR)$(ASTDATADIR)/$$x" ; \
- 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
webvmail:
- @[ -d $(DESTDIR)$(HTTP_DOCSDIR)/ ] || ( printf "http docs directory not found.\nUpdate assignment of variable HTTP_DOCSDIR in Makefile!\n" && exit 1 )
- @[ -d $(DESTDIR)$(HTTP_CGIDIR) ] || ( printf "cgi-bin directory not found.\nUpdate assignment of variable HTTP_CGIDIR in Makefile!\n" && exit 1 )
- $(INSTALL) -m 4755 contrib/scripts/vmail.cgi $(DESTDIR)$(HTTP_CGIDIR)/vmail.cgi
- $(INSTALL) -d $(DESTDIR)$(HTTP_DOCSDIR)/_asterisk
+ @[ -d "$(DESTDIR)$(HTTP_DOCSDIR)/" ] || ( printf "http docs directory not found.\nUpdate assignment of variable HTTP_DOCSDIR in Makefile!\n" && exit 1 )
+ @[ -d "$(DESTDIR)$(HTTP_CGIDIR)" ] || ( printf "cgi-bin directory not found.\nUpdate assignment of variable HTTP_CGIDIR in Makefile!\n" && exit 1 )
+ $(INSTALL) -m 4755 contrib/scripts/vmail.cgi "$(DESTDIR)$(HTTP_CGIDIR)/vmail.cgi"
+ $(INSTALL) -d "$(DESTDIR)$(HTTP_DOCSDIR)/_asterisk"
for x in images/*.gif; do \
- $(INSTALL) -m 644 $$x $(DESTDIR)$(HTTP_DOCSDIR)/_asterisk/; \
+ $(INSTALL) -m 644 $$x "$(DESTDIR)$(HTTP_DOCSDIR)/_asterisk/"; \
done
@echo " +--------- Asterisk Web Voicemail ----------+"
@echo " + +"
@@ -749,75 +759,75 @@
echo "PROJECT_NUMBER=$(ASTERISKVERSION)") | doxygen -
install-logrotate:
- if [ ! -d $(ASTETCDIR)/../logrotate.d ]; then \
- $(INSTALL) -d $(ASTETCDIR)/../logrotate.d ; \
+ if [ ! -d "$(DESTDIR)$(ASTETCDIR)/../logrotate.d" ]; then \
+ $(INSTALL) -d "$(DESTDIR)$(ASTETCDIR)/../logrotate.d" ; \
fi
sed 's#__LOGDIR__#$(ASTLOGDIR)#g' < contrib/scripts/asterisk.logrotate | sed 's#__SBINDIR__#$(ASTSBINDIR)#g' > contrib/scripts/asterisk.logrotate.tmp
- $(INSTALL) -m 0644 contrib/scripts/asterisk.logrotate.tmp $(ASTETCDIR)/../logrotate.d/asterisk
+ $(INSTALL) -m 0644 contrib/scripts/asterisk.logrotate.tmp "$(DESTDIR)$(ASTETCDIR)/../logrotate.d/asterisk"
rm -f contrib/scripts/asterisk.logrotate.tmp
config:
@if [ "${OSARCH}" = "linux-gnu" ]; then \
if [ -f /etc/redhat-release -o -f /etc/fedora-release ]; then \
cat contrib/init.d/rc.redhat.asterisk | sed 's|__ASTERISK_ETC_DIR__|$(ASTETCDIR)|;s|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;' > contrib/init.d/rc.asterisk.tmp ; \
- $(INSTALL) -m 755 contrib/init.d/rc.asterisk.tmp $(DESTDIR)/etc/rc.d/init.d/asterisk ; \
+ $(INSTALL) -m 755 contrib/init.d/rc.asterisk.tmp "$(DESTDIR)/etc/rc.d/init.d/asterisk" ; \
rm -f contrib/init.d/rc.asterisk.tmp ; \
- if [ ! -f $(DESTDIR)/etc/sysconfig/asterisk ] ; then \
- $(INSTALL) -m 644 contrib/init.d/etc_default_asterisk $(DESTDIR)/etc/sysconfig/asterisk ; \
+ if [ ! -f "$(DESTDIR)/etc/sysconfig/asterisk" ] ; then \
+ $(INSTALL) -m 644 contrib/init.d/etc_default_asterisk "$(DESTDIR)/etc/sysconfig/asterisk" ; \
fi ; \
if [ -z "$(DESTDIR)" ] ; then \
/sbin/chkconfig --add asterisk ; \
fi ; \
elif [ -f /etc/debian_version ] ; then \
cat contrib/init.d/rc.debian.asterisk | sed 's|__ASTERISK_ETC_DIR__|$(ASTETCDIR)|;s|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;' > contrib/init.d/rc.asterisk.tmp ; \
- $(INSTALL) -m 755 contrib/init.d/rc.asterisk.tmp $(DESTDIR)/etc/init.d/asterisk ; \
+ $(INSTALL) -m 755 contrib/init.d/rc.asterisk.tmp "$(DESTDIR)/etc/init.d/asterisk" ; \
rm -f contrib/init.d/rc.asterisk.tmp ; \
- if [ ! -f $(DESTDIR)/etc/default/asterisk ] ; then \
- $(INSTALL) -m 644 contrib/init.d/etc_default_asterisk $(DESTDIR)/etc/default/asterisk ; \
+ if [ ! -f "$(DESTDIR)/etc/default/asterisk" ] ; then \
+ $(INSTALL) -m 644 contrib/init.d/etc_default_asterisk "$(DESTDIR)/etc/default/asterisk" ; \
fi ; \
if [ -z "$(DESTDIR)" ] ; then \
/usr/sbin/update-rc.d asterisk defaults 50 91 ; \
fi ; \
elif [ -f /etc/gentoo-release ] ; then \
cat contrib/init.d/rc.gentoo.asterisk | sed 's|__ASTERISK_ETC_DIR__|$(ASTETCDIR)|;s|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;' > contrib/init.d/rc.asterisk.tmp ; \
- $(INSTALL) -m 755 contrib/init.d/rc.asterisk.tmp $(DESTDIR)/etc/init.d/asterisk ; \
+ $(INSTALL) -m 755 contrib/init.d/rc.asterisk.tmp "$(DESTDIR)/etc/init.d/asterisk" ; \
rm -f contrib/init.d/rc.asterisk.tmp ; \
if [ -z "$(DESTDIR)" ] ; then \
/sbin/rc-update add asterisk default ; \
fi ; \
elif [ -f /etc/mandrake-release -o -f /etc/mandriva-release ] ; then \
cat contrib/init.d/rc.mandriva.asterisk | sed 's|__ASTERISK_ETC_DIR__|$(ASTETCDIR)|;s|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;' > contrib/init.d/rc.asterisk.tmp ; \
- $(INSTALL) -m 755 contrib/init.d/rc.asterisk.tmp $(DESTDIR)/etc/rc.d/init.d/asterisk ; \
+ $(INSTALL) -m 755 contrib/init.d/rc.asterisk.tmp "$(DESTDIR)/etc/rc.d/init.d/asterisk" ; \
rm -f contrib/init.d/rc.asterisk.tmp ; \
if [ ! -f /etc/sysconfig/asterisk ] ; then \
- $(INSTALL) -m 644 contrib/init.d/etc_default_asterisk $(DESTDIR)/etc/sysconfig/asterisk ; \
+ $(INSTALL) -m 644 contrib/init.d/etc_default_asterisk "$(DESTDIR)/etc/sysconfig/asterisk" ; \
fi ; \
if [ -z "$(DESTDIR)" ] ; then \
/sbin/chkconfig --add asterisk ; \
fi ; \
elif [ -f /etc/SuSE-release -o -f /etc/novell-release ] ; then \
cat contrib/init.d/rc.suse.asterisk | sed 's|__ASTERISK_ETC_DIR__|$(ASTETCDIR)|;s|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;' > contrib/init.d/rc.asterisk.tmp ; \
- $(INSTALL) -m 755 contrib/init.d/rc.asterisk.tmp $(DESTDIR)/etc/init.d/asterisk ;\
+ $(INSTALL) -m 755 contrib/init.d/rc.asterisk.tmp "$(DESTDIR)/etc/init.d/asterisk" ;\
rm -f contrib/init.d/rc.asterisk.tmp ; \
if [ ! -f /etc/sysconfig/asterisk ] ; then \
- $(INSTALL) -m 644 contrib/init.d/etc_default_asterisk $(DESTDIR)/etc/sysconfig/asterisk ; \
+ $(INSTALL) -m 644 contrib/init.d/etc_default_asterisk "$(DESTDIR)/etc/sysconfig/asterisk" ; \
fi ; \
if [ -z "$(DESTDIR)" ] ; then \
/sbin/chkconfig --add asterisk ; \
fi ; \
elif [ -f /etc/arch-release -o -f /etc/arch-release ] ; then \
cat contrib/init.d/rc.archlinux.asterisk | sed 's|__ASTERISK_ETC_DIR__|$(ASTETCDIR)|;s|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;' > contrib/init.d/rc.asterisk.tmp ; \
- $(INSTALL) -m 755 contrib/init.d/rc.asterisk.tmp $(DESTDIR)/etc/rc.d/asterisk ; \
+ $(INSTALL) -m 755 contrib/init.d/rc.asterisk.tmp "$(DESTDIR)/etc/rc.d/asterisk" ; \
rm -f contrib/init.d/rc.asterisk.tmp ; \
- elif [ -d $(DESTDIR)/Library/LaunchDaemons ]; then \
- if [ ! -f $(DESTDIR)/Library/LaunchDaemons/org.asterisk.asterisk.plist ]; then \
+ elif [ -d "$(DESTDIR)/Library/LaunchDaemons" ]; then \
+ if [ ! -f "$(DESTDIR)/Library/LaunchDaemons/org.asterisk.asterisk.plist" ]; then \
sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;' < contrib/init.d/org.asterisk.asterisk.plist > asterisk.plist ; \
- $(INSTALL) -m 644 asterisk.plist $(DESTDIR)/Library/LaunchDaemons/org.asterisk.asterisk.plist; \
+ $(INSTALL) -m 644 asterisk.plist "$(DESTDIR)/Library/LaunchDaemons/org.asterisk.asterisk.plist"; \
rm -f asterisk.plist; \
fi; \
- if [ ! -f $(DESTDIR)/Library/LaunchDaemons/org.asterisk.muted.plist ]; then \
+ if [ ! -f "$(DESTDIR)/Library/LaunchDaemons/org.asterisk.muted.plist" ]; then \
sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;' < contrib/init.d/org.asterisk.muted.plist > muted.plist ; \
- $(INSTALL) -m 644 muted.plist $(DESTDIR)/Library/LaunchDaemons/org.asterisk.muted.plist; \
+ $(INSTALL) -m 644 muted.plist "$(DESTDIR)/Library/LaunchDaemons/org.asterisk.muted.plist"; \
rm -f muted.plist; \
fi; \
elif [ -f /etc/slackware-version ]; then \
@@ -844,19 +854,19 @@
+@$(SUBMAKE) -C $(@:-uninstall=) uninstall
_uninstall: $(SUBDIRS_UNINSTALL)
- rm -f $(DESTDIR)$(MODULES_DIR)/*
- rm -f $(DESTDIR)$(ASTSBINDIR)/*asterisk*
- rm -f $(DESTDIR)$(ASTSBINDIR)/astgenkey
- rm -f $(DESTDIR)$(ASTSBINDIR)/autosupport
- rm -rf $(DESTDIR)$(ASTHEADERDIR)
- rm -rf $(DESTDIR)$(ASTDATADIR)/firmware
- rm -f $(DESTDIR)$(ASTMANDIR)/man8/asterisk.8
- rm -f $(DESTDIR)$(ASTMANDIR)/man8/astgenkey.8
- rm -f $(DESTDIR)$(ASTMANDIR)/man8/autosupport.8
- rm -f $(DESTDIR)$(ASTMANDIR)/man8/safe_asterisk.8
+ rm -f "$(DESTDIR)$(MODULES_DIR)/"*
+ rm -f "$(DESTDIR)$(ASTSBINDIR)/"*asterisk*
+ rm -f "$(DESTDIR)$(ASTSBINDIR)/astgenkey"
+ rm -f "$(DESTDIR)$(ASTSBINDIR)/autosupport"
+ rm -rf "$(DESTDIR)$(ASTHEADERDIR)"
+ rm -rf "$(DESTDIR)$(ASTDATADIR)/firmware"
+ rm -f "$(DESTDIR)$(ASTMANDIR)/man8/asterisk.8"
+ rm -f "$(DESTDIR)$(ASTMANDIR)/man8/astgenkey.8"
+ rm -f "$(DESTDIR)$(ASTMANDIR)/man8/autosupport.8"
+ rm -f "$(DESTDIR)$(ASTMANDIR)/man8/safe_asterisk.8"
$(MAKE) -C sounds uninstall
-uninstall: _uninstall
+uninstall: preinstall_spaces _uninstall postinstall_spaces
@echo " +--------- Asterisk Uninstall Complete -----+"
@echo " + Asterisk binaries, sounds, man pages, +"
@echo " + headers, modules, and firmware builds, +"
@@ -871,12 +881,12 @@
@echo " +-------------------------------------------+"
uninstall-all: _uninstall
- rm -rf $(DESTDIR)$(ASTLIBDIR)
- rm -rf $(DESTDIR)$(ASTVARLIBDIR)
- rm -rf $(DESTDIR)$(ASTDATADIR)
- rm -rf $(DESTDIR)$(ASTSPOOLDIR)
- rm -rf $(DESTDIR)$(ASTETCDIR)
- rm -rf $(DESTDIR)$(ASTLOGDIR)
+ rm -rf "$(DESTDIR)$(ASTLIBDIR)"
+ rm -rf "$(DESTDIR)$(ASTVARLIBDIR)"
+ rm -rf "$(DESTDIR)$(ASTDATADIR)"
+ rm -rf "$(DESTDIR)$(ASTSPOOLDIR)"
+ rm -rf "$(DESTDIR)$(ASTETCDIR)"
+ rm -rf "$(DESTDIR)$(ASTLOGDIR)"
menuconfig: menuselect
Modified: trunk/Makefile.moddir_rules
URL: http://svnview.digium.com/svn/asterisk/trunk/Makefile.moddir_rules?view=diff&rev=332388&r1=332387&r2=332388
==============================================================================
--- trunk/Makefile.moddir_rules (original)
+++ trunk/Makefile.moddir_rules Wed Aug 17 14:30:50 2011
@@ -122,7 +122,7 @@
install:: all
@echo "Installing modules from `basename $(CURDIR)`..."
- @for x in $(LOADABLE_MODS:%=%.so); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
+ @for x in $(LOADABLE_MODS:%=%.so); do $(INSTALL) -m 755 $$x "$(DESTDIR)$(MODULES_DIR)" ; done
uninstall::
Modified: trunk/agi/Makefile
URL: http://svnview.digium.com/svn/asterisk/trunk/agi/Makefile?view=diff&rev=332388&r1=332387&r2=332388
==============================================================================
--- trunk/agi/Makefile (original)
+++ trunk/agi/Makefile Wed Aug 17 14:30:50 2011
@@ -40,11 +40,11 @@
eagi-sphinx-test: eagi-sphinx-test.o
install: all
- $(INSTALL) -d $(DESTDIR)$(AGI_DIR)
- for x in $(AGIS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(AGI_DIR) ; done
+ $(INSTALL) -d "$(DESTDIR)$(AGI_DIR)"
+ for x in $(AGIS); do $(INSTALL) -m 755 $$x "$(DESTDIR)$(AGI_DIR)" ; done
uninstall:
- for x in $(AGIS); do rm -f $(DESTDIR)$(AGI_DIR)/$$x ; done
+ for x in $(AGIS); do rm -f "$(DESTDIR)$(AGI_DIR)/$$x" ; done
clean:
rm -f *.so *.o look eagi-test eagi-sphinx-test
Modified: trunk/configure.ac
URL: http://svnview.digium.com/svn/asterisk/trunk/configure.ac?view=diff&rev=332388&r1=332387&r2=332388
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Wed Aug 17 14:30:50 2011
@@ -133,6 +133,78 @@
fi
fi
+# $HOME is preferred as our substitute path, unless $HOME contains a space
+for i in ${HOME} /tmp; do
+ if test "${i}" = ""; then continue; fi
+ if test "${i}" = "/"; then continue; fi
+ __ac_path_has_spaces=`echo $HOME | grep ' '`
+ if test "$ac_path_has_spaces" = ""; then :; else continue; fi
+ __ac_substitute_path=${i}
+ break
+done
+
+AC_PROG_LN_S
+__sub_ordinal=1
+MAKE_PREINSTALL=""
+MAKE_POSTINSTALL=""
+
+# It may initially seem a trifle bit excessive to evaluate all of these paths.
+# However, consider that many of these may invoke another variable, such as
+# ${prefix}, by default, which is not resolved until compile time. If that
+# variable contains a space, then each of the dependent variables will also
+# contain a space and thus will need the special treatment.
+for stdpath in prefix exec_prefix datarootdir datadir includedir infodir libdir libexecdir localstatedir mandir sbindir sharedstatedir sysconfdir astetcdir astsbindir astlibdir astheaderdir astmandir astvarlibdir astspooldir astlogdir astvarrundir astdatadir astdbdir astkeydir; do
+ eval "__ac_path_sub=\${$stdpath}"
+ #echo "__ac_path_sub=$__ac_path_sub"
+ __ac_path_has_var=`sh -c "echo '$__ac_path_sub' | grep '{'"`
+ if test "$__ac_path_has_var" = ""; then :; else
+ __ac_path_sub=`echo $__ac_path_sub | sed 's/{/{MAKE_/'`
+ fi
+
+ __ac_path_has_spaces=`sh -c "echo '$__ac_path_sub' | grep ' '"`
+ if test "$__ac_path_has_spaces" = ""; then
+ eval "MAKE_$stdpath=\$__ac_path_sub"
+ else
+ # Substitute path for a path without a space
+ eval "MAKE_$stdpath=\"$__ac_substitute_path/.asterisk_install_path_${__sub_ordinal}\""
+ MAKE_POSTINSTALL="${MAKE_POSTINSTALL} rm -f \"$__ac_substitute_path/.asterisk_install_path_${__sub_ordinal}\";"
+ MAKE_PREINSTALL="${MAKE_PREINSTALL} rm -f \"$__ac_substitute_path/.asterisk_install_path_${__sub_ordinal}\";"
+ MAKE_PREINSTALL="${MAKE_PREINSTALL} ${LN_S} -f \"\$(DESTDIR)$__ac_path_sub\" \"$__ac_substitute_path/.asterisk_install_path_${__sub_ordinal}\";"
+ __sub_ordinal=$((${__sub_ordinal}+1))
+ fi
+done
+AC_SUBST(MAKE_PREINSTALL)
+AC_SUBST(MAKE_POSTINSTALL)
+AC_SUBST(MAKE_prefix)
+AC_SUBST(MAKE_exec_prefix)
+AC_SUBST(MAKE_datarootdir)
+AC_SUBST(MAKE_datadir)
+AC_SUBST(MAKE_includedir)
+AC_SUBST(MAKE_infodir)
+AC_SUBST(MAKE_libdir)
+AC_SUBST(MAKE_libexecdir)
+AC_SUBST(MAKE_localstatedir)
+AC_SUBST(MAKE_mandir)
+AC_SUBST(MAKE_sbindir)
+AC_SUBST(MAKE_sharedstatedir)
+AC_SUBST(MAKE_sysconfdir)
+AC_SUBST(MAKE_astetcdir)
+AC_SUBST(MAKE_astsbindir)
+AC_SUBST(MAKE_astlibdir)
+AC_SUBST(MAKE_astheaderdir)
+AC_SUBST(MAKE_astmandir)
+AC_SUBST(MAKE_astvarlibdir)
+AC_SUBST(MAKE_astspooldir)
+AC_SUBST(MAKE_astlogdir)
+AC_SUBST(MAKE_astvarrundir)
+AC_SUBST(MAKE_astdatadir)
+AC_SUBST(MAKE_astdbdir)
+AC_SUBST(MAKE_astkeydir)
+
+test "x$MAKE_prefix" = xNONE && MAKE_prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$MAKE_exec_prefix" = xNONE && MAKE_exec_prefix='${prefix}'
+
BUILD_PLATFORM=${build}
BUILD_CPU=${build_cpu}
BUILD_VENDOR=${build_vendor}
@@ -227,7 +299,6 @@
AST_PROG_LD # note, does not work on FreeBSD
AC_PROG_AWK
AC_PROG_INSTALL
-AC_PROG_LN_S
AC_PROG_RANLIB
AST_CHECK_GNU_MAKE
AC_PROG_EGREP
Modified: trunk/include/asterisk/autoconfig.h.in
URL: http://svnview.digium.com/svn/asterisk/trunk/include/asterisk/autoconfig.h.in?view=diff&rev=332388&r1=332387&r2=332388
==============================================================================
--- trunk/include/asterisk/autoconfig.h.in (original)
+++ trunk/include/asterisk/autoconfig.h.in Wed Aug 17 14:30:50 2011
@@ -833,16 +833,16 @@
/* Define to 1 if you have the `strtoq' function. */
#undef HAVE_STRTOQ
-/* Define to 1 if `ifr_ifru.ifru_hwaddr' is member of `struct ifreq'. */
+/* Define to 1 if `ifr_ifru.ifru_hwaddr' is a member of `struct ifreq'. */
#undef HAVE_STRUCT_IFREQ_IFR_IFRU_IFRU_HWADDR
-/* Define to 1 if `st_blksize' is member of `struct stat'. */
+/* Define to 1 if `st_blksize' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_BLKSIZE
-/* Define to 1 if `cr_uid' is member of `struct ucred'. */
+/* Define to 1 if `cr_uid' is a member of `struct ucred'. */
#undef HAVE_STRUCT_UCRED_CR_UID
-/* Define to 1 if `uid' is member of `struct ucred'. */
+/* Define to 1 if `uid' is a member of `struct ucred'. */
#undef HAVE_STRUCT_UCRED_UID
/* Define to 1 if you have the mISDN Supplemental Services library. */
@@ -1119,6 +1119,9 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
Modified: trunk/makeopts.in
URL: http://svnview.digium.com/svn/asterisk/trunk/makeopts.in?view=diff&rev=332388&r1=332387&r2=332388
==============================================================================
--- trunk/makeopts.in (original)
+++ trunk/makeopts.in Wed Aug 17 14:30:50 2011
@@ -34,6 +34,8 @@
MD5=@MD5@
SHA1SUM=@SHA1SUM@
OPENSSL=@OPENSSL@
+MAKE_PREINSTALL=@MAKE_PREINSTALL@
+MAKE_POSTINSTALL=@MAKE_POSTINSTALL@
BUILD_PLATFORM=@BUILD_PLATFORM@
BUILD_CPU=@BUILD_CPU@
@@ -91,6 +93,35 @@
ASTLOGDIR = @astlogdir@
ASTVARRUNDIR = @astvarrundir@
+MAKE_prefix = @MAKE_prefix@
+MAKE_exec_prefix = @MAKE_exec_prefix@
+
+MAKE_datarootdir = @MAKE_datarootdir@
+MAKE_datadir = @MAKE_datadir@
+MAKE_includedir = @MAKE_includedir@
+MAKE_infodir = @MAKE_infodir@
+MAKE_libdir = @MAKE_libdir@
+MAKE_libexecdir = @MAKE_libexecdir@
+MAKE_localstatedir = @MAKE_localstatedir@
+MAKE_mandir = @MAKE_mandir@
+MAKE_sbindir = @MAKE_sbindir@
+MAKE_sharedstatedir = @MAKE_sharedstatedir@
+MAKE_sysconfdir = @MAKE_sysconfdir@
+
+MAKE_ASTSBINDIR = @MAKE_astsbindir@
+MAKE_ASTETCDIR = @MAKE_astetcdir@
+MAKE_ASTHEADERDIR = @MAKE_astheaderdir@
+MAKE_ASTLIBDIR = @MAKE_astlibdir@
+MAKE_ASTMANDIR = @MAKE_astmandir@
+MAKE_astvarlibdir = @MAKE_astvarlibdir@
+MAKE_ASTVARLIBDIR = @MAKE_astvarlibdir@
+MAKE_ASTDATADIR = @MAKE_astdatadir@
+MAKE_ASTDBDIR = @MAKE_astdbdir@
+MAKE_ASTKEYDIR = @MAKE_astkeydir@
+MAKE_ASTSPOOLDIR = @MAKE_astspooldir@
+MAKE_ASTLOGDIR = @MAKE_astlogdir@
+MAKE_ASTVARRUNDIR = @MAKE_astvarrundir@
+
AST_DEVMODE=@AST_DEVMODE@
NOISY_BUILD=@NOISY_BUILD@
Modified: trunk/sounds/Makefile
URL: http://svnview.digium.com/svn/asterisk/trunk/sounds/Makefile?view=diff&rev=332388&r1=332387&r2=332388
==============================================================================
--- trunk/sounds/Makefile (original)
+++ trunk/sounds/Makefile Wed Aug 17 14:30:50 2011
@@ -16,9 +16,9 @@
-include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/makeopts
CMD_PREFIX?=@
-SOUNDS_DIR:=$(DESTDIR)$(ASTDATADIR)/sounds
+SOUNDS_DIR:=$(MAKE_ASTDATADIR)/sounds
SOUNDS_CACHE_DIR?=
-MOH_DIR:=$(DESTDIR)$(ASTDATADIR)/moh
+MOH_DIR:=$(MAKE_ASTDATADIR)/moh
CORE_SOUNDS_VERSION:=1.4.21
EXTRA_SOUNDS_VERSION:=1.4.11
MOH_VERSION:=2.03
Modified: trunk/utils/Makefile
URL: http://svnview.digium.com/svn/asterisk/trunk/utils/Makefile?view=diff&rev=332388&r1=332387&r2=332388
==============================================================================
--- trunk/utils/Makefile (original)
+++ trunk/utils/Makefile Wed Aug 17 14:30:50 2011
@@ -75,12 +75,12 @@
install:
for x in $(UTILS); do \
if [ "$$x" != "none" ]; then \
- $(INSTALL) -m 755 $$x $(DESTDIR)$(ASTSBINDIR)/$$x; \
+ $(INSTALL) -m 755 $$x "$(DESTDIR)$(ASTSBINDIR)/$$x"; \
fi; \
done
uninstall:
- for x in $(ALL_UTILS); do rm -f $(DESTDIR)$(ASTSBINDIR)/$$x; done
+ for x in $(ALL_UTILS); do rm -f "$(DESTDIR)$(ASTSBINDIR)/$$x"; done
clean:
rm -f *.o $(ALL_UTILS) check_expr
More information about the svn-commits
mailing list