Moving docs tree to docs-xml to make room for generated docs in the release tarball.
[sfrench/samba-autobuild/.git] / docs-xml / scripts / find_missing_manpages.pl
1 #!/usr/bin/perl
2
3 my %doc;
4
5 $invar = 0;
6
7 $topdir = (shift @ARGV) or $topdir = ".";
8
9 $progs = "";
10
11 open(IN, "$topdir/Makefile.in");
12 while(<IN>) {
13         if($invar && /^([ \t]*)(.*?)([\\])$/) {
14                 $progs.=" " . $2;
15                 if($4) { $invar = 1; } else { $invar = 0; }
16         } elsif(/^([^ ]*)_PROGS([0-9]*) = (.*?)([\\])$/) {
17                 $progs.=" " . $3;
18                 if($4) { $invar = 1; }
19         } else { $invar = 0; }
20 }
21
22 foreach(split(/bin\//, $progs)) {
23         next if($_ eq " ");
24         s/\@EXEEXT\@//g;
25         s/ //g;
26
27
28         $f = $_;
29         
30         $found = 0;
31
32         for($i = 0; $i < 9; $i++) {
33                 if(-e "manpages/$f.$i.xml") { $found = 1; }
34         }
35
36         if(!$found) {
37                 print "'$f' does not have a manpage\n";
38         }
39 }