Code

Store cached icons to disk between runs, and invalidate/purge as needed.
[inkscape.git] / src / check-header-compile.in
1 #! /bin/sh
2 # Check that each .h file has all the includes it needs.
4 # Probably requires gnu find (for -printf '%P\n').
6 # This script hereby placed into the public domain.
8 set -e
9 mydir=`dirname "$0"`
10 cd "$mydir"
11 srcdir="@srcdir@"
12 CXX="@CXX@"
13 INCLUDES="@GNOME_VFS_CFLAGS@ @POPPLER_GLIB_CFLAGS@ @INKSCAPE_CFLAGS@"
14 OBJEXT="@OBJEXT@"
15 config_h_dir=..
17 check_compile () {
18         (echo "#include <config.h>"; echo "#include <$1>"; echo "int header_tst_dummy;") > header-tst.cpp
19         $CXX -c -I. -I"$srcdir" -I$config_h_dir $INCLUDES header-tst.cpp
20 }
22 if [ $# = 0 ]; then
23         for i in `find "$srcdir"        \
24                    -name bonobo -prune  \
25                 -o -name dom -prune     \
26                 -o -name ecma -prune    \
27                 -o -name render -prune  \
28                 -o -name xpath -prune   \
29                 -o -path '*/extension/script/js' -prune \
30                 -o -name '*.h' \
31                    \! -name gnome.h \! -name nr-type-gnome.h \! -name Livarot.h \! -name radial.h \
32                    \! -name '*-test.h'  \
33                    \! -name test-helpers.h      \
34                    \! -name PylogFormatter.h    \
35                    \! -name TRPIFormatter.h     \
36                    \! -name win32.h     \
37                    \! -name '*-w32.h'   \
38                    \! -name '*-win32.h' \
39                    -printf '%P\n'`
40         do
41                 check_compile "$i"
42         done
43 else
44         for i in "$@"; do
45                 check_compile "$i"
46         done
47 fi
48 rm header-tst.cpp header-tst.$OBJEXT