changeset 25816:237924975f94

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.)
author Richard Laager <rlaager@wiktel.com>
date Sun, 02 Nov 2008 21:24:23 +0000
parents 9fa1ee62fca2
children 673abaf19f6e
files Makefile.am
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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