blob: 495d5ae4f20bcc1b2e95d3918161fb26f608c607 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
NULL :=
FULL_LZMA := $(wildcard full/*.lzma)
QUICK_LZMA := $(wildcard benchmark/*.lzma)
ALL_LZMA:= $(FULL_LZMA) $(QUICK_LZMA)
ALL_TRACES := $(ALL_LZMA:.lzma=.trace)
all: $(ALL_TRACES)
%.trace: %.lzma csi-bind
lzma -cd $< | ./csi-bind > $@
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): $(DIST)
@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-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)
############################################################
clean:
rm -f $(ALL_TRACES) csi-bind csi-trace $(snapshots)
|