This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Rename to Porting/perldelta_template.pod so that t/porting/podcheck.t covers it.
[perl5.git] / autodoc.pl
index 4cccc35..042131e 100644 (file)
@@ -1,4 +1,20 @@
 #!/usr/bin/perl -w
+# 
+# Unconditionally regenerate:
+#
+#    pod/perlintern.pod
+#    pod/perlapi.pod
+#
+# from information stored in
+#
+#    embed.fnc
+#    plus all the .c and .h files listed in MANIFEST
+#
+# Has an optional arg, which is the directory to chdir to before reading
+# MANIFEST and *.[ch].
+#
+# This script is normally invoked as part of 'make all', but is also
+# called from from regen.pl.
 
 use strict;
 
@@ -126,6 +142,12 @@ _EOF_
     close $fh or die "Can't close $filename: $!";
 }
 
+if (@ARGV) {
+    my $workdir = shift;
+    chdir $workdir
+        or die "Couldn't chdir to '$workdir': $!";
+}
+
 my $file;
 # glob() picks up docs from extra .c or .h files that may be in unclean
 # development trees.