diff options
author | Vincent Sanders <vincent.sanders@collabora.co.uk> | 2013-04-19 12:08:37 +0100 |
---|---|---|
committer | Vincent Sanders <vincent.sanders@collabora.co.uk> | 2013-04-19 12:08:37 +0100 |
commit | d1655e6702c8c6518bac008a86a38739ac0110db (patch) | |
tree | fc94a5d2def6ff626cb6d74593256af548c0c143 /Makefile | |
parent | 400dd74ad6f3d68ca07e61a8b3ade9e07ba2ba68 (diff) | |
download | buildsystem-d1655e6702c8c6518bac008a86a38739ac0110db.tar.gz buildsystem-d1655e6702c8c6518bac008a86a38739ac0110db.tar.bz2 |
add dist target and add missing copyright assignments
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -1,3 +1,13 @@ +#!/bin/make +# +# Makefile for NetSurf buildsystem +# +# Copyright 2009-1013 John-Mark Bell <jmb@netsurf-browser.org> + +# Component settings +COMPONENT := buildsystem +COMPONENT_VERSION := 1.0 + all: usage usage: @@ -27,3 +37,13 @@ install: cp testtools/$$T $(BASE)/testtools/; \ done +# Distribution +# This constructs a distribution tar from the last git tag. It ensures +# the Makefile component version matches the git tag version and the +# tar is apropriately named for the component being generated +dist: + $(eval GIT_TAG := $(shell git describe --abbrev=0 --match "v*")) + $(eval GIT_VER := $(shell x="$(GIT_TAG)"; echo "$${x#v}")) + $(if $(subst $(GIT_VER),,$(COMPONENT_VERSION)), $(error Component Version "$(COMPONENT_VERSION)" and GIT tag version "$(GIT_VER)" do not match)) + $(eval DIST_FILE := lib$(COMPONENT)-${GIT_VER}) + $(Q)git archive --format=tar.gz --prefix=$(DIST_FILE)/ -o $(DIST_FILE).tar.gz $(GIT_TAG) |