diff options
author | Gerald Combs <gerald@wireshark.org> | 2004-12-16 19:06:52 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2004-12-16 19:06:52 +0000 |
commit | 7d7a9ce1921226a6ece210581327ad45e403c16a (patch) | |
tree | 79d3a287aedec38dc73607059ad580d0f9a1e2df /make-version.pl | |
parent | 14c5bed304d94af7301cc232800cb2ee55c39d3f (diff) | |
download | wireshark-7d7a9ce1921226a6ece210581327ad45e403c16a.tar.gz wireshark-7d7a9ce1921226a6ece210581327ad45e403c16a.tar.bz2 wireshark-7d7a9ce1921226a6ece210581327ad45e403c16a.zip |
From Thomas Boehne: Fix the version.conf status message and improve code
readability.
Fix a bug in my previous checkin, so that svnversion.h will be created
even when the ".svn/" directory isn't present.
svn path=/trunk/; revision=12762
Diffstat (limited to 'make-version.pl')
-rwxr-xr-x | make-version.pl | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/make-version.pl b/make-version.pl index b4c6e23af4..15b74d3600 100755 --- a/make-version.pl +++ b/make-version.pl @@ -152,6 +152,8 @@ sub print_svn_version my $svn_version; my $needs_update = 1; + if ($pkg_version) { return; } + if ($last && $revision) { $svn_version = "#define SVNVERSION \"" . $version_string . "\"\n"; @@ -187,7 +189,11 @@ sub get_config { } - open(FILE, "<$vconf_file") || print STDERR "Version configuration file $vconf_file not found. Using defaults.\n" && return 1; + if (! open(FILE, "<$vconf_file")) { + print STDERR "Version configuration file $vconf_file not " + . "found. Using defaults.\n"; + return 1; + } while (<FILE>) { chomp; @@ -209,17 +215,18 @@ if (-d "./.svn") { print "This is a build from SVN (or a SVN snapshot).\n"; &read_svn_info("."); if ($pkg_version) { - print "Generating package version. Ignoring $vconf_file.\n"; + print "Generating package version. Ignoring $version_file\n"; &update_configure_in; &update_config_nmake; } elsif ($version_pref{"enable"} == 0) { print "Version tag disabled in $vconf_file.\n"; } else { print "SVN version tag will be computed.\n"; - &print_svn_version; } } else { print "This is not a SVN build.\n"; } +&print_svn_version; + __END__ |