diff Makefile @ 215:898425550c29

new macro UNPACK_PKG_ARCHIVE for build rules (This is useful in connection with download-only packages)
author Volker Grabsch <vog@notjusthosting.com>
date Tue, 03 Feb 2009 00:12:28 +0100
parents e1c566cd7a5e
children c07a36f3ea80
line wrap: on
line diff
--- a/Makefile	Mon Feb 02 23:50:59 2009 +0100
+++ b/Makefile	Tue Feb 03 00:12:28 2009 +0100
@@ -31,6 +31,9 @@
     $(if $(filter %.zip,    $(1)),unzip '$(1)', \
     $(error Unknown archive format: $(1))))))
 
+UNPACK_PKG_ARCHIVE = \
+    $(call UNPACK_ARCHIVE,$(PKG_DIR)/$($(1)_FILE))
+
 DOWNLOAD = \
     $(if $(2),wget -t 3 -c '$(1)' || wget -c '$(2)',wget -c '$(1)')
 
@@ -49,8 +52,7 @@
 	$(if $(value $(1)_BUILD),
 	    rm -rf   '$(2)'
 	    mkdir -p '$(2)'
-	    cd '$(2)' && \
-	        $(call UNPACK_ARCHIVE,$(PKG_DIR)/$($(1)_FILE))
+	    cd '$(2)' && $(call UNPACK_PKG_ARCHIVE,$(1))
 	    cd '$(2)/$($(1)_SUBDIR)'
 	    $$(call $(1)_BUILD,$(2)/$($(1)_SUBDIR))
 	    rm -rfv  '$(2)'