summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2009-08-23 10:46:23 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2009-08-23 10:48:00 +0100
commit7d8d72371dcbf012fed1a78615b7abb3644648d9 (patch)
treefbcf1d46b6bcf5f15a863403efc7374fa6a3201c /Makefile
parentc785f908d2baf1c2017e61ed60fc1e9faac43937 (diff)
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.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile45
1 files changed, 43 insertions, 2 deletions
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@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)