Debian Codegraph @

caca/t/check-win32

raw
1 #!/bin/sh
2
3 export MAKEFLAGS=""
4 top_srcdir="$(make -s echo-topdir)"
5
6 #
7 # Check that the Win32 config.h is in sync with config.h.in
8 #
9
10 config_h_in="${top_srcdir}/config.h.in"
11 win32_config_h="${top_srcdir}/build/win32/config.h"
12
13 nfails=0
14 ntokens=0
15 for key in $(sed -ne 's/.*#undef *\([A-Za-z0-9_]*\).*/\1/p' "$config_h_in");
16 do
17 ntokens=$(($ntokens + 1))
18 if ! grep '[ef] \<'"$key"'\>' "$win32_config_h" >/dev/null 2>&1; then
19 echo "error: $key missing from build/win32/config.h"
20 nfails=$(($nfails + 1))
21 fi
22 done
23
24 echo "$ntokens tokens, $nfails errors in Win32 config.h"
25
26 if test "$nfails" != "0"; then
27 exit 1
28 fi
29
30 exit 0
31