[cairo-commit] 2 commits - src/check-cairoint.sh src/check-doc-syntax.sh src/check-headers.sh src/Makefile.am

Behdad Esfahbod behdad at kemper.freedesktop.org
Thu Sep 18 12:57:37 PDT 2008


 src/Makefile.am         |    6 ++++++
 src/check-cairoint.sh   |    9 +++++++--
 src/check-doc-syntax.sh |    4 +++-
 src/check-headers.sh    |    9 +++++++--
 4 files changed, 23 insertions(+), 5 deletions(-)

New commits:
commit 73c70488f36b595fdfa47068309cc886bf0861ef
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Thu Sep 18 15:56:53 2008 -0400

    [src/check-*.sh] Use computed list of source files instead of running "find"
    
    When the lists are available use them.  They will be available to test
    programs by make.

diff --git a/src/Makefile.am b/src/Makefile.am
index 60a5520..7d26f26 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -60,7 +60,13 @@ TESTS_ENVIRONMENT = \
 	srcdir="$(srcdir)" \
 	MAKE="$(MAKE) $(AM_MAKEFLAGS)" \
 	all_cairo_files="$(all_cairo_files)" \
+	all_cairo_headers="$(all_cairo_headers)" \
+	all_cairo_private="$(all_cairo_private)" \
+	all_cairo_sources="$(all_cairo_sources)" \
 	enabled_cairo_files="$(enabled_cairo_files)" \
+	enabled_cairo_headers="$(enabled_cairo_headers)" \
+	enabled_cairo_private="$(enabled_cairo_private)" \
+	enabled_cairo_sources="$(enabled_cairo_sources)" \
 	$(NULL)
 TESTS_SH = \
 	check-def.sh \
diff --git a/src/check-cairoint.sh b/src/check-cairoint.sh
index 83ee1c9..1f33224 100755
--- a/src/check-cairoint.sh
+++ b/src/check-cairoint.sh
@@ -7,8 +7,13 @@ stat=0
 
 echo 'Checking source files for missing or misplaced #include "cairoint.h"'
 
-find "$srcdir" \( -name '*.c' -or -name '*.cpp' \) -and ! \( -name 'check-*.c' -or -name 'lt-check-*.c' \) |
-while read x; do
+cd "$srcdir"
+FILES=$all_cairo_sources
+if test "x$FILES" = x; then
+	FILES=`find . -name 'cairo*.c' -or -name 'cairo*.cpp'`
+fi
+
+for x in $FILES; do
 	grep '\<include\>' "$x" /dev/null | head -n 1
 done |
 grep -v '"cairoint.h"' |
diff --git a/src/check-headers.sh b/src/check-headers.sh
index f34abb0..c1a1f52 100755
--- a/src/check-headers.sh
+++ b/src/check-headers.sh
@@ -7,8 +7,13 @@ stat=0
 
 echo Checking public headers for missing cairo_public decorators
 
-find "$srcdir" -name '*.h' ! -name '*-private.h' ! -name '*-test.h' ! -name 'cairoint.h' ! -name 'cairo-no-features.h' |
-xargs grep -B 1 '^cairo_.*[ 	]\+(' |
+cd "$srcdir"
+FILES=$all_cairo_headers
+if test "x$FILES" = x; then
+	FILES=`find . -name 'cairo*.h' ! -name '*-private.h' ! -name 'cairoint.h'`
+fi
+
+grep -B 1 '^cairo_.*[ 	]\+(' /dev/null $FILES |
 awk '
 /^--$/ { context=""; public=0; next; }
 /:cairo_.*[ 	]+\(/ { if (!public) {print context; print; print "--";} next; }
commit 1ee675d6a00ecd70447459f098e469c71b748d77
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Thu Sep 18 15:55:23 2008 -0400

    [src/check-doc/syntax.sh] Fix test for out-of-tree build
    
    Now that our build system can compute a list of all cairo files,
    we prefer to use that in the tests instead of running "find".
    However, we were not switching to $(srcdir) so the test was not
    finding source files in out-of-tree builds.  Noticed that from
    the grep error in distcheck.

diff --git a/src/check-doc-syntax.sh b/src/check-doc-syntax.sh
index 98ea61e..f2d4bf2 100755
--- a/src/check-doc-syntax.sh
+++ b/src/check-doc-syntax.sh
@@ -14,12 +14,14 @@ stat=0
 
 echo Checking documentation for incorrect syntax
 
+cd "$srcdir"
+
 # Note: this test is also run from doc/public/ to check the SGML files
 
 if test "x$SGML_DOCS" = x; then
     FILES=$all_cairo_files
     if test "x$FILES" = x; then
-        FILES=`find "$srcdir" -name '*.h' -or -name '*.c' -or -name '*.cpp'`
+        FILES=`find . -name 'cairo*.h' -or -name 'cairo*.c' -or -name 'cairo*.cpp'`
     fi
 fi
 


More information about the cairo-commit mailing list