diff options
author | Nicholas Clark <nick@ccl4.org> | 2013-07-03 15:23:33 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2013-07-07 12:42:02 +0200 |
commit | f1f44974ad7245157b1b472771053946362694f8 (patch) | |
tree | 29aaf770aed174411882a52bd8c8c788fbf10404 /autodoc.pl | |
parent | 779d6b4a99e81aab11db9c66ab07286850b2d575 (diff) | |
download | perl-f1f44974ad7245157b1b472771053946362694f8.tar.gz |
Add an "always update" parameter to regen_lib's open_new().
By default the code in regen_lib compares the newly written file it has just
closed with the (assumed) existing file, and only overwrites the existing
file if the new file differs. This is a useful behaviour for regeneration
scripts. However, it's not ideal for build scripts called from the Makefile,
as make assumes that targets will be regenerated (and the timestamp touched).
So add an "always update" parameter for the use of Makefile invoked scripts,
such as autodoc.pl. If set, delete any existing file early (so that fatal
errors during the generation don't confuse the build by leaving an existing
stale file around), skip the comparison and skip the diagnostic output
listing the changed files.
Change autodoc.pl to set this parameter.
Correct a typo in an error message in regen_lib's open_new().
Diffstat (limited to 'autodoc.pl')
-rw-r--r-- | autodoc.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/autodoc.pl b/autodoc.pl index f82593e27b..1ef62b52a4 100644 --- a/autodoc.pl +++ b/autodoc.pl @@ -254,7 +254,7 @@ sub output { my ($podname, $header, $dochash, $missing, $footer) = @_; my $fh = open_new("pod/$podname.pod", undef, {by => "$0 extracting documentation", - from => 'the C source files'}); + from => 'the C source files'}, 1); print $fh $header; |