aboutsummaryrefslogtreecommitdiffstats
path: root/make-version.pl
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2011-11-18 01:17:31 +0000
committerGerald Combs <gerald@wireshark.org>2011-11-18 01:17:31 +0000
commit873e0bdd711f4366047ac52d2eeb270a368ca298 (patch)
tree1897a25d1b16da1d820edb4b619ab2928c654610 /make-version.pl
parentf20ad40ea9b69914b8086262fdf49a5851d2f418 (diff)
Maybe it's not a good idea to modify configure.in or config.nmake during
compilation. Add a "--set-svn" option which only affects svnversion.h and make it the default behavior. svn path=/trunk/; revision=39923
Diffstat (limited to 'make-version.pl')
-rwxr-xr-xmake-version.pl22
1 files changed, 16 insertions, 6 deletions
diff --git a/make-version.pl b/make-version.pl
index 63468733a7..1d9d49e5d2 100755
--- a/make-version.pl
+++ b/make-version.pl
@@ -69,6 +69,7 @@ my $last_change = 0;
my $revision = 0;
my $repo_path = "unknown";
my $get_svn = 0;
+my $set_svn = 0;
my $set_version = 0;
my $set_release = 0;
my %version_pref = (
@@ -401,7 +402,7 @@ sub print_svn_revision
close OLDREV;
}
- if (! $set_version && ! $set_release) { return; }
+ if (! $set_svn) { return; }
if ($needs_update) {
# print "Updating $version_file so it contains:\n$svn_revision";
@@ -424,14 +425,15 @@ sub get_config {
GetOptions(
"help|h", \$show_help,
"get-svn|g", \$get_svn,
+ "set-svn|s", \$set_svn,
"set-version|v", \$set_version,
"set-release|r|package-version|p", \$set_release
) || pod2usage(2);
if ($show_help) { pod2usage(1); }
- if ( !( $show_help || $get_svn || $set_release ) ) {
- $set_version = 1;
+ if ( !( $show_help || $get_svn || $set_svn || $set_version || $set_release ) ) {
+ $set_svn = 1;
}
if ($#ARGV >= 0) {
@@ -476,6 +478,10 @@ if ($set_version || $set_release) {
if ($set_release) {
print "Generating release information\n";
+ } else {
+ print "Resetting release information\n";
+ $revision = 0;
+ $package_string = "";
}
&update_versioned_files;
@@ -495,11 +501,15 @@ make-version.pl [options] [source directory]
--help, -h This help message
--get-svn, -g Print the SVN revision and source.
- --set-version, -v Set the major, minor, and micro versions.
+ --set-svn, -s Set the information in svnversion.h
+ --set-version, -v Set the major, minor, and micro versions in
+ configure.in, config.nmake, debian/changelog,
+ and docbook/release_notes.xml.
Resets the release information when used by
itself.
- --set-release, -r Set the release information.
+ --set-release, -r Set the release information in configure.in
+ and config.nmake
--package-version, -p Deprecated. Same as --set-release.
-Options can be used in any combination. If none are specified B<--set-version>
+Options can be used in any combination. If none are specified B<--set-svn>
is assumed.