summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2015-06-25 12:37:04 (GMT)
committer Vincent Sanders <vince@kyllikki.org>2015-06-25 12:37:04 (GMT)
commit30dacc7de7ea320e739ddb7c932d469a4671383f (patch)
treea6917a85c9f7967a53d54b53d33286721377f1cf
parent123b6ed1dc51a1cba9a6719dacb7110c7bbdc887 (diff)
downloadnetsurf-all-30dacc7de7ea320e739ddb7c932d469a4671383f.tar.gz
netsurf-all-30dacc7de7ea320e739ddb7c932d469a4671383f.tar.bz2
Add dist-head target to generate distribution tarballs for the moduel heads
-rw-r--r--Makefile17
1 files changed, 13 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 1c4e821..19c80c5 100644
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,7 @@
# Component settings
COMPONENT := netsurf-all
-COMPONENT_VERSION := 3.3
+COMPONENT_VERSION := 3.4
# Targets
@@ -88,7 +88,7 @@ else
endif
endif
-.PHONY: build install clean release-checkout head-checkout dist
+.PHONY: build install clean checkout-release checkout-head dist dist-head
# clean macro for each sub target
define do_clean
@@ -137,14 +137,23 @@ clean:
$(foreach L,$(NSBUILD_TARG),$(call do_build_clean,$(L)))
$(MAKE) clean --directory=$(NETSURF_TARG) TARGET=$(TARGET)
-release-checkout: $(NSLIB_TARG) $(NETSURF_TARG) $(NSGENBIND_TARG) $(NSLIB_FB_TARG) $(NSLIB_SVGTINY_TARG) $(NSLIB_RO_TARG)
+# check out last release tag on each submodule
+checkout-release: $(NSLIB_TARG) $(NETSURF_TARG) $(NSGENBIND_TARG) $(NSLIB_FB_TARG) $(NSLIB_SVGTINY_TARG) $(NSLIB_RO_TARG)
git pull --recurse-submodules
for x in $^; do cd $$x; (git checkout origin/HEAD && git checkout $$(git describe --abbrev=0 --match="release/*" )); cd ..; done
-head-checkout: $(NSLIB_TARG) $(NETSURF_TARG) $(NSGENBIND_TARG) $(NSLIB_FB_TARG) $(NSLIB_SVGTINY_TARG) $(NSLIB_RO_TARG)
+# check out head on each submodule
+checkout-head: $(NSLIB_TARG) $(NETSURF_TARG) $(NSGENBIND_TARG) $(NSLIB_FB_TARG) $(NSLIB_SVGTINY_TARG) $(NSLIB_RO_TARG)
+ git submodule init
git pull --recurse-submodules
for x in $^; do cd $$x; git checkout origin/HEAD ; cd ..; done
+# Generate a dist tarball from the head of all submodules
+dist-head: checkout-head
+ $(eval DIST_FILE := $(COMPONENT)-${COMPONENT_VERSION}~$$$${BUILD_NUMBER:-1})
+ $(Q)git-archive-all --prefix=$(DIST_FILE)/ $(DIST_FILE).tgz
+ $(Q)mv $(DIST_FILE).tgz $(DIST_FILE).tar.gz
+
dist:
$(eval GIT_TAG := $(shell git describe --abbrev=0 --match "release/*"))
$(eval GIT_VER := $(shell x="$(GIT_TAG)"; echo "$${x#release/}"))