| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
We have to stop using File::Compare's compare(), as it doesn't return
diagnostics about what went wrong.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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().
|
|
|
|
|
|
| |
Provide a local subroutine wrap(). Pass columns as its first parameter and
set $Text::Wrap::columns, as all uses of Text::Wrap::wrap() were setting
this variable.
|
|
|
|
|
| |
Use hash slices to avoid repeated typeglob dereferences on $fh.
In read_only_top() use a lexical to avoid repeated $args{lang} lookups.
|
|
|
|
| |
Pod needs a commenting style distinct from C and Perl. (ie the empty string)
|
| |
|
|
|
|
|
|
| |
Since the regen scripts use the system perl, I thought I might as
well test regen/feature.pl with 5.6.2, the earliest I have installed.
It failed.
|
|
|
|
| |
Use this in embed.pl for perlapi.c, and reentr.pl for reentr.c.
|
|
|
|
| |
Merge together many calls to open_new() and read_only_top().
|
|
|
|
|
| |
This eliminates the only remaining external caller of read_only_bottom(), so
inline read_only_bottom() into read_only_bottom_close_and_rename().
|
|
|
|
| |
Inline safer_rename() into its only caller, close_and_rename().
|
|
|
|
| |
Use this in regen/uconfig_h.pl
|
|
|
|
| |
Update the SHA256s where necessary in the generated files.
|
| |
|
|
|
|
|
|
|
| |
bison isn't available everywhere, so we can't simply re-run regen_perly.pl to
verify that perly.{act,h,tab} are up to date. So instead store the SHA-256 of
the input files, and extend t/porting/regen.t to check that the input files
haven't been changed subsequently.
|
|
|
|
|
|
|
|
|
| |
Use safer_open() and read_only_bottom_close_and_rename() from regen_lib.pl
Consistently use 3 argument open and lexical file handles.
A side effect of this change is that the generated files are no longer made
read-only on disk - if this is desirable, then probably better to change
regen_lib.pl so that all generated files are made read-only.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
All users of close_and_rename() were printing out the appropriate "ex: set ro:"
string to the file handle immediately before closing it. So move that into
the common function and rename it to reflect what it now does. [Except
overload.pl, which should have been, given that it calls read_only_top()]
Print a newline above the "ex: set ro:" line. This removes many newlines from
the regen scripts, but does add newlines to a couple of generated files.
|
|
|
|
|
|
|
| |
Pass the final file name as an optional second argument of safer_open() and
store it with the file handle. Add a function close_and_rename() which closes
the file handle, then retrieves the final name, and renames the temporary file
if the two differ.
|
|
|
|
|
|
| |
Previously regcomp.pl had an explicit unlink for the file it creates, but none
of the other regen/*.pl scripts did. Also, remove commented out code relating
to unlink.
|
|
|
|
|
|
| |
regen_lib.pl is actually using the hash slot of the typeglob, not the scalar
slot. Typeglob syntax is particularly confusing and prone to errors, although
in this case it doesn't make any behaviour difference.
|
|
|
|
|
|
|
|
|
| |
Previously all the scripts in regen/ had code to generate header comments
(buffer-read-only, "do not edit this file", and optionally regeneration
script, regeneration data, copyright years and filename).
This change results in some minor reformatting of header blocks, and
standardises the copyright line as "Larry Wall and others".
|
|
Moves the various scripts that are called by regen.pl to a subdirectory
to reduce clutter.
|