mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-26 16:18:31 +00:00
Allow the user to override CFLAGS and COPTFLAGS on the command line.
This commit is contained in:
parent
c8785325a6
commit
39245ad2ae
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=127045
@ -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 ,
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user