summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorVolker Grabsch <vog@notjusthosting.com>2009-02-02 22:50:59 (GMT)
committerVolker Grabsch <vog@notjusthosting.com>2009-02-02 22:50:59 (GMT)
commit004df00d3b233019786477c7a923c5a452a2c38f (patch)
tree95b61bbcd42e8e558a048be2ed15dad613c3a375 /Makefile
parent5ccf91e8b5bde9e9ecac79f4842c217d211be930 (diff)
downloadmxe-004df00d3b233019786477c7a923c5a452a2c38f.zip
mxe-004df00d3b233019786477c7a923c5a452a2c38f.tar.gz
mxe-004df00d3b233019786477c7a923c5a452a2c38f.tar.bz2
allow packages without a BUILD section (This will be used for download-only packages such as gcc-g++.)
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 9 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 2686453..d9a8b5a 100644
--- a/Makefile
+++ b/Makefile
@@ -43,16 +43,18 @@ $(1): $(PREFIX)/installed-$(1)
$(PREFIX)/installed-$(1): $(TOP_DIR)/src/$(1).mk $(addprefix $(PREFIX)/installed-,$($(1)_DEPS))
[ -d '$(PREFIX)' ] || mkdir -p '$(PREFIX)'
[ -d '$(PKG_DIR)' ] || mkdir -p '$(PKG_DIR)'
- rm -rf '$(2)'
- mkdir -p '$(2)'
cd '$(PKG_DIR)' && ( \
$(call CHECK_ARCHIVE,$($(1)_FILE)) || \
$(call DOWNLOAD,$($(1)_URL),$($(1)_URL_2)) )
- cd '$(2)' && \
- $(call UNPACK_ARCHIVE,$(PKG_DIR)/$($(1)_FILE))
- cd '$(2)/$($(1)_SUBDIR)'
- $$(call $(1)_BUILD,$(2)/$($(1)_SUBDIR))
- rm -rfv '$(2)'
+ $(if $(value $(1)_BUILD),
+ rm -rf '$(2)'
+ mkdir -p '$(2)'
+ cd '$(2)' && \
+ $(call UNPACK_ARCHIVE,$(PKG_DIR)/$($(1)_FILE))
+ cd '$(2)/$($(1)_SUBDIR)'
+ $$(call $(1)_BUILD,$(2)/$($(1)_SUBDIR))
+ rm -rfv '$(2)'
+ ,)
touch '$$@'
endef
$(foreach PKG,$(PKG_RULES),$(eval $(call PKG_RULE,$(PKG),$(call TMP_DIR,$(PKG)))))