filename | src/checkver.pl |
changeset | 738:0cbff49086b8 |
next | 1068:a422f30ce0a8 |
author | nkeynes |
date | Sun Apr 19 05:14:19 2009 +0000 (15 years ago) |
branch | xlat-refactor |
permissions | -rw-r--r-- |
last change | Remove branch instructions and replace with direct modification of PC + EXIT Add MIN/MAX instructions (for bound checks) Implement x86_target_is_legal Correct a few sh4 instructions |
file | annotate | diff | log | raw |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +00001.2 +++ b/src/checkver.pl Sun Apr 19 05:14:19 2009 +00001.3 @@ -0,0 +1,39 @@1.4 +#!/usr/bin/perl1.5 +# Usage: updatever.pl <basever> <top_srcdir> <version file>1.6 +1.7 +my $svnversion = "svnversion";1.8 +my $basever = $ARGV[0];1.9 +my $top_srcdir = $ARGV[1];1.10 +my $outfile = $ARGV[2];1.11 +1.12 +my $rev = "";1.13 +my $full_ver = "$basever";1.14 +1.15 +if( $svnversion ) {1.16 + $rev = `$svnversion "$top_srcdir"`;1.17 + chomp $rev;1.18 + if( $rev == "exported" ) {1.19 + $rev = "";1.20 + } else {1.21 + $full_ver = "${basever}.${rev}";1.22 + }1.23 +}1.24 +my $header = "/* Autogenerated by checkver.pl */";1.25 +my $output = "${header}\n".1.26 + "const char lxdream_package_name[] = \"lxdream $basever\";\n" .1.27 + "const char lxdream_short_version[] = \"$basever\";\n" .1.28 + "const char lxdream_full_version[] = \"$full_ver\";\n" .1.29 + "const char lxdream_copyright[] = \"Copyright (C) 2005-2008 Nathan Keynes\";\n";1.30 +1.31 +my $oldfile = "";1.32 +if( -e $outfile ) {1.33 + open(VERSIONFILE, "<$outfile") || die "Unable to read from $outfile\n";1.34 + $oldfile = join "", <VERSIONFILE>;1.35 + close(VERSIONFILE);1.36 +}1.37 +1.38 +if( $oldfile ne $output ) {1.39 + open(VERSIONFILE, ">$outfile") || die "Unable to write to $outfile\n";1.40 + print VERSIONFILE $output;1.41 + close(VERSIONFILE);1.42 +}1.43 \ No newline at end of file
.