Fix documentation dependency generation.
Documentation/Makefile spent a lot of time to generate include dependencies, which was quite noticeable especially during "make clean". Rewrite it to generate just a single dependency file. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
28
Documentation/build-docdep.perl
Executable file
28
Documentation/build-docdep.perl
Executable file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
my %include = ();
|
||||
|
||||
for my $text (<git-*.txt>) {
|
||||
open I, '<', $text || die "cannot read: $text";
|
||||
(my $base = $text) =~ s/\.txt$//;
|
||||
while (<I>) {
|
||||
if (/^include::/) {
|
||||
chomp;
|
||||
s/^include::\s*//;
|
||||
s/\[\]//;
|
||||
$include{$base}{$_} = 1;
|
||||
}
|
||||
}
|
||||
close I;
|
||||
}
|
||||
|
||||
# Do we care about chained includes???
|
||||
|
||||
while (my ($base, $included) = each %include) {
|
||||
my ($suffix) = '1';
|
||||
if ($base eq 'git') {
|
||||
$suffix = '7'; # yuck...
|
||||
}
|
||||
print "$base.html $base.$suffix : ", join(" ", keys %$included), "\n";
|
||||
}
|
||||
|
Reference in New Issue
Block a user