From d1655e6702c8c6518bac008a86a38739ac0110db Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Fri, 19 Apr 2013 12:08:37 +0100 Subject: add dist target and add missing copyright assignments --- COPYING | 19 +++++++++++++++++++ Makefile | 20 ++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 COPYING diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..e0e5a24 --- /dev/null +++ b/COPYING @@ -0,0 +1,19 @@ +Copyright 2009-2013 The NetSurf Browser Project + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + + * The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Makefile b/Makefile index 41406ae..070cd9a 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,13 @@ +#!/bin/make +# +# Makefile for NetSurf buildsystem +# +# Copyright 2009-1013 John-Mark Bell + +# 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) -- cgit v1.2.3