Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add code to generate Parrot version macros as a separate PIR include
- Loading branch information
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#! perl | ||
# Copyright (C) 2011, Parrot Foundation. | ||
|
||
use warnings; | ||
use strict; | ||
use lib 'lib'; | ||
use Parrot::SHA1; | ||
use Parrot::Git::Describe; | ||
|
||
=head1 NAME | ||
tools/build/gen_version.pl - generate runtime/parrot/include/parrot_version.pir | ||
=head1 SYNOPSIS | ||
% perl tools/build/gen_version.pl >runtime/parrot/include/parrot_version.pir | ||
=head1 DESCRIPTION | ||
Generate C<runtime/parrot/include/parrot_version.pir>, which contains | ||
information about which commit was used to build parrot. | ||
=cut | ||
|
||
my $sha1 = $Parrot::SHA1::current; | ||
my $describe = $Parrot::Git::Describe::current; | ||
|
||
print <<"PIR"; | ||
# generated by tools/build/gen_version.pl | ||
.macro_const PARROT_SHA1 "$sha1" | ||
.macro_const PARROT_GIT_DESCRIBE "$describe" | ||
PIR | ||
|
||
|
||
# Local Variables: | ||
# mode: cperl | ||
# cperl-indent-level: 4 | ||
# fill-column: 100 | ||
# End: | ||
# vim: expandtab shiftwidth=4: |
51e393d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this new generated file runtime/parrot/include/parrot_version.pir is not handled by .gitignore.
(there are many generated files in this directory, with the PASM extension, so rename it to parrot_version.pasm is an option)
this new generated file is not in MANIFEST.generated, so it will not installed.
51e393d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for noticing! Both issues are addressed in df3de71.