Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

33 lines (21 sloc) 0.533 kB
#! perl
=head1 TITLE
gen-version.pl -- script to generate version information for HLL compilers
=cut
use POSIX 'strftime';
open(my $fh, '<', 'VERSION') or die $!;
my $VERSION = <$fh>;
close($fh);
if (-d '.git' && open(my $GIT, '-|', "git describe --tags")) {
$VERSION = <$GIT>;
close($GIT);
}
chomp $VERSION;
my $builddate = strftime('%Y-%m-%dT%H:%M:%SZ', gmtime);
print <<"END_VERSION";
sub hll-config(\$config) {
\$config<version> := '$VERSION';
\$config<build-date> := '$builddate';
}
END_VERSION
0;
Jump to Line
Something went wrong with that request. Please try again.