1#! perl
2# Copyright (C) 2011, Parrot Foundation.
3
4use warnings;
5use strict;
6use lib 'lib';
7use Parrot::SHA1;
8use Parrot::Git::Describe;
9
10=head1 NAME
11
12tools/build/gen_version.pl - generate runtime/parrot/include/parrot_version.pir
13
14=head1 SYNOPSIS
15
16    % perl tools/build/gen_version.pl >runtime/parrot/include/parrot_version.pir
17
18=head1 DESCRIPTION
19
20Generate C<runtime/parrot/include/parrot_version.pir>, which contains
21information about which commit was used to build parrot.
22
23=cut
24
25my $sha1 = $Parrot::SHA1::current;
26my $describe = $Parrot::Git::Describe::current;
27
28print <<"PIR";
29# generated by tools/build/gen_version.pl
30.macro_const PARROT_SHA1 "$sha1"
31.macro_const PARROT_GIT_DESCRIBE "$describe"
32PIR
33
34
35# Local Variables:
36#   mode: cperl
37#   cperl-indent-level: 4
38#   fill-column: 100
39# End:
40# vim: expandtab shiftwidth=4:
41