aboutsummaryrefslogtreecommitdiffstats
path: root/make-version.pl
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2007-08-22 19:36:49 +0000
committerBill Meier <wmeier@newsguy.com>2007-08-22 19:36:49 +0000
commit1d23f6fd83fb70e257c4bb7b9a4faf086aded35f (patch)
tree35913f2c979a36b04d05e74f4ea4ed42e0c25864 /make-version.pl
parent535f6af89cc3fa9f409559ef70746d8cfa8f9de2 (diff)
Handle case of source-dir != build-dir; 2 other minor bug fixes
svn path=/trunk/; revision=22590
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;