aboutsummaryrefslogtreecommitdiffstats
path: root/make-version.pl
diff options
context:
space:
mode:
authorwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>2007-08-22 19:36:49 +0000
committerwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>2007-08-22 19:36:49 +0000
commitc16c578456a7e6dfe4ebc5477a4de546531feefd (patch)
tree35913f2c979a36b04d05e74f4ea4ed42e0c25864 /make-version.pl
parent89a7cc58cc76895dfba94c76fac840262e0e36ff (diff)
Handle case of source-dir != build-dir; 2 other minor bug fixes
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22590 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'make-version.pl')
-rwxr-xr-xmake-version.pl28
1 files changed, 15 insertions, 13 deletions
diff --git a/make-version.pl b/make-version.pl
index ea5cc41907..a00a3a50f1 100755
--- a/make-version.pl
+++ b/make-version.pl
@@ -98,19 +98,21 @@ sub read_svn_info {
$version_pref{"svn_client"} = 1;
}
- # We need to find out whether our parser can handle the entries file
- $line = <ENTRIES>;
- chomp $line;
- if ($line eq '<?xml version="1.0" encoding="utf-8"?>') {
- $repo_version = "pre1.4";
- } elsif ($line =~ /^8$/) {
- $repo_version = "1.4";
- } else {
- $repo_version = "unknown";
- }
+ else {
+ # We need to find out whether our parser can handle the entries file
+ $line = <ENTRIES>;
+ chomp $line;
+ if ($line eq '<?xml version="1.0" encoding="utf-8"?>') {
+ $repo_version = "pre1.4";
+ } elsif ($line =~ /^8$/) {
+ $repo_version = "1.4";
+ } else {
+ $repo_version = "unknown";
+ }
+ }
}
if ($version_pref{"svn_client"} || ($repo_version ne "pre1.4")) {
- $line = qx{svn info};
+ $line = qx{svn info $srcdir};
if ($line =~ /Last Changed Date: (\d{4})-(\d\d)-(\d\d) (\d\d):(\d\d):(\d\d)/) {
$last = timegm($6, $5, $4, $3, $2 - 1, $1);
}
@@ -269,9 +271,9 @@ sub get_config {
&get_config();
-if (-d "./.svn") {
+if (-d "$srcdir/.svn") {
print "This is a build from SVN (or a SVN snapshot).\n";
- &read_svn_info(".");
+ &read_svn_info();
if ($pkg_version) {
print "Generating package version. Ignoring $version_file\n";
&update_configure_in;