2001-08-17 03:28:31 -05:00
|
|
|
#!@-PERL-@ -w
|
|
|
|
# -*- perl -*-
|
|
|
|
#
|
|
|
|
# This perl script is used to make po/POTFILES.in, the list
|
|
|
|
# of C files to be searched for translatable strings.
|
|
|
|
#
|
|
|
|
# Author: Dave Peticolas <dave@krondo.com>
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
|
|
|
|
use File::Basename;
|
|
|
|
|
|
|
|
my @cvsignores = `find src -name '.cvsignore'`;
|
2001-09-18 02:26:42 -05:00
|
|
|
my @possible_files = `find src -name '*.c' -o -name '*.glade' -o -name '*.desktop.in' -o -name '*.keys.in'`;
|
2001-08-17 03:28:31 -05:00
|
|
|
|
|
|
|
chomp(my $cwd = `pwd`);
|
|
|
|
|
|
|
|
my %ignores;
|
|
|
|
|
|
|
|
foreach my $one_ignore (@cvsignores) {
|
|
|
|
chomp($one_ignore);
|
|
|
|
my ($name, $path) = fileparse($one_ignore);
|
|
|
|
$path =~ s/^\.\///;
|
|
|
|
open (IG, $one_ignore);
|
|
|
|
chdir $path;
|
|
|
|
foreach my $fl (<IG>) {
|
|
|
|
chomp $fl;
|
|
|
|
next unless $fl;
|
|
|
|
my @matches = glob ($fl);
|
|
|
|
foreach my $match (@matches) {
|
|
|
|
chomp($match);
|
|
|
|
next unless $match;
|
|
|
|
$ignores{$path . $match} = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
close (IG);
|
|
|
|
chdir $cwd;
|
|
|
|
}
|
|
|
|
|
|
|
|
print "# List of files which containing translatable strings.\n";
|
|
|
|
print "# This file was generated by ../make-gnucash-potfiles.in.\n";
|
|
|
|
print "\n";
|
|
|
|
|
2001-09-17 17:27:01 -05:00
|
|
|
foreach my $file (@possible_files) {
|
|
|
|
chomp($file);
|
|
|
|
my ($name, $path) = fileparse($file);
|
2001-08-17 03:28:31 -05:00
|
|
|
$path =~ s/^\.\///;
|
|
|
|
|
|
|
|
next if $ignores{$path . $name};
|
|
|
|
|
|
|
|
print $path . $name . "\n";
|
|
|
|
}
|
2001-09-18 05:12:50 -05:00
|
|
|
|
|
|
|
print "intl-scm/guile-strings.c\n";
|