2 # Usage: updatever.pl <basever> <top_srcdir> <version file>
4 my $svnversion = "svnversion";
5 my $basever = $ARGV[0];
6 my $top_srcdir = $ARGV[1];
7 my $outfile = $ARGV[2];
10 my $full_ver = "$basever";
13 $rev = `$svnversion "$top_srcdir"`;
15 if( $rev == "exported" ) {
18 $full_ver = "${basever}.${rev}";
21 my $header = "/* Autogenerated by checkver.pl */";
22 my $output = "${header}\n".
23 "const char lxdream_package_name[] = \"lxdream $basever\";\n" .
24 "const char lxdream_short_version[] = \"$basever\";\n" .
25 "const char lxdream_full_version[] = \"$full_ver\";\n" .
26 "const char lxdream_copyright[] = \"Copyright (C) 2005-2008 Nathan Keynes\";\n";
30 open(VERSIONFILE, "<$outfile") || die "Unable to read from $outfile\n";
31 $oldfile = join "", <VERSIONFILE>;
35 if( $oldfile ne $output ) {
36 open(VERSIONFILE, ">$outfile") || die "Unable to write to $outfile\n";
37 print VERSIONFILE $output;
.