# HG changeset patch
# User Richard Laager <rlaager@wiktel.com>
# Date 1225661063 0
# Node ID 237924975f94df9425bd3d3ab0bae62b7547c49c
# Parent  9fa1ee62fca2c4a2034b3289a961596c029d03a0
Add a commit-check target.  The idea is you could use this in a pre-commit
hook.  Currently, it just checks that the POTFILES.in and POTFILES.skip
files are up-to-date and properly sorted.  (This target is also called by
version-check, so we'll be sure it runs at least once before a release.)

diff -r 9fa1ee62fca2 -r 237924975f94 Makefile.am
--- a/Makefile.am	Sun Nov 02 21:06:05 2008 +0000
+++ b/Makefile.am	Sun Nov 02 21:24:23 2008 +0000
@@ -30,7 +30,12 @@
 distcheck-hook: libpurple/plugins/perl/common/Purple.pm pidgin/plugins/perl/common/Pidgin.pm
 #	cp libpurple/plugins/perl/common/Gaim.pm $(distdir)/libpurple/plugins/perl/common
 
-version-check:
+commit-check:
+	(cd po ; intltool-update -m 2>&1 | grep -v '^mismatched quotes.*\.py$$' | sed "s|current directory|po directory|" | grep . ; if [ $$? = 0 ] ; then exit 1 ; else exit 0 ; fi)
+	LC_ALL=C sort -c -t/ -u po/POTFILES.in
+	LC_ALL=C sort -c -t/ -u po/POTFILES.skip
+
+version-check: commit-check
 # We don't want to release development versions.
 	test x`echo $(PACKAGE_VERSION) | grep dev` = x