/usr/lib/prayer/makedeps.pl is in prayer-templates-dev 1.3.4-dfsg1-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | #!/usr/bin/perl
#
# $Cambridge: hermes/src/prayer/templates/src/makedeps.pl,v 1.1 2010/07/07 08:27:02 dpc22 Exp $
#
# Generate proper list of dependancies between templates
my %index = ();
my %uses = ();
sub scan {
my ($file) = @_;
if (!exists $uses{$file}) {
grep {
$_ ne '' and open(FILE, '<', "$_/${file}.t")
} '.', split(/ :/, $ENV{'VPATH'} || '')
or die "failed to open ${file}: $!\n";
while (<FILE>) {
$uses{$file}{$1} = 1 if /^%\s+CALL ([\w-_]+)/;
}
close(FILE);
foreach (keys %{$uses{$file}}) {
$uses{$file}{$_} = 1 foreach keys %{scan($_)};
}
$uses{$file}{$file} = 1;
$index{$file} = 1;
}
return $uses{$file}
}
my $suffix = '';
if ($ARGV[0] eq '--frontend') {
shift;
$suffix = '_frontend';
}
my $name = shift;
$, = ' '; $\ = "\n";
foreach my $i (@ARGV) {
$i =~ s/([\w-_]+)\.t/$1/;
print "$i.html:", map {"$_.t"} sort keys %{scan($i)};
}
my @all = sort keys %index;
print "_template_index$suffix.c:", map {"$_.t"} @all;
print "$name$suffix.so:", "_template_index$suffix.o", map {"$_.o"} @all;
|