[asterisk-commits] qwell: trunk r280196 - in /trunk: ./ sounds/Makefile

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jul 28 13:25:04 CDT 2010


Author: qwell
Date: Wed Jul 28 13:25:00 2010
New Revision: 280196

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=280196
Log:
Merged revisions 280195 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r280195 | qwell | 2010-07-28 13:24:29 -0500 (Wed, 28 Jul 2010) | 16 lines
  
  Merged revisions 280193 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r280193 | qwell | 2010-07-28 13:05:54 -0500 (Wed, 28 Jul 2010) | 9 lines
    
    Remove unnecessary subshells.  Attempt to make checksumming work.
    
    Also improves readability.
    
    (issue #17621)
    Reported by: bjm
    
    Review: https://reviewboard.asterisk.org/r/808/
  ........
................

Modified:
    trunk/   (props changed)
    trunk/sounds/Makefile

Propchange: trunk/
------------------------------------------------------------------------------
--- branch-1.8-merged (original)
+++ branch-1.8-merged Wed Jul 28 13:25:00 2010
@@ -1,1 +1,1 @@
-/branches/1.8:1-279056,279113,279227,279273,279280,279314,279390,279410,279442,279472,279502,279504,279562,279566,279568,279598,279601,279619,279636-279815,279817,279850,279887,279916,279949,279953,280023,280058,280090,280161
+/branches/1.8:1-279056,279113,279227,279273,279280,279314,279390,279410,279442,279472,279502,279504,279562,279566,279568,279598,279601,279619,279636-279815,279817,279850,279887,279916,279949,279953,280023,280058,280090,280161,280195

Modified: trunk/sounds/Makefile
URL: http://svnview.digium.com/svn/asterisk/trunk/sounds/Makefile?view=diff&rev=280196&r1=280195&r2=280196
==============================================================================
--- trunk/sounds/Makefile (original)
+++ trunk/sounds/Makefile Wed Jul 28 13:25:00 2010
@@ -73,38 +73,41 @@
 define sound_format_lang_rule
 $(1)/.asterisk-$(2)$(if $(3),-$(3),)-%: have_download
 	$(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) $$(SOUNDS_URL)/$$$${PACKAGE} && \
-	        $$(DOWNLOAD) $$(SOUNDS_URL)/$$$${PACKAGE}.sha1 && \
-	        $$(SHA1SUM) -c --status $$$${PACKAGE}.sha1 \
-	      ) || \
-	      (echo "Bad checksum: $$$${PACKAGE}" 1>&2; exit 1) \
-	    ); \
-	  fi; \
-	  $(LN) -sf $$(SOUNDS_CACHE_DIR)/$$$${PACKAGE} .; \
+	if test ! -f $$(SOUNDS_CACHE_DIR)/$$$${PACKAGE}; then \
+	  (cd $$(SOUNDS_CACHE_DIR); $$(DOWNLOAD) $$(SOUNDS_URL)/$$$${PACKAGE}); \
 	fi; \
+	if test ! -f $$(SOUNDS_CACHE_DIR)/$$$${PACKAGE}.sha1; then \
+	  (cd $$(SOUNDS_CACHE_DIR); $$(DOWNLOAD) $$(SOUNDS_URL)/$$$${PACKAGE}.sha1); \
+	fi; \
+	$(LN) -sf $$(SOUNDS_CACHE_DIR)/$$$${PACKAGE} .; \
+	$(LN) -sf $$(SOUNDS_CACHE_DIR)/$$$${PACKAGE}.sha1 .; \
+	$$(SHA1SUM) -c --status $$$${PACKAGE}.sha1 || \
+	  ( \
+	    rm -f $$(SOUNDS_CACHE_DIR)/$$$${PACKAGE} $$(SOUNDS_CACHE_DIR)/$$$${PACKAGE}.sha1 $$$${PACKAGE} $$$${PACKAGE}.sha1; \
+	    echo "Bad checksum: $$$${PACKAGE}" 1>&2; \
+	    exit 1; \
+	  ); \
 	rm -f $$(subst -$(4),,$$@)-*; \
 	(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 \
-	  if test ! -f $$(SOUNDS_CACHE_DIR)/$$@; then \
-	    (cd $$(SOUNDS_CACHE_DIR); \
-	      ( \
-	        $$(DOWNLOAD) $$(SOUNDS_URL)/$$@ && \
-		$$(DOWNLOAD) $$(SOUNDS_URL)/$$@.sha1 && \
-	        $$(SHA1SUM) -c --status $$@.sha1 \
-	      ) || \
-	      (echo "Bad checksum: $$@" 1>&2; exit 1) \
-	    ); \
-	  fi; \
-	  $(LN) -sf $$(SOUNDS_CACHE_DIR)/$$@ .; \
-	fi
+	$(CMD_PREFIX) \
+	if test ! -f $$(SOUNDS_CACHE_DIR)/$$@; then \
+	  (cd $$(SOUNDS_CACHE_DIR); $$(DOWNLOAD) $$(SOUNDS_URL)/$$@); \
+	fi; \
+	if test ! -f $$(SOUNDS_CACHE_DIR)/$$@.sha1; then \
+	  (cd $$(SOUNDS_CACHE_DIR); $$(DOWNLOAD) $$(SOUNDS_URL)/$$@.sha1); \
+	fi; \
+	$(LN) -sf $$(SOUNDS_CACHE_DIR)/$$@ .; \
+	$(LN) -sf $$(SOUNDS_CACHE_DIR)/$$@.sha1 .; \
+	$$(SHA1SUM) -c --status $$@.sha1 || \
+	  ( \
+	    rm -f $$(SOUNDS_CACHE_DIR)/$$@ $$(SOUNDS_CACHE_DIR)/$$@.sha1 $$@ $$@.sha1; \
+	    echo "Bad checksum: $$@" 1>&2; \
+	    exit 1; \
+	  )
 endef
 
 else
@@ -113,7 +116,7 @@
 $(1)/.asterisk-$(2)$(if $(3),-$(3),)-%: have_download
 	$(CMD_PREFIX)PACKAGE=$$(subst $(1)/.asterisk,asterisk,$$@).tar.gz; \
 	if test ! -f $$$${PACKAGE}; then \
-	  ($$(DOWNLOAD) $$(SOUNDS_URL)/$$$${PACKAGE} || exit 1); \
+	  $$(DOWNLOAD) $$(SOUNDS_URL)/$$$${PACKAGE} || exit 1; \
 	fi; \
 	rm -f $$(subst -$(4),,$$@)-*; \
 	(cd $(1)$(if $(3),/$(3),); cat $$(CURDIR)/$$$${PACKAGE} | gzip -d | tar xof -) && touch $$@
@@ -160,9 +163,9 @@
 
 $(eval $(call sound_format_lang_rule,$(MOH_DIR),moh,,$(MOH_VERSION)))
 
-$(eval $(call sound_download_rule,core))
+$(eval $(call sound_download_rule,core-sounds))
 
-$(eval $(call sound_download_rule,extra))
+$(eval $(call sound_download_rule,extra-sounds))
 
 $(eval $(call sound_download_rule,moh))
 




More information about the asterisk-commits mailing list