summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Grabsch <vog@notjusthosting.com>2012-03-29 09:07:56 (GMT)
committerVolker Grabsch <vog@notjusthosting.com>2012-03-29 09:07:56 (GMT)
commit8a254e5b71d1fec8c35613f2c5c29b4838280a5d (patch)
tree3f89d92ff041289f67964ea467160438451f41c5
parent7e6723adb595dd573666c04739d70e528e653a68 (diff)
downloadmxe-8a254e5b71d1fec8c35613f2c5c29b4838280a5d.zip
mxe-8a254e5b71d1fec8c35613f2c5c29b4838280a5d.tar.gz
mxe-8a254e5b71d1fec8c35613f2c5c29b4838280a5d.tar.bz2
Improve performance of loading main Makefile
-rw-r--r--Makefile11
1 files changed, 8 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 85a76c2..bfc626d 100644
--- a/Makefile
+++ b/Makefile
@@ -104,10 +104,15 @@ $(PREFIX)/installed/check-requirements: $(MAKEFILE)
@[ -d '$(PREFIX)/installed' ] || mkdir -p '$(PREFIX)/installed'
@touch '$@'
-define PKG_DEFINITION
-$(1)_VERSION := $(shell grep ' id="$(1)-version"' '$(TOP_DIR)/doc/index.html' | $(SED) -n 's/^.* id="$(1)-version">\([^<]*\)<.*$$/\1/p')
+define newline
+
+
endef
-$(foreach PKG,$(PKGS),$(eval $(call PKG_DEFINITION,$(PKG))))
+$(eval $(subst #,$(newline),$(shell \
+ $(SED) -n \
+ 's/^.* id="\([A-Za-z0-9_+-]*\)-version">\([^<]*\)<.*$$/\1_VERSION := \2 #/p' \
+ '$(TOP_DIR)/doc/index.html' \
+)))
include $(TOP_DIR)/src/*.mk