summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vincent.sanders@collabora.co.uk>2013-04-19 12:08:37 +0100
committerVincent Sanders <vincent.sanders@collabora.co.uk>2013-04-19 12:08:37 +0100
commitd1655e6702c8c6518bac008a86a38739ac0110db (patch)
treefc94a5d2def6ff626cb6d74593256af548c0c143
parent400dd74ad6f3d68ca07e61a8b3ade9e07ba2ba68 (diff)
downloadbuildsystem-d1655e6702c8c6518bac008a86a38739ac0110db.tar.gz
buildsystem-d1655e6702c8c6518bac008a86a38739ac0110db.tar.bz2
add dist target and add missing copyright assignments
-rw-r--r--COPYING19
-rw-r--r--Makefile20
2 files changed, 39 insertions, 0 deletions
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 <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)