NAME
Parrot::Revision::Utils - Subroutines used in tools/build/revision_c.pl.
SYNOPSIS
use Parrot::Revision::Utils qw(
get_revision_numbers
print_src_revision_c
);
($current, $config) = get_revision_numbers();
print_src_revision_c($current, $config, $script);
DESCRIPTION
Parrot::Revision::Utils exports on demand two subroutines, get_revision_numbers()
and print_src_revision_c()
which are used in tools/build/revision_c.pl, a Perl 5 program invoked by Parrot's make program to generate file src/revision.c. That file, in turn, provides C function Parrot_revision()
.
SUBROUTINES
get_revision_numbers()
($current, $config) = get_revision_numbers();
Purpose
Provide two Parrot repository revision numbers: the first being the revision number the last time the user made a commit or an update; the second being the revision number at which the user last ran Configure.pl.
Arguments
None.
Return Values
Two-argument list:
Comment
If the user follows this sequence:
svn update perl Configure.pl make
... then, the values for
current
andconfig
at the point at which make invokes tools/build/revision_c.pl will be identical.If, however, the user follows a sequence like this:
svn update perl Configure.pl # some time passes and the repository revision number increases svn update make
... then, the values for
current
andconfig
at the point at which make invokes tools/build/revision_c.pl will differ.
print_src_revision_c()
print_src_revision_c($current, $config, $0);
Purpose
Prints the text for src/revision.c.
Arguments
Three-argument list:
current
andconfig
as returned byget_revision_numbers()
(above) and the name of the current script (typically supplied by$0
).Return Values
True value.
Comment
Output goes to
STDOUT
. make redirects this to src/revision.c.
NOTES
The functionality in this package was transferred from tools/build/revision_c.pl by James E Keenan.
SEE ALSO
lib/Parrot/Revision.pm, tools/build/revision_c.pl.