diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2018-12-14 01:53:32 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2018-12-14 01:53:32 +0100 |
commit | 1e0fccd1af54fdd4dbd79f6e7c5715478f83dea3 (patch) | |
tree | 60901995ab6ead5da7e78fd7a132e7e8b63326c1 /tools | |
parent | 532116e7e33d80a79e176f043defffbfc2b8d06e (diff) |
Doc: Move root of code documentation to doc dir
It reduces clutter in root and also avoid collision with doc dir on
case-insensitive filesystems when name back to Doc.
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/progdoc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/progdoc b/tools/progdoc index 9b27d14e..32e9771e 100755 --- a/tools/progdoc +++ b/tools/progdoc @@ -4,7 +4,7 @@ $srcdir = $ARGV[0]; $out = $ARGV[1]; open(OUT, ">", $out) || die "Cannot create output file"; -process($srcdir); +process($srcdir, "doc/prog-root"); close OUT; gen_deps(); exit 0; @@ -21,9 +21,10 @@ sub include { sub process { my $dir = shift @_; - print "$dir/progdoc\n"; - open(IN, "$dir/progdoc") || die "Unable to read $dir/progdoc"; - push(@deps, "$dir/progdoc"); + my $doc = "$dir/" . shift @_; + print "$doc\n"; + open(IN, $doc) || die "Unable to read $doc"; + push(@deps, $doc); my @docfile = <IN>; close IN; foreach $_ (@docfile) { @@ -32,7 +33,7 @@ sub process { /^([A-Z]+)\s*(.*)/ || die "Parse error: $_"; $cmd = $1; $arg = $2; - if ($cmd eq "C") { process("$dir/$arg"); } + if ($cmd eq "C") { process("$dir/$arg", "progdoc"); } elsif ($cmd eq "H") { push @stack, "H"; print OUT "<chapt>$arg\n"; |