summaryrefslogtreecommitdiff
path: root/infrastructure/msvc
diff options
context:
space:
mode:
Diffstat (limited to 'infrastructure/msvc')
-rw-r--r--infrastructure/msvc/getversion.pl14
1 files changed, 12 insertions, 2 deletions
diff --git a/infrastructure/msvc/getversion.pl b/infrastructure/msvc/getversion.pl
index 12554d01..406501c6 100644
--- a/infrastructure/msvc/getversion.pl
+++ b/infrastructure/msvc/getversion.pl
@@ -11,9 +11,19 @@ chdir $basedir or die "$basedir: $!";
require "$basedir\\infrastructure\\BoxPlatform.pm.in";
-open VERSIONFILE, "> $basedir/lib/common/BoxVersion.h"
+my $newver = "#define BOX_VERSION \"$BoxPlatform::product_version\"\n";
+
+open VERSIONFILE, "< $basedir/lib/common/BoxVersion.h"
or die "BoxVersion.h: $!";
-print VERSIONFILE "#define BOX_VERSION \"$BoxPlatform::product_version\"\n";
+my $oldver = <VERSIONFILE>;
close VERSIONFILE;
+if ($newver ne $oldver)
+{
+ open VERSIONFILE, "> $basedir/lib/common/BoxVersion.h"
+ or die "BoxVersion.h: $!";
+ print VERSIONFILE "#define BOX_VERSION \"$BoxPlatform::product_version\"\n";
+ close VERSIONFILE;
+}
+
exit 0;