From a5ae8e64cfa09cea57cce832c8371818711d94c2 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 7 Nov 2005 18:21:51 -0800 Subject: 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 --- Documentation/build-docdep.perl | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 Documentation/build-docdep.perl (limited to 'Documentation/build-docdep.perl') diff --git a/Documentation/build-docdep.perl b/Documentation/build-docdep.perl new file mode 100755 index 0000000000..dedef765af --- /dev/null +++ b/Documentation/build-docdep.perl @@ -0,0 +1,28 @@ +#!/usr/bin/perl + +my %include = (); + +for my $text () { + open I, '<', $text || die "cannot read: $text"; + (my $base = $text) =~ s/\.txt$//; + while () { + 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"; +} + -- cgit v1.2.1