trees, so isntead use MANIFEST to only scan the legitimate source
files.
p4raw-id: //depot/perl@23127
BEGIN {
push @INC, 'lib';
require 'regen_lib.pl';
-} # glob() below requires File::Glob
+}
#
}
my $file;
-for $file (glob('*.c'), glob('*.h')) {
+# glob() picks up docs from extra .c or .h files that may be in unclean
+# development trees.
+my $MANIFEST = do {
+ local ($/, *FH);
+ open FH, "MANIFEST" or die "Can't open MANIFEST: $!";
+ <FH>;
+};
+
+for $file (($MANIFEST =~ /^(\S+\.c)\t/gm), ($MANIFEST =~ /^(\S+\.h)\t/gm)) {
open F, "< $file" or die "Cannot open $file for docs: $!\n";
$curheader = "Functions in file $file\n";
autodoc(\*F,$file);