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.
This commit is contained in:
parent
532116e7e3
commit
1e0fccd1af
3 changed files with 7 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
||||||
D doc/prog-head.sgml
|
D doc/prog-head.sgml
|
||||||
C doc
|
D doc/prog-intro.sgml
|
||||||
C nest
|
C nest
|
||||||
C conf
|
C conf
|
||||||
C filter
|
C filter
|
|
@ -1 +0,0 @@
|
||||||
D prog-intro.sgml
|
|
|
@ -4,7 +4,7 @@ $srcdir = $ARGV[0];
|
||||||
$out = $ARGV[1];
|
$out = $ARGV[1];
|
||||||
|
|
||||||
open(OUT, ">", $out) || die "Cannot create output file";
|
open(OUT, ">", $out) || die "Cannot create output file";
|
||||||
process($srcdir);
|
process($srcdir, "doc/prog-root");
|
||||||
close OUT;
|
close OUT;
|
||||||
gen_deps();
|
gen_deps();
|
||||||
exit 0;
|
exit 0;
|
||||||
|
@ -21,9 +21,10 @@ sub include {
|
||||||
|
|
||||||
sub process {
|
sub process {
|
||||||
my $dir = shift @_;
|
my $dir = shift @_;
|
||||||
print "$dir/progdoc\n";
|
my $doc = "$dir/" . shift @_;
|
||||||
open(IN, "$dir/progdoc") || die "Unable to read $dir/progdoc";
|
print "$doc\n";
|
||||||
push(@deps, "$dir/progdoc");
|
open(IN, $doc) || die "Unable to read $doc";
|
||||||
|
push(@deps, $doc);
|
||||||
my @docfile = <IN>;
|
my @docfile = <IN>;
|
||||||
close IN;
|
close IN;
|
||||||
foreach $_ (@docfile) {
|
foreach $_ (@docfile) {
|
||||||
|
@ -32,7 +33,7 @@ sub process {
|
||||||
/^([A-Z]+)\s*(.*)/ || die "Parse error: $_";
|
/^([A-Z]+)\s*(.*)/ || die "Parse error: $_";
|
||||||
$cmd = $1;
|
$cmd = $1;
|
||||||
$arg = $2;
|
$arg = $2;
|
||||||
if ($cmd eq "C") { process("$dir/$arg"); }
|
if ($cmd eq "C") { process("$dir/$arg", "progdoc"); }
|
||||||
elsif ($cmd eq "H") {
|
elsif ($cmd eq "H") {
|
||||||
push @stack, "H";
|
push @stack, "H";
|
||||||
print OUT "<chapt>$arg\n";
|
print OUT "<chapt>$arg\n";
|
||||||
|
|
Loading…
Reference in a new issue