summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2014-04-25 15:29:45 (GMT)
committer Vincent Sanders <vince@kyllikki.org>2014-04-25 15:29:45 (GMT)
commit62790b2c17e9ddb76804093231d2d33802496127 (patch)
tree772223aa4f84d5dfb4a388ff8c31e7753d980dac
parenta4da793cfbf89815214a45ef77291b2f53b40b28 (diff)
downloadnetsurf-all-62790b2c17e9ddb76804093231d2d33802496127.tar.gz
netsurf-all-62790b2c17e9ddb76804093231d2d33802496127.tar.bz2
add utility target to ease releases
-rw-r--r--Makefile11
1 files changed, 6 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index a15c4b4..60201f0 100644
--- a/Makefile
+++ b/Makefile
@@ -10,19 +10,17 @@ NETSURF_TARG := netsurf
NSLIBTARG := buildsystem libwapcaplet libparserutils libcss libhubbub libdom libnsbmp libnsgif librosprite libnsfb libsvgtiny nsgenbind
-
+# clean macro for each sub target
define do_clean
$(MAKE) distclean --directory=$1 TARGET=$(TARGET)
-
endef
+# prefixed install macro for each sub target
define do_prefix_install
$(MAKE) install --directory=$1 TARGET=$(TARGET) PREFIX=$(TMP_PREFIX) DESTDIR=
-
endef
-
-.PHONY: build install clean
+.PHONY: build install clean release-checkout
build: $(TMP_PREFIX)/build-stamp
@@ -40,3 +38,6 @@ clean:
$(RM) -r $(TMP_PREFIX)
$(foreach L,$(NSLIBTARG),$(call do_clean,$(L)))
$(MAKE) clean --directory=$(NETSURF_TARG) TARGET=$(TARGET)
+
+release-checkout: $(NSLIBTARG) $(NETSURF_TARG)
+ for x in $^; do cd $$x; (git checkout origin/HEAD && git checkout $$(git describe --abbrev=0 --match="release/*" )); cd ..; done