summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2007-04-05 19:26:04 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2007-04-05 19:26:04 +0000
commit5a793ad549794de0437de8f599a69d4574429285 (patch)
tree5dada27b99460baadd324c9b70de9eb8802d9aed
parentc758a2265c90e6d4e15c1a1942f481db606e3d3e (diff)
Distinguish between C and other source when doing whitespace checksmerge_point_for_telepathy-gabble-olpc
-rw-r--r--lib/telepathy-glib/Makefile.am9
-rw-r--r--lib/tests/Makefile.am15
-rw-r--r--src/Makefile.am9
-rw-r--r--tests/Makefile.am18
4 files changed, 37 insertions, 14 deletions
diff --git a/lib/telepathy-glib/Makefile.am b/lib/telepathy-glib/Makefile.am
index 3a8d8dbc9..e7da23142 100644
--- a/lib/telepathy-glib/Makefile.am
+++ b/lib/telepathy-glib/Makefile.am
@@ -84,25 +84,26 @@ CLEANFILES = $(BUILT_SOURCES) _gen/.exists
clean-local:
-rmdir _gen
-whitespace_sources = \
+check_c_sources = \
$(tpginclude_HEADERS) \
$(libtelepathy_glib_la_SOURCES)
+check_whitespace_sources = $(check_c_sources)
check-local::
@echo "Checking whitespace-related trivia..."
- @if grep -n ' $$' $(whitespace_sources); \
+ @if grep -n ' $$' $(check_whitespace_sources); \
then \
echo "^^^ The above files contain unwanted trailing spaces"; \
exit 1; \
fi
- @if grep -n ' ' $(whitespace_sources); \
+ @if grep -n ' ' $(check_whitespace_sources); \
then \
echo "^^^ The above files contain tabs"; \
exit 1; \
fi
@echo "Checking for GError mistakes..."
@if grep -n '^ *GError *\*[a-zA-Z_][a-zA-Z0-9_]* *;' \
- $(whitespace_sources); \
+ $(check_c_sources); \
then \
echo "^^^ The above files contain uninitialized GError*s -"; \
echo " they should be initialized to NULL"; \
diff --git a/lib/tests/Makefile.am b/lib/tests/Makefile.am
index 5499c851b..dcbe1a17c 100644
--- a/lib/tests/Makefile.am
+++ b/lib/tests/Makefile.am
@@ -32,20 +32,29 @@ test_internal_debug_SOURCES = \
test_internal_debug_LDADD = \
../telepathy-glib/libtelepathy-glib.la
-whitespace_sources = *.c
+check_c_sources = *.c
+check_whitespace_sources = $(check_c_sources)
check-local::
@echo "Checking whitespace-related trivia..."
- @if grep -n ' $$' $(whitespace_sources); \
+ @if grep -n ' $$' $(check_whitespace_sources); \
then \
echo "^^^ The above files contain unwanted trailing spaces"; \
exit 1; \
fi
- @if grep -n ' ' $(whitespace_sources); \
+ @if grep -n ' ' $(check_whitespace_sources); \
then \
echo "^^^ The above files contain tabs"; \
exit 1; \
fi
+ @echo "Checking for GError mistakes..."
+ @if grep -n '^ *GError *\*[a-zA-Z_][a-zA-Z0-9_]* *;' \
+ $(check_c_sources); \
+ then \
+ echo "^^^ The above files contain uninitialized GError*s -"; \
+ echo " they should be initialized to NULL"; \
+ exit 1; \
+ fi
AM_CFLAGS = $(ERROR_CFLAGS) @DBUS_CFLAGS@ @GLIB_CFLAGS@ @COVERAGE_CFLAGS@ -I.. -I$(srcdir)/..
AM_LDFLAGS = @DBUS_LIBS@ @GLIB_LIBS@
diff --git a/src/Makefile.am b/src/Makefile.am
index f876f2ebb..113a853c8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -92,27 +92,28 @@ telepathy_gabble_SOURCES = \
gabble.h \
gabble.c
-whitespace_sources = \
+check_c_sources = \
$(telepathy_gabble_SOURCES) \
$(libgabble_convenience_la_our_sources) \
$(telepathy_gabble_SOURCES) \
$(write_mgr_file_SOURCES)
+check_whitespace_sources = $(check_c_sources)
check-local::
@echo "Checking whitespace-related trivia..."
- @if grep -n ' $$' $(whitespace_sources); \
+ @if grep -n ' $$' $(check_whitespace_sources); \
then \
echo "^^^ The above files contain unwanted trailing spaces"; \
exit 1; \
fi
- @if grep -n ' ' $(whitespace_sources); \
+ @if grep -n ' ' $(check_whitespace_sources); \
then \
echo "^^^ The above files contain tabs"; \
exit 1; \
fi
@echo "Checking for GError mistakes..."
@if grep -n '^ *GError *\*[a-zA-Z_][a-zA-Z0-9_]* *;' \
- $(whitespace_sources); \
+ $(check_c_sources); \
then \
echo "^^^ The above files contain uninitialized GError*s -"; \
echo " they should be initialized to NULL"; \
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 0d8be793a..9bbb96636 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -55,17 +55,29 @@ EXTRA_DIST = $(service_in_files) $(conf_in_files)
CLEANFILES = $(BUILT_SOURCES)
-whitespace_sources = *.c $(python_tests_shfiles) $(python_tests_pythonfiles)
+check_c_sources = *.c
+check_whitespace_sources = \
+ $(check_c_sources) \
+ $(python_tests_shfiles) \
+ $(python_tests_pythonfiles)
check-local::
@echo "Checking whitespace-related trivia..."
- @if grep -n ' $$' $(whitespace_sources); \
+ @if grep -n ' $$' $(check_whitespace_sources); \
then \
echo "^^^ The above files contain unwanted trailing spaces"; \
exit 1; \
fi
- @if grep -n ' ' $(whitespace_sources); \
+ @if grep -n ' ' $(check_whitespace_sources); \
then \
echo "^^^ The above files contain tabs"; \
exit 1; \
fi
+ @echo "Checking for GError mistakes..."
+ @if grep -n '^ *GError *\*[a-zA-Z_][a-zA-Z0-9_]* *;' \
+ $(check_c_sources); \
+ then \
+ echo "^^^ The above files contain uninitialized GError*s -"; \
+ echo " they should be initialized to NULL"; \
+ exit 1; \
+ fi