summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Grabsch <vog@notjusthosting.com>2009-02-02 23:12:28 (GMT)
committerVolker Grabsch <vog@notjusthosting.com>2009-02-02 23:12:28 (GMT)
commit79078d965a6c9f0ae92e7e3def26e65031da6151 (patch)
tree550fb37e3e82e61d4fe8b69ed0e1f8f2867e1949
parent004df00d3b233019786477c7a923c5a452a2c38f (diff)
downloadmxe-79078d965a6c9f0ae92e7e3def26e65031da6151.zip
mxe-79078d965a6c9f0ae92e7e3def26e65031da6151.tar.gz
mxe-79078d965a6c9f0ae92e7e3def26e65031da6151.tar.bz2
new macro UNPACK_PKG_ARCHIVE for build rules (This is useful in connection with download-only packages)
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index d9a8b5a..2726772 100644
--- a/Makefile
+++ b/Makefile
@@ -31,6 +31,9 @@ UNPACK_ARCHIVE = \
$(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 @@ $(PREFIX)/installed-$(1): $(TOP_DIR)/src/$(1).mk $(addprefix $(PREFIX)/installed
$(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)'