1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-12 20:58:37 +03:00

Add script that detects missing manpages

(This used to be commit 01e70035b9a4cf69bccc5b17c221de01e35c6532)
This commit is contained in:
Jelmer Vernooij 2004-05-15 18:08:19 +00:00 committed by Gerald W. Carter
parent e16f34e943
commit f2d4720fcc
2 changed files with 40 additions and 0 deletions

View File

@ -271,6 +271,7 @@ $(MANDIR)/%: %.xml
undocumented: $(SMBDOTCONFDOC)/parameters.all.xml
@$(PERL) scripts/find_missing_doc.pl $(SRCDIR)
@$(PERL) scripts/find_missing_manpages.pl $(SRCDIR)
# Examples and the like

View File

@ -0,0 +1,39 @@
#!/usr/bin/perl
my %doc;
$invar = 0;
$topdir = (shift @ARGV) or $topdir = ".";
$progs = "";
open(IN, "$topdir/source/Makefile.in");
while(<IN>) {
if($invar && /^([ \t]*)(.*?)([\\])$/) {
$progs.=" " . $2;
if($4) { $invar = 1; } else { $invar = 0; }
} elsif(/^([^ ]*)_PROGS([0-9]*) = (.*?)([\\])$/) {
$progs.=" " . $3;
if($4) { $invar = 1; }
} else { $invar = 0; }
}
foreach(split(/bin\//, $progs)) {
next if($_ eq " ");
s/\@EXEEXT\@//g;
s/ //g;
$f = $_;
$found = 0;
for($i = 0; $i < 9; $i++) {
if(-e "manpages/$f.$i.xml") { $found = 1; }
}
if(!$found) {
print "$f doesn't have a manpage!\n";
}
}