Post release version bump
[gpgol.git] / Makefile.am
index c64524f..4f80a37 100644 (file)
@@ -1,6 +1,6 @@
 # Makefile.am - main makefile for GPGol
 # Copyright (C) 2005 g10 Code GmbH
-# 
+#
 # This file is free software; as a special exception the author gives
 # unlimited permission to copy and/or distribute it, with or without
 # modifications, as long as this notice is preserved.
 
 ACLOCAL_AMFLAGS = -I m4
 AUTOMAKE_OPTIONS = dist-bzip2
-
-EXTRA_DIST = autogen.sh
-
-
-SUBDIRS = src po m4
-
-dist-hook:
+# Because we can only build the w32 version we need to help automake here a bit.
+DISTCHECK_CONFIGURE_FLAGS = --host=@host@  --build=@build@ \
+                            SYSROOT=@prefix@ \
+                            PKG_CONFIG_LIBDIR=@prefix@ \
+                            --with-gpg-error-prefix=@prefix@ \
+                            --with-gpgme-prefix=@prefix@ \
+                            --with-libassuan-prefix=@prefix@
+
+# Note: Do not put ChangeLog-2011 here - it exists only in the repo.
+EXTRA_DIST = autogen.sh autogen.rc
+
+if HAVE_W32_SYSTEM
+SUBDIRS = src tests forms po m4 doc
+else
+SUBDIRS = tests
+endif
+
+dist-hook: gen-ChangeLog
        echo "$(VERSION)" > $(distdir)/VERSION
 
-
-
-
+gen_start_date = 2011-12-01T00:00:00
+.PHONY: gen-ChangeLog
+gen-ChangeLog:
+       if test -d $(top_srcdir)/.git; then                             \
+         (cd $(top_srcdir) &&                                          \
+           ./build-aux/gitlog-to-changelog                             \
+           --amend=build-aux/git-log-fix  --tear-off                   \
+           --since=$(gen_start_date) ) > $(distdir)/cl-t;              \
+          cat $(top_srcdir)/ChangeLog-2011 >> $(distdir)/cl-t;          \
+         rm -f $(distdir)/ChangeLog;                                   \
+         mv $(distdir)/cl-t $(distdir)/ChangeLog;                      \
+       fi
+
+distcheck-hook:
+       set -e; ( \
+       pref="#+macro: gpgol_" ;\
+       reldate="$$(date -u +%Y-%m-%d)" ;\
+        echo "$${pref}ver  $(PACKAGE_VERSION)"  ;\
+        echo "$${pref}date $${reldate}" ;\
+        list='$(DIST_ARCHIVES)'; for i in $$list; do \
+         case "$$i" in *.tar.bz2) \
+            echo "$${pref}size $$(wc -c <$$i|awk '{print int($$1/1024)}')k" ;\
+           echo "$${pref}sha1 $$(sha1sum <$$i|cut -d' ' -f1)" ;\
+           echo "$${pref}sha2 $$(sha256sum <$$i|cut -d' ' -f1)" ;;\
+         esac;\
+       done ) | tee $(distdir).swdb