[cairo-commit] 2 commits - Makefile

Chris Wilson ickle at kemper.freedesktop.org
Sun Aug 23 05:26:08 PDT 2009


 Makefile |   51 +++++++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 49 insertions(+), 2 deletions(-)

New commits:
commit fee24dc2b0f62103683e6ce242a44c7306a5fb1d
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Aug 23 13:21:15 2009 +0100

    Makefile: check for local modifications before snapshotting

diff --git a/Makefile b/Makefile
index 1f2ed11..495d5ae 100644
--- a/Makefile
+++ b/Makefile
@@ -35,7 +35,7 @@ sha1_file = $(tar_file).sha1
 gpg_file = $(sha1_file).asc
 
 DIST := Makefile README $(wildcard *.c) $(ALL_LZMA)
-$(tar_file): Makefile
+$(tar_file): $(DIST)
 	@mkdir -p $(snapshots)
 	@echo Generating snapshot tarball: $(tar_file)
 	@tar $(TAR_OPTIONS) --transform 's#^#cairo-traces/#' -czvf $(tar_file) $(DIST)
@@ -47,7 +47,13 @@ $(gpg_file): $(sha1_file)
 	@echo "Please enter your GPG password to sign the checksum."
 	gpg --armor --sign $^
 
-snapshot: $(gpg_file)
+snapshot-dirty:
+	@if test -n "$(shell git ls-files -m $(DIST))"; then \
+		echo "Local tree has uncommitted modifications. Please commit these changes before making a snapshot." ; \
+		exit 1; \
+	fi
+
+snapshot: snapshot-dirty $(gpg_file)
 
 snapshot-upload: snapshot
 	scp $(tar_file) $(sha1_file) $(gpg_file) $(RELEASE_UPLOAD_HOST):$(RELEASE_UPLOAD_DIR)
commit 7d8d72371dcbf012fed1a78615b7abb3644648d9
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Aug 23 10:46:23 2009 +0100

    Makefile: add target to upload a snapshot
    
    A simple target based on cairo/build/Makefile.am.releasing, to
    autogenerate a tarball of the traces and upload to
    cairographics.org/snapshots.

diff --git a/Makefile b/Makefile
index 90142fc..1f2ed11 100644
--- a/Makefile
+++ b/Makefile
@@ -5,8 +5,6 @@ ALL_LZMA:= $(FULL_LZMA) $(QUICK_LZMA)
 ALL_TRACES := $(ALL_LZMA:.lzma=.trace)
 
 all: $(ALL_TRACES)
-clean:
-	rm -f $(ALL_TRACES) csi-bind csi-trace
 
 %.trace: %.lzma csi-bind
 	lzma -cd $< | ./csi-bind > $@
@@ -15,3 +13,46 @@ csi-bind: csi-bind.c
 	$(CC) $(CFLAGS) $(shell pkg-config cairo --cflags) $^ -lcairo-script-interpreter $(pkg-config cairo --libs) -o $@
 csi-trace: csi-trace.c
 	$(CC) $(CFLAGS) $(shell pkg-config cairo --cflags) $^ -lcairo-script-interpreter $(shell pkg-config cairo --libs) -o $@
+
+##########################################################
+# Some targets to make and upload a snapshot of the traces
+# Based on cairo/build/Makefile.am.releasing
+# Use:
+# 	make snapshot snapshot-upload
+
+TAR_OPTIONS = --owner=0 --group=0
+
+RELEASE_OR_SNAPSHOT   = snapshot
+RELEASE_UPLOAD_HOST   = cairographics.org
+RELEASE_UPLOAD_BASE   = /srv/cairo.freedesktop.org/www
+RELEASE_UPLOAD_DIR    = $(RELEASE_UPLOAD_BASE)/$(RELEASE_OR_SNAPSHOT)s
+RELEASE_URL_BASE      = http://cairographics.org/$(RELEASE_OR_SNAPSHOT)s
+RELEASE_ANNOUNCE_LIST = cairo-announce at cairographics.org
+
+snapshots = snapshots
+tar_file = $(snapshots)/cairo-traces-$(shell date '+%Y%m%d')-$(shell git rev-parse HEAD | cut -c 1-6).tar.gz
+sha1_file = $(tar_file).sha1
+gpg_file = $(sha1_file).asc
+
+DIST := Makefile README $(wildcard *.c) $(ALL_LZMA)
+$(tar_file): Makefile
+	@mkdir -p $(snapshots)
+	@echo Generating snapshot tarball: $(tar_file)
+	@tar $(TAR_OPTIONS) --transform 's#^#cairo-traces/#' -czvf $(tar_file) $(DIST)
+
+$(sha1_file): $(tar_file)
+	sha1sum $^ > $@
+
+$(gpg_file): $(sha1_file)
+	@echo "Please enter your GPG password to sign the checksum."
+	gpg --armor --sign $^
+
+snapshot: $(gpg_file)
+
+snapshot-upload: snapshot
+	scp $(tar_file) $(sha1_file) $(gpg_file) $(RELEASE_UPLOAD_HOST):$(RELEASE_UPLOAD_DIR)
+
+############################################################
+
+clean:
+	rm -f $(ALL_TRACES) csi-bind csi-trace $(snapshots)


More information about the cairo-commit mailing list