check-header-guards.sh revision d05d13df02fbe76814694fe49cc01bbb41c3d0e7
1#!/bin/sh
2
3LC_ALL=C
4export LC_ALL
5
6test -z "$srcdir" && srcdir=.
7stat=0
8
9cd "$srcdir"
10
11for x in *.h *.hh ; do
12	tag=`echo "$x" | tr 'a-z.-' 'A-Z_'`
13	lines=`grep "$tag" "$x" | wc -l`
14	if test "x$lines" != x3; then
15		echo "Ouch, header file $x does not have correct preprocessor guards"
16		stat=1
17	fi
18done
19
20exit $stat
21