setting CFLAGS in /etc/make.conf
horio shoichi
bugsgrief at bugsgrief.net
Fri Aug 20 22:44:54 PDT 2004
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
More information about the freebsd-current
mailing list