diff options
author | Vincent Sanders <vince@kyllikki.org> | 2014-04-25 22:59:06 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2014-04-25 22:59:06 +0100 |
commit | 2469c7cf0c171606390203ba92f77ad6a3266ab7 (patch) | |
tree | 4992fbdd6990506836517d967d9e245a63a2db60 /Makefile | |
parent | 62790b2c17e9ddb76804093231d2d33802496127 (diff) | |
download | netsurf-all-2469c7cf0c171606390203ba92f77ad6a3266ab7.tar.gz netsurf-all-2469c7cf0c171606390203ba92f77ad6a3266ab7.tar.bz2 |
add dist target
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -2,6 +2,12 @@ # # NetSurf Source makefile for libraries and browser +# Component settings +COMPONENT := netsurf-all +COMPONENT_VERSION := 3.1 + +.PHONY: build install clean release-checkout dist + export TARGET ?= gtk export PKG_CONFIG_PATH = $(TMP_PREFIX)/lib/pkgconfig TMP_PREFIX := $(CURDIR)/inst-$(TARGET) @@ -13,14 +19,14 @@ NSLIBTARG := buildsystem libwapcaplet libparserutils libcss libhubbub libdom li # 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 release-checkout +endef build: $(TMP_PREFIX)/build-stamp @@ -41,3 +47,11 @@ clean: 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 + +dist: + $(eval GIT_TAG := $(shell git describe --abbrev=0 --match "release/*")) + $(eval GIT_VER := $(shell x="$(GIT_TAG)"; echo "$${x#release/}")) + $(if $(subst $(GIT_VER),,$(COMPONENT_VERSION)), $(error Component Version "$(COMPONENT_VERSION)" and GIT tag version "$(GIT_VER)" do not match)) + $(eval DIST_FILE := $(COMPONENT)-${GIT_VER}) + $(Q)git-archive-all --force-submodules --prefix=$(DIST_FILE)/ $(DIST_FILE).tgz + $(Q)mv $(DIST_FILE).tgz $(DIST_FILE).tar.gz |