source: branches/samba-3.3.x/docs-xml/scripts/find_missing_manpages.pl

Last change on this file was 217, checked in by Herwig Bauernfeind, 16 years ago

Import Samba 3.3 branch at 3.3.0 level docs-xml (psmedley's port)

File size: 917 bytes
Line 
1#!/usr/bin/perl
2
3$invar = 0;
4$topdir = (shift @ARGV) or $topdir = ".";
5$makefile = "$topdir/source/Makefile.in";
6$mandir = "$topdir/docs-xml/manpages-3";
7$progs = "";
8
9chdir($topdir);
10
11if(! -e "$makefile") {
12 print "$makefile does not exist!\n";
13 print "Wrong directory?\n";
14 exit(1);
15}
16
17if(! -d "$mandir") {
18 print "$mandir does not exist!\n";
19 exit(1);
20}
21
22open(IN, "$makefile");
23while(<IN>) {
24 if($invar && /^([ \t]*)(.*?)([\\])$/) {
25 $progs.=" " . $2;
26 if($4) { $invar = 1; } else { $invar = 0; }
27 } elsif(/^([^ ]*)_PROGS([0-9]*) = (.*?)([\\])$/) {
28 $progs.=" " . $3;
29 if($4) { $invar = 1; }
30 } else { $invar = 0; }
31}
32
33foreach(split(/bin\//, $progs)) {
34 next if($_ eq " ");
35 s/\@EXEEXT\@//g;
36 s/\@EXTRA_BIN_PROGS\@//g;
37 s/ //g;
38
39
40 $f = $_;
41
42 $found = 0;
43
44
45 for($i = 0; $i < 9; $i++) {
46 if(-e "$mandir/$f.$i.xml") { $found = 1; }
47 }
48
49 if(!$found) {
50 print "'$f' does not have a manpage\n";
51 }
52}
Note: See TracBrowser for help on using the repository browser.