2 # -*- Mode: perl; indent-tabs-mode: nil -*-
7 # Copyright (C) 2000 Eazel, Inc.
9 # This library is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU General Public License as
11 # published by the Free Software Foundation; either version 2 of the
12 # License, or (at your option) any later version.
14 # This library is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 # General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with this library; if not, write to the Free Software
21 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 # Author: Darin Adler <darin@bentspoon.com>,
26 # check-POTFILES.pl: Checks for files mentioned in POTFILES.in that
27 # are not present in the Makefile.am files for those directories.
32 my @directories = (".");
36 '$(APPLETS_SUBDIRS)' => 'applets',
37 '$(AUTHENTICATE_HELPER_SUBDIRS)' => 'authenticate',
38 '$(INSTALL_SERVICE)' => 'install',
39 '$(MOZILLA_COMPONENT_SUBDIRS)' => 'mozilla',
41 '$(RPMVIEW_COMPONENT_SUBDIRS)' => 'rpmview',
42 '$(SERVICE_SUBDIRS)' => 'services',
49 # collect all files mentioned in Makefile.am files
52 my $directory = pop @directories;
54 $prefix = "$directory/" if $directory ne ".";
58 my $file = $prefix . "Makefile.am";
59 open FILE
, $file or die "can't open $file\n";
68 while (s/^\s*([^\s\\]+)//)
70 if (defined $exceptions{$1})
74 push @directories, $prefix . $exceptions{$1};
79 push @directories, $prefix . $1;
88 die "can't parse SUBDIRS in $directory\n";
91 while (s/([-_a-zA-Z0-9]+\.(c|h|xml|cpp|oaf\.in|desktop\.in))\W//)
93 $files{$prefix . $1} = $1;
99 open POTFILES
, "po/POTFILES.in" or die "can't open POTFILES.in\n";
103 if (! defined $files{$_})
105 print "$_ is in POTFILES.in but not Makefile.am\n";