aboutsummaryrefslogtreecommitdiffstats
path: root/make-version.pl
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2015-03-04 12:32:25 -0800
committerGerald Combs <gerald@wireshark.org>2015-03-04 20:33:08 +0000
commitfb03d49fca8506ab631d40a0a05ababcf4bd50c0 (patch)
treec1935db32256efbf9202388f5bdf550f2732c198 /make-version.pl
parentafc8589cd5b493d56c65e4d03721c1da4bb1ce08 (diff)
Add CMake SOVERSIONs to make-version.pl.
Change-Id: Ifd011288ca23263738ca50842d59a23cc25e7952 Reviewed-on: https://code.wireshark.org/review/7532 Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'make-version.pl')
-rwxr-xr-xmake-version.pl36
1 files changed, 34 insertions, 2 deletions
diff --git a/make-version.pl b/make-version.pl
index d53eeb8245..d88578b633 100755
--- a/make-version.pl
+++ b/make-version.pl
@@ -542,7 +542,7 @@ sub update_debian_changelog
}
# Read Makefile.am for each library, then write back out an updated version.
-sub update_lib_releases
+sub update_automake_lib_releases
{
my $line;
my $contents = "";
@@ -579,6 +579,37 @@ sub update_lib_releases
}
}
+# Read CMakeLists.txt for each library, then write back out an updated version.
+sub update_cmake_lib_releases
+{
+ my $line;
+ my $contents = "";
+ my $version = "";
+ my $filedir;
+ my $filepath;
+
+ return if (!$set_version);
+
+ for $filedir ("epan", "wiretap") { # "wsutil"
+ $contents = "";
+ $filepath = $filedir . "/CMakeLists.txt";
+ open(CMAKELISTS_TXT, "< $filepath") || die "Can't read $filepath!";
+ while ($line = <CMAKELISTS_TXT>) {
+ # set(FULL_SO_VERSION "0.0.0")
+
+ if ($line =~ /^(set\s*\(\s*FULL_SO_VERSION\s+"\d+\.\d+\.)\d+(".*)/) {
+ $line = sprintf("$1%d$2\n", $version_pref{"version_micro"});
+ }
+ $contents .= $line
+ }
+
+ open(CMAKELISTS_TXT, "> $filepath") || die "Can't write $filepath!";
+ print(CMAKELISTS_TXT $contents);
+ close(CMAKELISTS_TXT);
+ print "$filepath has been updated.\n";
+ }
+}
+
# Update distributed files that contain any version information
sub update_versioned_files
{
@@ -587,7 +618,8 @@ sub update_versioned_files
&update_config_nmake;
&update_release_notes;
&update_debian_changelog;
- &update_lib_releases;
+ &update_automake_lib_releases;
+ &update_cmake_lib_releases;
}
# Print the version control system's version to $version_file.