From 1e0fccd1af54fdd4dbd79f6e7c5715478f83dea3 Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Fri, 14 Dec 2018 01:53:32 +0100 Subject: [PATCH] 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. --- progdoc => doc/prog-root | 2 +- doc/progdoc | 1 - tools/progdoc | 11 ++++++----- 3 files changed, 7 insertions(+), 7 deletions(-) rename progdoc => doc/prog-root (80%) delete mode 100644 doc/progdoc diff --git a/progdoc b/doc/prog-root similarity index 80% rename from progdoc rename to doc/prog-root index 770613904..c31e5ae18 100644 --- a/progdoc +++ b/doc/prog-root @@ -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 index 0c3e04e56..000000000 --- a/doc/progdoc +++ /dev/null @@ -1 +0,0 @@ -D prog-intro.sgml diff --git a/tools/progdoc b/tools/progdoc index 9b27d14e8..32e9771eb 100755 --- a/tools/progdoc +++ b/tools/progdoc @@ -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 = ; 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 "$arg\n"; -- 2.39.2