mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2025-01-18 06:51:54 +00:00
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
81bc013dde
commit
d1c8f22bec
9
doc/prog-root
Normal file
9
doc/prog-root
Normal file
@ -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
|
@ -1 +0,0 @@
|
|||||||
D prog-intro.sgml
|
|
@ -3,9 +3,7 @@
|
|||||||
$srcdir = $ARGV[0];
|
$srcdir = $ARGV[0];
|
||||||
|
|
||||||
open(OUT, ">prog.sgml") || die "Cannot create output file";
|
open(OUT, ">prog.sgml") || die "Cannot create output file";
|
||||||
include("doc/prog-head.sgml");
|
process("", "doc/prog-root");
|
||||||
process("");
|
|
||||||
include("doc/prog-foot.sgml");
|
|
||||||
close OUT;
|
close OUT;
|
||||||
exit 0;
|
exit 0;
|
||||||
|
|
||||||
@ -20,8 +18,9 @@ sub include {
|
|||||||
|
|
||||||
sub process {
|
sub process {
|
||||||
my $dir = shift @_;
|
my $dir = shift @_;
|
||||||
print "$dir/progdoc\n";
|
my $doc = "$dir/" . shift @_;
|
||||||
open(IN, "$srcdir/$dir/progdoc") || die "Unable to read $dir/progdoc";
|
print "$doc\n";
|
||||||
|
open(IN, "$srcdir/$doc") || die "Unable to read $doc";
|
||||||
my @docfile = <IN>;
|
my @docfile = <IN>;
|
||||||
close IN;
|
close IN;
|
||||||
foreach $_ (@docfile) {
|
foreach $_ (@docfile) {
|
||||||
@ -30,7 +29,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 New Issue
Block a user