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:
parent
e16f34e943
commit
f2d4720fcc
@ -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
|
||||
|
||||
|
39
docs/scripts/find_missing_manpages.pl
Executable file
39
docs/scripts/find_missing_manpages.pl
Executable 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";
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user