summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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