summaryrefslogtreecommitdiff
path: root/Documentation/build-docdep.perl
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/build-docdep.perl')
-rwxr-xr-xDocumentation/build-docdep.perl28
1 files changed, 28 insertions, 0 deletions
diff --git a/Documentation/build-docdep.perl b/Documentation/build-docdep.perl
new file mode 100755
index 0000000..dedef76
--- /dev/null
+++ b/Documentation/build-docdep.perl
@@ -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";
+}
+