Re: setting CFLAGS in /etc/make.conf

From: horio shoichi <bugsgrief_at_bugsgrief.net>
Date: Sat, 21 Aug 2004 14:44:44 +0900
On Fri, 20 Aug 2004 15:36:05 +0300
Ruslan Ermilov <ru_at_FreeBSD.org> wrote:

> 
> P.S.  I start to hate command-line variable in make(1).  ;)
> 
> 
> Cheers,
> -- 
> Ruslan Ermilov
> ru_at_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
Received on Sat Aug 21 2004 - 03:44:54 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:07 UTC