win32.mak: add 'check-nonportable-int64-print-format' target
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Mon, 29 Jun 2009 20:56:15 +0000 (21:56 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Sun, 2 Aug 2009 16:06:04 +0000 (17:06 +0100)
Check for non-portable printf strings (%lld, %llu, %llx etc.).

win32.mak

index d9964a3..87ac482 100644 (file)
--- a/win32.mak
+++ b/win32.mak
@@ -56,6 +56,16 @@ check-exports:
        fi; \
        exit $$fail
 
+# complain about nonportable 64-bit printf format strings (%lld, %llu etc.)
+check-nonportable-int64-print-format:
+       fail=0 ; \
+       loc=`find "$(top_srcdir)" -name '*.c' | xargs grep -n -e '%[0-9]*ll[udx]'`; \
+       if test "x$$loc" != "x"; then \
+         echo "Please fix the following print format strings:" ; \
+         find "$(top_srcdir)" -name '*.c' | xargs grep -n -e '%[0-9]*ll[udx]'; \
+         fail=1; \
+       fi; \
+       exit $$fail
 
 dist-hook: check-exports win32-check-crlf