]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Doc: Move root of code documentation to doc dir
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Fri, 14 Dec 2018 00:53:32 +0000 (01:53 +0100)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Fri, 14 Dec 2018 00:53:32 +0000 (01:53 +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 [moved from progdoc with 80% similarity]
doc/progdoc [deleted file]
tools/progdoc

similarity index 80%
rename from progdoc
rename to doc/prog-root
index 7706139044119e032a878b86ce25435d4c28862c..c31e5ae18066e0c0ecae0b73ee56c8ac1c38f647 100644 (file)
--- a/progdoc
@@ -1,5 +1,5 @@
 D doc/prog-head.sgml
-C doc
+D doc/prog-intro.sgml
 C nest
 C conf
 C filter
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
index 9b27d14e84e18e160c5c916e7fac799b6bf1d23a..32e9771ebf980cb1468fcc8f39119fbc46317f6a 100755 (executable)
@@ -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";