Changeset 3019
- Timestamp:
- 11/10/2011 22:05:43 (8 months ago)
- File:
-
- 1 edited
-
box/trunk/infrastructure/msvc/getversion.pl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
box/trunk/infrastructure/msvc/getversion.pl
r2926 r3019 12 12 require "$basedir\\infrastructure\\BoxPlatform.pm.in"; 13 13 14 my $verfile = "$basedir/lib/common/BoxVersion.h"; 14 15 my $newver = "#define BOX_VERSION \"$BoxPlatform::product_version\"\n"; 16 my $oldver = ""; 15 17 16 open VERSIONFILE, "< $basedir/lib/common/BoxVersion.h" 17 or die "BoxVersion.h: $!"; 18 my $oldver = <VERSIONFILE>; 19 close VERSIONFILE; 18 if (-r $verfile) 19 { 20 open VERSIONFILE, "< $verfile" or die "$verfile: $!"; 21 $oldver = <VERSIONFILE>; 22 close VERSIONFILE; 23 24 } 20 25 21 26 if ($newver ne $oldver) 22 27 { 23 open VERSIONFILE, "> $basedir/lib/common/BoxVersion.h" 24 or die "BoxVersion.h: $!"; 28 open VERSIONFILE, "> $verfile" or die "BoxVersion.h: $!"; 25 29 print VERSIONFILE $newver; 26 30 close VERSIONFILE;
Note: See TracChangeset
for help on using the changeset viewer.
