diff options
author | des <des@FreeBSD.org> | 2003-03-14 00:52:54 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2003-03-14 00:52:54 +0000 |
commit | fe4d359e19a77442db1938c6b39e4159bb5b33c8 (patch) | |
tree | 92df5a2b428594744c253b83874b3ff1a2cb1447 /tools | |
parent | 48ca93061d124835cd2f41129071a9bd3cf66090 (diff) | |
download | FreeBSD-src-fe4d359e19a77442db1938c6b39e4159bb5b33c8.zip FreeBSD-src-fe4d359e19a77442db1938c6b39e4159bb5b33c8.tar.gz |
Support multiple verbosity levels.
Allow the user to specify environment variables on the command line.
Set the correct variables for cross-building.
Don't arbitrarily define MAKE_KERBEROS5 and BOOT_UFS.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/tools/tinderbox/tinderbox.pl | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/tools/tools/tinderbox/tinderbox.pl b/tools/tools/tinderbox/tinderbox.pl index a0620c6..d6f5f20 100644 --- a/tools/tools/tinderbox/tinderbox.pl +++ b/tools/tools/tinderbox/tinderbox.pl @@ -50,6 +50,8 @@ my $sandbox; # Location of sandbox my $update; # Update sources before building my $verbose; # Verbose mode +my %userenv; + my %cmds = ( 'world' => 0, 'generic' => 0, @@ -282,7 +284,7 @@ MAIN:{ "r|repository=s" => \$repository, "s|sandbox=s" => \$sandbox, "u|update" => \$update, - "v|verbose" => \$verbose, + "v|verbose+" => \$verbose, ) or usage(); if ($jobs < 0) { @@ -310,6 +312,10 @@ MAIN:{ # Find out what we're expected to do foreach my $cmd (@ARGV) { + if ($cmd =~ m/^([0-9A-Z_]+)=(.*)\s*$/) { + $userenv{$1} = $2; + next; + } if (!exists($cmds{$cmd})) { error("unrecognized command: '$cmd'"); } @@ -394,16 +400,24 @@ MAIN:{ 'TARGET' => $machine, 'TARGET_ARCH' => $arch, - 'TARGET_MACHINE' => $machine, 'CFLAGS' => "-O -pipe", 'NO_CPU_CFLAGS' => "YES", 'COPTFLAGS' => "-O -pipe", 'NO_CPU_COPTFLAGS' => "YES", - - 'MAKE_KERBEROS5' => "YES", - 'BOOT2_UFS' => "UFS1_ONLY", ); + foreach my $key (keys(%userenv)) { + if (exists($ENV{$key})) { + warning("will not allow override of $key"); + } else { + $ENV{$key} = $userenv{$key}; + } + } + if ($verbose > 1) { + foreach my $key (sort(keys(%ENV))) { + message("$key=$ENV{$key}\n"); + } + } # Build the world if ($cmds{'world'}) { |