diff options
author | des <des@FreeBSD.org> | 2004-03-16 00:12:33 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2004-03-16 00:12:33 +0000 |
commit | 7c2bf140bdd95e8512930bc4aec8610459117b53 (patch) | |
tree | dcafc86f9a2313e76a8ffb2f2a7d359a54732379 /tools | |
parent | 5670428480819d6b4dc534f51a1cf1be95fe9d23 (diff) | |
download | FreeBSD-src-7c2bf140bdd95e8512930bc4aec8610459117b53.zip FreeBSD-src-7c2bf140bdd95e8512930bc4aec8610459117b53.tar.gz |
Allow the user to override CFLAGS and COPTFLAGS on the command line.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/tools/tinderbox/tinderbox.1 | 8 | ||||
-rw-r--r-- | tools/tools/tinderbox/tinderbox.pl | 16 |
2 files changed, 20 insertions, 4 deletions
diff --git a/tools/tools/tinderbox/tinderbox.1 b/tools/tools/tinderbox/tinderbox.1 index 4b34506..b5546cf 100644 --- a/tools/tools/tinderbox/tinderbox.1 +++ b/tools/tools/tinderbox/tinderbox.1 @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 24, 2004 +.Dd March 15, 2004 .Dt TINDERBOX 1 .Os .Sh NAME @@ -285,6 +285,12 @@ if a patch was specified. .It NOPORTS .Va YES .El +.Pp +Except for +.Va CFLAGS +and +.Va COPTFLAGS , +none of these variables may be overridden by command-line arguments. .Sh SEE ALSO .Xr cvs 1 , .Xr make 1 , diff --git a/tools/tools/tinderbox/tinderbox.pl b/tools/tools/tinderbox/tinderbox.pl index 55f25b7..24e10a2 100644 --- a/tools/tools/tinderbox/tinderbox.pl +++ b/tools/tools/tinderbox/tinderbox.pl @@ -485,13 +485,11 @@ MAIN:{ 'TARGET' => $machine, 'TARGET_ARCH' => $arch, - - 'CFLAGS' => "-O -pipe", ); # Kernel-specific variables if ($cmds{'generic'} || $cmds{'lint'} || $cmds{'release'}) { - $ENV{'COPTFLAGS'} = "-O -pipe"; + # None at the moment } # Release-specific variables @@ -523,6 +521,18 @@ MAIN:{ $ENV{$key} = $userenv{$key}; } } + + # Defaults for overridable variables + if (!exists($ENV{'CFLAGS'})) { + $ENV{'CFLAGS'} = "-O -pipe"; + } + if ($cmds{'generic'} || $cmds{'lint'} || $cmds{'release'}) { + if (!exists($ENV{'COPTFLAGS'})) { + $ENV{'COPTFLAGS'} = "-O -pipe"; + } + } + + # List the environment when verbose if ($verbose && $verbose > 1) { foreach my $key (sort(keys(%ENV))) { message("$key=$ENV{$key}\n"); |