1 # Some custom targets to make it easier to release things.
3 # To make real stable releases or devel snapshots, use either:
5 # or make release-publish
7 # To make a quick properly named (date and git hash stamped) tarball:
11 TAR_OPTIONS = --owner=0 --group=0
13 dist-hook: dist-clear-sticky-bits
15 # Clean up any sticky bits we may inherit from parent dir
16 dist-clear-sticky-bits:
17 chmod -R a-s $(distdir)
21 distdir="$(distdir)-`date '+%Y%m%d'`"; \
22 test -d "$(srcdir)/.git" && distdir=$$distdir-`cd "$(srcdir)" && git rev-parse HEAD | cut -c 1-6`; \
23 TAR_OPTIONS="$(TAR_OPTIONS)" $(MAKE) $(AM_MAKEFLAGS) distdir="$$distdir" snapshot-dist
26 @(echo "$(distdir) archives ready for distribution: "; \
27 list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
28 sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
30 RELEASE_OR_SNAPSHOT = $$(if test "x$(CAIRO_VERSION_MINOR)" = "x$$(echo "$(CAIRO_VERSION_MINOR)/2*2" | bc)" ; then echo release; else echo snapshot; fi)
31 RELEASE_UPLOAD_HOST = cairographics.org
32 RELEASE_UPLOAD_BASE = /srv/cairo.freedesktop.org/www
33 RELEASE_UPLOAD_DIR = $(RELEASE_UPLOAD_BASE)/$(RELEASE_OR_SNAPSHOT)s
34 RELEASE_URL_BASE = http://cairographics.org/$(RELEASE_OR_SNAPSHOT)s
35 RELEASE_ANNOUNCE_LIST = cairo-announce@cairographics.org (and CC gnome-announce-list@gnome.org)
37 MANUAL_VERSIONED = manual-$(VERSION)
38 MANUAL_TAR_FILE = $(MANUAL_VERSIONED).tar.gz
39 MANUAL_UPLOAD_DIR = $(RELEASE_UPLOAD_BASE)
41 tar_file = $(PACKAGE)-$(VERSION).tar.xz
42 sha1_file = $(tar_file).sha1
43 gpg_file = $(sha1_file).asc
45 $(sha1_file): $(tar_file)
48 $(gpg_file): $(sha1_file)
49 @echo "Please enter your GPG password to sign the checksum."
52 release-verify-sane-changelogs: changelogs
53 @echo -n "Checking that the ChangeLog files are sane..."
54 @if grep -q "is required to generate" $(CHANGELOGS); then \
55 (echo "Ouch." && echo "Some of the ChangeLogs are not generated correctly." \
56 && echo "Remove ChangeLog* and make changelogs" \
60 release-verify-sane-tests:
61 @echo "Checking that the test suite is sane..."
62 @cd test && $(MAKE) $(AM_MAKEFLAGS) release-verify-sane-tests
64 release-verify-even-micro:
65 @echo -n "Checking that $(VERSION) has an even micro component..."
66 @test "$(CAIRO_VERSION_MICRO)" = "`echo $(CAIRO_VERSION_MICRO)/2*2 | bc`" \
67 || (echo "Ouch." && echo "The version micro component '$(CAIRO_VERSION_MICRO)' is not an even number." \
68 && echo "The version in configure.in must be incremented before a new release." \
73 @echo -n "Checking that no $(VERSION) release already exists..."
74 @ssh $(RELEASE_UPLOAD_HOST) test ! -e $(RELEASE_UPLOAD_DIR)/$(tar_file) \
75 || (echo "Ouch." && echo "Found: $(RELEASE_UPLOAD_HOST):$(RELEASE_UPLOAD_DIR)/$(tar_file)" \
76 && echo "Are you sure you have an updated checkout?" \
77 && echo "This should never happen." \
82 $(RM) $(tar_file) $(sha1_file) $(gpg_file)
85 # Strict ordering enforced for parallel make to work
87 release-verify-even-micro \
88 release-verify-sane-changelogs \
89 release-verify-sane-tests \
90 release-verify-newer \
92 $(MAKE) $(AM_MAKEFLAGS) release-remove-old
93 TAR_OPTIONS="$(TAR_OPTIONS)" $(MAKE) $(AM_MAKEFLAGS) distcheck
95 release-upload: $(tar_file) $(sha1_file) $(gpg_file)
97 scp $(tar_file) $(sha1_file) $(gpg_file) $(RELEASE_UPLOAD_HOST):$(RELEASE_UPLOAD_DIR)
98 mv $(tar_file) $(sha1_file) $(gpg_file) releases
99 ssh $(RELEASE_UPLOAD_HOST) "rm -f $(RELEASE_UPLOAD_DIR)/LATEST-$(PACKAGE)-[0-9]* && ln -s $(tar_file) $(RELEASE_UPLOAD_DIR)/LATEST-$(PACKAGE)-$(VERSION)"
100 git tag -s -m "cairo $(CAIRO_VERSION_MAJOR).$(CAIRO_VERSION_MINOR).$(CAIRO_VERSION_MICRO) release" $(CAIRO_VERSION_MAJOR).$(CAIRO_VERSION_MINOR).$(CAIRO_VERSION_MICRO)
102 release-publish-message: releases/$(sha1_file)
103 @echo "Please follow the instructions in RELEASING to push stuff out and"
104 @echo "send out the announcement mails. Here is the excerpt you need:"
106 @echo "Subject: $(PACKAGE) $(RELEASE_OR_SNAPSHOT) $(VERSION) now available"
108 @echo "============================== CUT HERE =============================="
109 @echo "A new $(PACKAGE) $(RELEASE_OR_SNAPSHOT) $(VERSION) is now available from:"
111 @echo " $(RELEASE_URL_BASE)/$(tar_file)"
113 @echo " which can be verified with:"
115 @echo " $(RELEASE_URL_BASE)/$(sha1_file)"
117 @cat releases/$(sha1_file)
119 @echo " $(RELEASE_URL_BASE)/$(gpg_file)"
120 @echo " (signed by `getent passwd "$$USER" | cut -d: -f 5 | cut -d, -f 1`)"
122 @echo " Additionally, a git clone of the source tree:"
124 @echo " git clone git://git.cairographics.org/git/cairo"
126 @echo " will include a signed $(VERSION) tag which points to a commit named:"
127 @echo " `git cat-file tag $(VERSION) | grep ^object | sed -e 's,object ,,'`"
129 @echo " which can be verified with:"
130 @echo " git verify-tag $(VERSION)"
132 @echo " and can be checked out with a command such as:"
133 @echo " git checkout -b build $(VERSION)"
135 @echo "============================== CUT HERE =============================="
137 doc-publish-versioned: doc
138 rm -rf ./$(MANUAL_VERSIONED)
139 cp -a doc/public/html $(MANUAL_VERSIONED)
140 tar czf $(MANUAL_TAR_FILE) $(MANUAL_VERSIONED)
141 scp $(MANUAL_TAR_FILE) $(RELEASE_UPLOAD_HOST):$(MANUAL_UPLOAD_DIR)
142 ssh $(RELEASE_UPLOAD_HOST) "cd $(MANUAL_UPLOAD_DIR) && tar xzf $(MANUAL_TAR_FILE) && ln -sf $(MANUAL_TAR_FILE) cairo-$(MANUAL_TAR_FILE)"
144 doc-publish-symlinks:
145 ssh $(RELEASE_UPLOAD_HOST) "cd $(MANUAL_UPLOAD_DIR) && rm -f manual && ln -s $(MANUAL_VERSIONED) manual && ln -sf $(MANUAL_TAR_FILE) cairo-manual.tar.gz"
148 $(MAKE) $(AM_MAKEFLAGS) doc-publish-versioned
149 @if test "$(RELEASE_OR_SNAPSHOT)" = release; then $(MAKE) $(AM_MAKEFLAGS) doc-publish-symlinks; fi
151 # Strict ordering enforced for parallel make to work
152 release-publish: release-check
153 $(MAKE) $(AM_MAKEFLAGS) release-upload
154 $(MAKE) $(AM_MAKEFLAGS) doc-publish
155 $(MAKE) $(AM_MAKEFLAGS) release-publish-message
159 # Win32 package zipfiles
160 runtime_zip_file = $(PACKAGE)-$(VERSION).zip
161 developer_zip_file = $(PACKAGE)-dev-$(VERSION).zip
163 $(runtime_zip_file): install
165 pwd=`pwd`; cd $(prefix); \
166 zip "$$pwd"/$@ bin/libcairo-$(CAIRO_VERSION_SONUM).dll
168 $(developer_zip_file): install
170 pwd=`pwd`; cd $(prefix); \
171 zip -r "$$pwd"/$@ include/cairo lib/libcairo.dll.a lib/cairo.lib lib/pkgconfig/cairo.pc lib/pkgconfig/cairo-*.pc share/gtk-doc/html/cairo
173 zips: $(runtime_zip_file) $(developer_zip_file)
179 dist-clear-sticky-bits \
181 doc-publish-symlinks \
182 doc-publish-versioned \
185 release-publish-message \
188 release-verify-even-micro \
189 release-verify-newer \
190 release-verify-sane-changelogs \
191 release-verify-sane-tests \