5 # Copyright (C) 2008 Morten Welinder.
7 # This program is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU General Public License as
9 # published by the Free Software Foundation; either version 2 of the
10 # License, or (at your option) any later version.
12 # This library is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this library; if not, see <https://www.gnu.org/licenses/>.
20 # Author: Morten Welinder <terra@gnome.org>
28 warn "$0: should be run from top-level directory.\n"
29 unless -r
"configure.ac" && -r
'ChangeLog';
39 open (*FIND
, "find . '(' -type f -name '*.[ch]' -print ')' -o '(' -type d '(' -name intl -o -name macros -o -name .git -o -name win32 ')' -prune ')' |")
40 or die "$0: cannot execute find: $!\n";
42 foreach my $filename (<FIND
>) {
44 $filename =~ s
|^\
./||;
46 next if $exceptions{$filename};
47 my $basename = $filename;
48 $basename =~ s
|^.*/||;
49 next if $base_exceptions{$basename};
52 if (open (*FIL
, "< $filename")) {
53 # print STDERR "Checking $filename...\n";
60 if (m
'^\s*\#\s*include\s+(<gtk/gtk[a-z].*>)') {
62 print STDERR
"$0: $filename includes $1\n";
67 print STDERR
"$0: Cannot read `$filename': $!\b";