| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
They generate C files.
Bump feature.pm and warnings.pm versions to satisfy cmpVERSION.pl.
I can't get it to easily ignore whitespace, `git diff --name-only`
does not respect the -w flag.
regen_perly.pl is left alone. That would require rebuilding
perly.* which is beyond a simple indentation change.
|
|
|
|
|
| |
This makes it easier to calculate widths; and our policy is to not use
tabs anyway.
|
|
|
|
|
|
|
| |
Also use 'lib' instead of '.'
when running the regen script with tap output
abort on the first failure so we advertise
the command to run to fix the issue.
|
|
|
|
| |
then run ./regen_perly.pl to update perly files
|
|
|
|
|
|
|
|
|
|
| |
Switch from two-argument form. Filehandle cloning is still done with the two
argument form for backward compatibility.
Committer: Get all porting tests to pass. Increment some $VERSIONs.
Run: ./perl -Ilib regen/mk_invlists.pl; ./perl -Ilib regen/regcharclass.pl
For: RT #130122
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
regen_lib now has the capability of calculating a digest for various
files passed to it, and saving those values in the generated output
file. The passed in files are supposed to be the sources of the
generated file, so that on future regen runs, if no digest value has
changed, there should be no need to actually do the (potentially slow)
regen.
When bootstrapping up a perl, not everything may have been built before
a regen is attempted. This was dieing under those conditions,
preventing the build from happening. Thus we come to a dead-end.
This commit causes a random digest to be generated for a source file
that doesn't (yet) exist, instead of dieing. That means that the build
can continue, and the source should be generated at some point in
it. The random digest is not going to match the real one, so the next
time the regen happens, it will signal that things need to be rebuilt,
and then the actual digest of the source will be calculated and
stored.
Having the fake digest be a random number makes sure that, should the
missing file remain missing, that the regen will continue to rebuild
things each time. So, if someone carelessly commits the result without
realizing there is an empty source, the Porting tests will fail, drawing
attention to the problem.
|
|
|
|
| |
Extracted from patch submitted by Lajos Veres in RT #123693.
|
|
|
|
|
|
|
|
|
|
|
| |
Since this is an auto-generated .pm file, set $VERSION to the perl
version (i.e. 5.mmmnnn), the same trick that Config.pm does.
Since regen scripts are usually executed by a different perl, and the
current perl may not be built yet, don't rely on $]; instead get the
info from patchlevel.h. Add a new sub for this purpose, perl_version(),
to regen/regen_lib.pl. (I feel that such a routine should already exist
somewhere, but I couldn't find such a beastie.)
|
|
|
|
|
| |
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.
|