From 06747eaca2f34ae0717566d9267ffd1229444210 Mon Sep 17 00:00:00 2001 From: Tobias Gruetzmacher Date: Thu, 26 Feb 2015 15:42:26 +0100 Subject: [PATCH] Add a new makefile target to cache versions. All package versions are written int one JSON file. --- .gitignore | 1 + Makefile | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 4309bcfa..2a1a55db 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,6 @@ /gits/ /log*/ /pkg +/versions.json /wip/ /tmp-* diff --git a/Makefile b/Makefile index 64f30980..82fee8a6 100644 --- a/Makefile +++ b/Makefile @@ -507,7 +507,7 @@ show-upstream-deps-%: .PHONY: clean clean: - rm -rf $(call TMP_DIR,*) $(PREFIX) build-matrix.html + rm -rf $(call TMP_DIR,*) $(PREFIX) build-matrix.html versions.json .PHONY: clean-pkg clean-pkg: @@ -663,3 +663,12 @@ build-matrix.html: $(foreach PKG,$(PKGS), $(TOP_DIR)/src/$(PKG).mk) @echo '' >> $@ @echo '' >> $@ @echo '' >> $@ + + +versions.json: $(foreach PKG,$(PKGS), $(TOP_DIR)/src/$(PKG).mk) + @echo '{' > $@ + @{$(foreach PKG,$(PKGS), \ + echo ' "$(PKG)": \ + "$($(PKG)_VERSION)",';)} >> $@ + @echo ' "": null' >> $@ + @echo '}' >> $@