diff options
author | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-07-26 23:24:57 +0000 |
---|---|---|
committer | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-07-26 23:24:57 +0000 |
commit | 661c4d5e7508c5bf27170814f0f26bb17de11bb4 (patch) | |
tree | 8dcc71c87bbe04beabd613a704d618d5a5ef37de /sounds/Makefile | |
parent | f08d8d0643e4362fcf87dbfb90e80712cfeda311 (diff) |
Merge equiv of revision 279657 to solve sounds/Makefile issue
git-svn-id: http://svn.digium.com/svn/asterisk/tags/1.6.2.11-rc2@279686 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'sounds/Makefile')
-rw-r--r-- | sounds/Makefile | 66 |
1 files changed, 36 insertions, 30 deletions
diff --git a/sounds/Makefile b/sounds/Makefile index f0beabd3c..faa830b96 100644 --- a/sounds/Makefile +++ b/sounds/Makefile @@ -75,30 +75,38 @@ ifneq ($(SOUNDS_CACHE_DIR),) define sound_format_lang_rule $$($(1))/.asterisk-$(2)$(if $(3),-$(3),)-%: have_download - $(CMD_PREFIX)PACKAGE=$$(subst $$($(1))/.asterisk,asterisk,$$@).tar.gz; $(BS) - if test ! -f $$$${PACKAGE}; then $(BS) - if test ! -f $$(SOUNDS_CACHE_DIR)/$$$${PACKAGE}; then $(BS) - (cd $$(SOUNDS_CACHE_DIR); ($$(DOWNLOAD) $$(WGET_ARGS) $$(SOUNDS_URL)/$$$${PACKAGE} $$(SOUNDS_URL)/$$$${PACKAGE}.sha1 $(BS) - && sha1sum -c --status $$$${PACKAGE}.sha1) || $(BS) - (echo "Bad checksum: $$$${PACKAGE}" 1>&2; exit 1)); $(BS) - fi; $(BS) - $(LN) -sf $$(SOUNDS_CACHE_DIR)/$$$${PACKAGE} .; $(BS) - fi; $(BS) -$(if $($(4)_VERSION),\ -$(EMPTY) rm -f $$(subst -$$($(4)_VERSION),,$$@)-* && $(BS) -,) (cd $$($(1))$(if $(3),/$(3),); cat $$(CURDIR)/$$$${PACKAGE} | gzip -d | tar xof -) && $(BS) - touch $$@ + $(CMD_PREFIX)PACKAGE=$$(subst $$($(1))/.asterisk,asterisk,$$@).tar.gz; \ + if test ! -f $$$${PACKAGE}; then \ + if test ! -f $$(SOUNDS_CACHE_DIR)/$$$${PACKAGE}; then \ + (cd $$(SOUNDS_CACHE_DIR); \ + ( \ + $$(DOWNLOAD) $$(WGET_ARGS) $$(SOUNDS_URL)/$$$${PACKAGE} && \ + $$(DOWNLOAD) $$(WGET_ARGS) $$(SOUNDS_URL)/$$$${PACKAGE}.sha1 && \ + $$(SHA1SUM) -c --status $$$${PACKAGE}.sha1 \ + ) || \ + (echo "Bad checksum: $$$${PACKAGE}" 1>&2; exit 1) \ + ); \ + fi; \ + $(LN) -sf $$(SOUNDS_CACHE_DIR)/$$$${PACKAGE} .; \ + fi; \ + $(if $($(4)_VERSION),rm -f $$(subst -$$($(4)_VERSION),,$$@)-*,); \ + (cd $$($(1))$(if $(3),/$(3),); cat $$(CURDIR)/$$$${PACKAGE} | gzip -d | tar xof -) && touch $$@ endef define sound_download_rule asterisk-$(1)-%.tar.gz: have_download - $(CMD_PREFIX)if test ! -f $$@ && test ! -f $$(SOUNDS_DIR)/.$$(subst .tar.gz,,$/$@); then $(BS) - if test ! -f $$(SOUNDS_CACHE_DIR)/$$@; then $(BS) - (cd $$(SOUNDS_CACHE_DIR); ($$(DOWNLOAD) $$(WGET_ARGS) $$(SOUNDS_URL)/$$@ $$(SOUNDS_URL)/$$@.sha1 $(BS) - && sha1sum -c --status $$@.sha1) || $(BS) - (echo "Bad checksum: $$@" 1>&2; exit 1)); $(BS) - fi; $(BS) - $(LN) -sf $$(SOUNDS_CACHE_DIR)/$$@ .; $(BS) + $(CMD_PREFIX)if test ! -f $$@ && test ! -f $$(SOUNDS_DIR)/.$$(subst .tar.gz,,$/$@); then \ + if test ! -f $$(SOUNDS_CACHE_DIR)/$$@; then \ + (cd $$(SOUNDS_CACHE_DIR); \ + ( \ + $$(DOWNLOAD) $$(WGET_ARGS) $$(SOUNDS_URL)/$$@ && \ + $$(DOWNLOAD) $$(WGET_ARGS) $$(SOUNDS_URL)/$$@.sha1 && \ + $$(SHA1SUM) -c --status $$@.sha1 \ + ) || \ + (echo "Bad checksum: $$@" 1>&2; exit 1) \ + ); \ + fi; \ + $(LN) -sf $$(SOUNDS_CACHE_DIR)/$$@ .; \ fi endef @@ -106,20 +114,18 @@ else define sound_format_lang_rule $$($(1))/.asterisk-$(2)$(if $(3),-$(3),)-%: have_download - $(CMD_PREFIX)PACKAGE=$$(subst $$($(1))/.asterisk,asterisk,$$@).tar.gz; $(BS) - if test ! -f $$$${PACKAGE}; then $(BS) - ($$(DOWNLOAD) $$(WGET_ARGS) $$(SOUNDS_URL)/$$$${PACKAGE} || exit 1); $(BS) - fi; $(BS) -$(if $($(4)_VERSION),\ -$(EMPTY) rm -f $$(subst -$$($(4)_VERSION),,$$@)-* && $(BS) -,) (cd $$($(1))$(if $(3),/$(3),); cat $$(CURDIR)/$$$${PACKAGE} | gzip -d | tar xof -) && $(BS) - touch $$@ + $(CMD_PREFIX)PACKAGE=$$(subst $$($(1))/.asterisk,asterisk,$$@).tar.gz; \ + if test ! -f $$$${PACKAGE}; then \ + ($$(DOWNLOAD) $$(WGET_ARGS) $$(SOUNDS_URL)/$$$${PACKAGE} || exit 1); \ + fi; \ + $(if $($(4)_VERSION),rm -f $$(subst -$$($(4)_VERSION),,$$@)-*,); \ + (cd $$($(1))$(if $(3),/$(3),); cat $$(CURDIR)/$$$${PACKAGE} | gzip -d | tar xof -) && touch $$@ endef define sound_download_rule asterisk-$(1)-%.tar.gz: have_download - $(CMD_PREFIX)if test ! -f $$@ && test ! -f $$(SOUNDS_DIR)/.$$(subst .tar.gz,,$$@); then $(BS) - $$(DOWNLOAD) $$(WGET_ARGS) $$(SOUNDS_URL)/$$@; $(BS) + $(CMD_PREFIX)if test ! -f $$@ && test ! -f $$(SOUNDS_DIR)/.$$(subst .tar.gz,,$$@); then \ + $$(DOWNLOAD) $$(WGET_ARGS) $$(SOUNDS_URL)/$$@; \ fi endef |