diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2018-12-19 16:25:59 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2018-12-19 16:25:59 +0100 |
commit | d1c8f22becd6dd4d846e10edae951c3e0a170bd1 (patch) | |
tree | b48b4a3c286d34d339c74af9992948c7d6961c86 | |
parent | 81bc013dde105e604703b430dfe50a67e27b3b70 (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.
-rw-r--r-- | doc/prog-root | 9 | ||||
-rw-r--r-- | doc/progdoc | 1 | ||||
-rw-r--r-- | progdoc | 7 | ||||
-rwxr-xr-x | tools/progdoc | 11 |
4 files changed, 14 insertions, 14 deletions
diff --git a/doc/prog-root b/doc/prog-root new file mode 100644 index 00000000..c31e5ae1 --- /dev/null +++ b/doc/prog-root @@ -0,0 +1,9 @@ +D doc/prog-head.sgml +D doc/prog-intro.sgml +C nest +C conf +C filter +C proto +C sysdep +C lib +D doc/prog-foot.sgml diff --git a/doc/progdoc b/doc/progdoc deleted file mode 100644 index 0c3e04e5..00000000 --- a/doc/progdoc +++ /dev/null @@ -1 +0,0 @@ -D prog-intro.sgml diff --git a/progdoc b/progdoc deleted file mode 100644 index f5f15087..00000000 --- a/progdoc +++ /dev/null @@ -1,7 +0,0 @@ -C doc -C nest -C conf -C filter -C proto -C sysdep -C lib diff --git a/tools/progdoc b/tools/progdoc index 495d9287..d7ea989e 100755 --- a/tools/progdoc +++ b/tools/progdoc @@ -3,9 +3,7 @@ $srcdir = $ARGV[0]; open(OUT, ">prog.sgml") || die "Cannot create output file"; -include("doc/prog-head.sgml"); -process(""); -include("doc/prog-foot.sgml"); +process("", "doc/prog-root"); close OUT; exit 0; @@ -20,8 +18,9 @@ sub include { sub process { my $dir = shift @_; - print "$dir/progdoc\n"; - open(IN, "$srcdir/$dir/progdoc") || die "Unable to read $dir/progdoc"; + my $doc = "$dir/" . shift @_; + print "$doc\n"; + open(IN, "$srcdir/$doc") || die "Unable to read $doc"; my @docfile = <IN>; close IN; foreach $_ (@docfile) { @@ -30,7 +29,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"; |