From a1287e483ce8efcf3f1eca97bdaaccac2393a1bf Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 3 Apr 2007 20:30:30 -0400 Subject: [PATCH] [pixman/src/check-config.sh] Test that all source files #include as their first include. --- pixman/src/Makefile.am | 3 +++ pixman/src/check-config.sh | 17 +++++++++++++++++ src/check-cairoint.sh | 2 +- 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100755 pixman/src/check-config.sh diff --git a/pixman/src/Makefile.am b/pixman/src/Makefile.am index 7b828f5c5..7b0f0f6de 100644 --- a/pixman/src/Makefile.am +++ b/pixman/src/Makefile.am @@ -38,3 +38,6 @@ libpixman_mmx_la_SOURCES = \ libpixman_mmx_la_CFLAGS = $(PIXMAN_CFLAGS) libpixman_la_LIBADD = libpixman-mmx.la endif + +TESTS = check-config.sh +EXTRA_DIST = $(TESTS) diff --git a/pixman/src/check-config.sh b/pixman/src/check-config.sh new file mode 100755 index 000000000..a1f919473 --- /dev/null +++ b/pixman/src/check-config.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +LANG=C + +test -z "$srcdir" && srcdir=. +status=0 + +echo 'Checking source files for missing or misplaced #include ' + +find "$srcdir" -name '*.c' -or -name '*.cpp' | +while read x; do + grep '\' "$x" /dev/null | head -n 1 +done | +grep -v '' | +grep . && status = 1 + +exit $status diff --git a/src/check-cairoint.sh b/src/check-cairoint.sh index 0c05589d1..05ba8eab7 100755 --- a/src/check-cairoint.sh +++ b/src/check-cairoint.sh @@ -9,7 +9,7 @@ echo 'Checking source files for missing or misplaced #include "cairoint.h"' find "$srcdir" -name '*.c' -or -name '*.cpp' | while read x; do - grep 'include' "$x" /dev/null | head -n 1 + grep '\' "$x" /dev/null | head -n 1 done | grep -v '"cairoint.h"' | grep . && status = 1