Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Aug 2004 14:44:44 +0900
From:      horio shoichi <bugsgrief@bugsgrief.net>
To:        freebsd-current@freebsd.org
Subject:   Re: setting CFLAGS in /etc/make.conf
Message-ID:  <20040821.054444.d1744bc19008622e.10.0.3.20@bugsgrief.net>
In-Reply-To: <20040820123605.GD29568@ip.net.ua>
References:  <p06110400bd4b837282da@[128.113.24.47]> <A8718F96-F2A1-11D8-A951-00039312D914@fillmore-labs.com> <20040820123605.GD29568@ip.net.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 20 Aug 2004 15:36:05 +0300
Ruslan Ermilov <ru@FreeBSD.org> wrote:

> 
> P.S.  I start to hate command-line variable in make(1).  ;)
> 
> 
> Cheers,
> -- 
> Ruslan Ermilov
> ru@FreeBSD.org
> FreeBSD committer
> 

I forgot about command line variations.

% cat cflags
.PHONY	: a
a	:
	# ${CFLAGS}
	make -f cflags dee-dee
dee-dee	:
	# ${CFLAGS}
% make -f cflags
# -O -pipe 
make -f cflags dee-dee
# -O -pipe 
% env CFLAGS="do-do" make -f cflags -E CFLAGS
# do-do
make -f cflags dee-dee
# do-do
%

And, amazing ! featuristic !

% make -f cflags -E CFLAGS CFLAGS=hehe
# hehe
make -f cflags dee-dee
# hehe
% echo $CFLAGS
CFLAGS: Undefined variable.


If the makefiles in nest don't have conflicting variable
requirements, then passing variable values over to the lower
strata makefiles seems not hard.


BTW,

o tested on 4.9-STABLE,
o /etc/make.conf is not mocked up one (as I wrote in
  previous text).


horio shoichi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040821.054444.d1744bc19008622e.10.0.3.20>