diff options
author | Damien Lespiau <damien.lespiau@intel.com> | 2011-01-10 11:52:20 +0000 |
---|---|---|
committer | Damien Lespiau <damien.lespiau@intel.com> | 2011-01-10 11:52:20 +0000 |
commit | 7224f6d32a733acba17d1685f73330a237673f2b (patch) | |
tree | 3ed132d9e6887fe34184de2f569e0b5466fd53f8 | |
parent | 285c3dc65cb2e1705389f07aa2b9f5c3357f798f (diff) | |
download | clutter-gst-7224f6d32a733acba17d1685f73330a237673f2b.tar.gz |
build: Introduce new targets to help making releases1.3.4
Copy what Clutter does and add two new Makefile targets (release-check
and release-upload) that helps me making releases
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | build/autotools/Makefile.am.release | 85 | ||||
-rw-r--r-- | configure.ac | 26 |
3 files changed, 104 insertions, 9 deletions
diff --git a/Makefile.am b/Makefile.am index 78ad292..64c48c3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -28,3 +28,5 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc MAINTAINERCLEANFILES = aclocal.m4 compile config.guess config.sub \ configure depcomp install-sh ltmain.sh \ Makefile.in missing config.h.in + +include $(top_srcdir)/build/autotools/Makefile.am.release diff --git a/build/autotools/Makefile.am.release b/build/autotools/Makefile.am.release new file mode 100644 index 0000000..6cf9b09 --- /dev/null +++ b/build/autotools/Makefile.am.release @@ -0,0 +1,85 @@ +# To make real stable releases or devel snapshots, use either: +# make release-check +# or make release-publish + +TAR_OPTIONS = --owner=0 --group=0 + +RELEASE_UPLOAD_HOST = clutter-project.org +RELEASE_UPLOAD_USER = clutter +RELEASE_UPLOAD_DIR = $(RELEASE_UPLOAD_USER)@$(RELEASE_UPLOAD_HOST):upload-source + +RELEASE_URL_BASE = http://source.clutter-project.org/sources/clutter-gst +RELEASE_URL = $(RELEASE_URL_BASE)/$(CLUTTER_GST_MAJOR_VERSION).$(CLUTTER_GST_MINOR_VERSION) + +RELEASE_ANNOUNCE_LIST = clutter-announce@clutter-project.org (Cc: gnome-announce-list@gnome.org) + +tar_file = $(distdir).tar.bz2 +sha256_file = $(distdir).sha256sum + +$(sha256_file): $(tar_file) + $(AM_V_GEN)sha256sum $^ > $@ + +release-check: release-verify-even-micro release-verify-news + TAR_OPTIONS="$(TAR_OPTIONS)" $(MAKE) $(AM_MAKEFLAGS) distcheck + +release-verify-news: + @echo -n "Checking that the NEWS file has been updated..." + @if ! grep -q "$(CLUTTER_GST_VERSION)" $(top_srcdir)/NEWS; then \ + (echo "Ouch." && \ + echo "The version in the NEWS file does not match $(CLUTTER_GST_VERSION)." && \ + echo "This probably means you haven't updated the NEWS file." && \ + false); else :; fi + @echo "Good." + +release-verify-even-micro: + @echo -n "Checking that $(VERSION) has an even micro component..." + @test "$(CLUTTER_GST_MICRO_VERSION)" = "`echo $(CLUTTER_GST_MICRO_VERSION)/2*2 | bc`" \ + || (echo "Ouch." && \ + echo "The version micro component '$(CLUTTER_GST_MICRO_VERSION)' is not an even number." && \ + echo "The version in configure.ac must be incremented before a new release." && \ + false) + @echo "Good." + +release-upload: $(sha256_file) + @scp $(tar_file) $(RELEASE_UPLOAD_DIR) + +release-message: $(sha256_file) + @echo "Release URL: $(RELEASE_URL)/$(tar_file)" + @echo "Release checksum: $(RELEASE_URL)/$(sha256_file)" + @echo "Send an email to: $(RELEASE_ANNOUNCE_LIST)" + @echo " Subject: $(PACKAGE) $(CLUTTER_GST_VERSION) ($(CLUTTER_GST_RELEASE_STATUS))" + @echo "Contents:" + @echo "--- CUT HERE ---" + @echo "A new $(PACKAGE) $(CLUTTER_GST_RELEASE_STATUS) is now available at:" + @echo "" + @echo " $(RELEASE_URL)/$(tar_file)" + @echo "" + @echo "SHA256 Checksum:" + @echo "" + @cat $(top_builddir)/$(sha256_file) + @echo "" + @echo "Additionally, a git clone of the source tree:" + @echo "" + @echo " git clone git://git.clutter-project.org/clutter-gst" + @echo "" + @echo "will include a signed $(CLUTTER_GST_VERSION) tag which points to a commit named:" + @echo " `git cat-file tag $(CLUTTER_GST_VERSION) | grep ^object | sed -e 's,object ,,'`" + @echo "" + @echo "which can be verified with:" + @echo " git verify-tag $(CLUTTER_GST_VERSION)" + @echo "" + @echo "and can be checked out with a command such as:" + @echo " git checkout -b build $(CLUTTER_GST_VERSION)" + @echo "" + @echo "--- CUT HERE ---" + +release-publish: release-check + $(MAKE) $(AM_MAKEFLAGS) release-upload + $(MAKE) $(AM_MAKEFLAGS) release-message + +.PHONY: \ + release-check \ + release-message \ + release-publish \ + release-upload \ + release-verify-even-micro diff --git a/configure.ac b/configure.ac index def63eb..b909e22 100644 --- a/configure.ac +++ b/configure.ac @@ -25,7 +25,7 @@ AC_CONFIG_AUX_DIR([build/autotools]) AC_CONFIG_SRCDIR([clutter-gst/clutter-gst.h]) AM_CONFIG_HEADER([config.h]) -AM_INIT_AUTOMAKE([1.9 -Wno-portability foreign]) +AM_INIT_AUTOMAKE([1.9 -Wno-portability foreign no-dist-gzip dist-bzip2]) CLUTTER_GST_MAJOR_VERSION=clutter_gst_major_version CLUTTER_GST_MINOR_VERSION=clutter_gst_minor_version @@ -56,6 +56,12 @@ CLUTTER_GST_LT_LDFLAGS="-version-info $CLUTTER_GST_LT_VERSION" AC_SUBST(CLUTTER_GST_LT_VERSION) AC_SUBST(CLUTTER_GST_LT_LDFLAGS) +m4_define([clutter_gst_release_status], + [m4_if(m4_eval(clutter_gst_micro_version % 2), [1], [git], + [m4_if(m4_eval(clutter_gst_minor_version % 2), [1], [snapshot], + [release])])]) +AC_SUBST([CLUTTER_GST_RELEASE_STATUS], [clutter_gst_release_status]) + dnl ======================================================================== m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) @@ -203,15 +209,17 @@ AC_OUTPUT([ dnl ======================================================================== echo "" -echo " Clutter-GST $VERSION" -echo " ===================" +echo "Clutter-GST $VERSION (${CLUTTER_GST_RELEASE_STATUS})" echo "" -echo " prefix: ${prefix}" -echo " Compiler flags: ${MAINTAINER_CFLAGS} ${CPPFLAGS}" +echo " • Global:" +echo " Prefix : ${prefix}" +echo " Cg compiler: ${have_cgc}" echo "" -echo " Cg compiler: ${have_cgc}" +echo " • Compiler options:" +echo " Compiler flags:${MAINTAINER_CFLAGS} ${CPPFLAGS}" +echo " Debug level : ${enable_debug}" echo "" -echo " debug level: ${enable_debug}" -echo " Build API documentation: ${enable_gtk_doc}" -echo " Introspection data: ${enable_introspection}" +echo " • Extra:" +echo " API documentation : ${enable_gtk_doc}" +echo " Introspection data: ${enable_introspection}" echo "" |