]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Doc: Move root of code documentation to doc dir
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Wed, 19 Dec 2018 15:25:59 +0000 (16:25 +0100)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Wed, 19 Dec 2018 15:25:59 +0000 (16:25 +0100)
It reduces clutter in root and also avoid collision with doc dir on
case-insensitive filesystems when name back to Doc.

doc/prog-root [new file with mode: 0644]
doc/progdoc [deleted file]
progdoc [deleted file]
tools/progdoc

diff --git a/doc/prog-root b/doc/prog-root
new file mode 100644 (file)
index 0000000..c31e5ae
--- /dev/null
@@ -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 (file)
index 0c3e04e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-D prog-intro.sgml
diff --git a/progdoc b/progdoc
deleted file mode 100644 (file)
index f5f1508..0000000
--- a/progdoc
+++ /dev/null
@@ -1,7 +0,0 @@
-C doc
-C nest
-C conf
-C filter
-C proto
-C sysdep
-C lib
index 495d9287aec2a7c2d13ef947d63da90d9b236270..d7ea989e7f2c11a3479b95c7d68a9c013344aa78 100755 (executable)
@@ -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";