summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2006-04-07 15:19:19 +0000
committerdes <des@FreeBSD.org>2006-04-07 15:19:19 +0000
commitb72fba923c13bb674cd94bd0450909f9c3bdefdf (patch)
tree57413f6e48c97dd5bc4a120679ec70ea42151688 /tools
parent8fde273627fad9bf202d4ae6cfef8ea85c99fee5 (diff)
downloadFreeBSD-src-b72fba923c13bb674cd94bd0450909f9c3bdefdf.zip
FreeBSD-src-b72fba923c13bb674cd94bd0450909f9c3bdefdf.tar.gz
Don't select a default value for $machine until after we've examined $arch.
Noticed by: mjacob
Diffstat (limited to 'tools')
-rw-r--r--tools/tools/tinderbox/tinderbox.16
-rw-r--r--tools/tools/tinderbox/tinderbox.pl12
2 files changed, 12 insertions, 6 deletions
diff --git a/tools/tools/tinderbox/tinderbox.1 b/tools/tools/tinderbox/tinderbox.1
index 64dc919..797af9d 100644
--- a/tools/tools/tinderbox/tinderbox.1
+++ b/tools/tools/tinderbox/tinderbox.1
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 20, 2005
+.Dd April 7, 2006
.Dt TINDERBOX 1
.Os
.Sh NAME
@@ -109,7 +109,9 @@ The default is to redirect all output to
Specifies the target machine.
The default value is whatever the host system's
.Xr uname 1
-reports.
+reports, unless a target architecture was specified with the
+.It Fl a
+option, in which case the target machine is set to the same value.
.It Fl p Ar PATCH , Fl -patch Ns = Ns Ar PATCH
The file name of a patch to apply to the source tree before building
if the
diff --git a/tools/tools/tinderbox/tinderbox.pl b/tools/tools/tinderbox/tinderbox.pl
index 2753139..0b98fce 100644
--- a/tools/tools/tinderbox/tinderbox.pl
+++ b/tools/tools/tinderbox/tinderbox.pl
@@ -310,12 +310,8 @@ MAIN:{
tzset();
# Set defaults
- $arch = `/usr/bin/uname -p`;
- chomp($arch);
$hostname = `/usr/bin/uname -n`;
chomp($hostname);
- $machine = `/usr/bin/uname -m`;
- chomp($machine);
$branch = "HEAD";
$jobs = 0;
$repository = "/home/ncvs";
@@ -350,6 +346,14 @@ MAIN:{
error("invalid source branch");
}
$branch = ($1 eq 'CURRENT') ? 'HEAD' : $1;
+ if (!defined($arch)) {
+ $arch = `/usr/bin/uname -p`;
+ chomp($arch);
+ if (!defined($machine)) {
+ $machine = `/usr/bin/uname -m`;
+ chomp($machine);
+ }
+ }
if ($arch !~ m|^(\w+)$|) {
error("invalid target architecture");
}
OpenPOWER on IntegriCloud