[vlc-devel] commit: Look for config.h output in public header files ( Rémi Denis-Courmont )

git version control git at videolan.org
Thu May 1 18:30:41 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Thu May  1 19:11:07 2008 +0300| [ea0c5c53fd2910a995b935b5ec3417bf85ec8ae6]

Look for config.h output in public header files

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ea0c5c53fd2910a995b935b5ec3417bf85ec8ae6
---

 src/Makefile.am   |    5 +++--
 src/check_headers |   14 ++++++++++++++
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index cea2298..c5e1e16 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -444,8 +444,8 @@ check_PROGRAMS = \
 	test_headers \
 	$(NULL)
 
-dist_check_SCRIPTS = check_symbols
-TESTS = $(check_PROGRAMS) $(dist_check_SCRIPTS)
+dist_check_SCRIPTS = check_symbols check_headers
+TESTS = $(check_PROGRAMS) check_symbols
 
 CFLAGS_tests = `$(VLC_CONFIG) --cflags libvlc`
 
@@ -478,6 +478,7 @@ check-local:
 			exit 1; \
 		fi ; \
 	done
+	$(srcdir)/check_headers $(dist_pkginclude_HEADERS) $(pkginclude_HEADERS)
 
 FORCE:
 	@echo "Generated source cannot be phony. Go away." >&2
diff --git a/src/check_headers b/src/check_headers
new file mode 100755
index 0000000..71c0fe0
--- /dev/null
+++ b/src/check_headers
@@ -0,0 +1,14 @@
+#! /bin/sh
+# Copyright © 2008 Rémi Denis-Courmont
+
+cd "$(dirname "$0")" || exit $?
+
+# Look for configure #defines in public headers.
+# There are incorrect, as external users don't have our <config.h>.
+regexp="$(cat ../config.h.in | \
+	sed -n -e 's/^#undef \([A-Z0-9_]*\)$/\1/p' | \
+	xargs | \
+	sed -e 's/ /\\\|/g')"
+
+! grep -- "$regexp" "$@"
+




More information about the vlc-devel mailing list