Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Feb 2001 06:48:51 +0200 (EET)
From:      Maxim Sobolev <sobomax@FreeBSD.org>
To:        lioux@uol.com.br (Mario Sergio Fujikawa Ferreira)
Cc:        sobomax@FreeBSD.org (Maxim Sobolev), cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: ports/graphics/avifile Makefile distinfo pkg-plist
Message-ID:  <200102130448.f1D4mqi53345@vic.sabbo.net>
In-Reply-To: <20010213022053.A3912@Fedaykin.here> from "Mario Sergio Fujikawa Ferreira" at Feb 13, 2001 02:20:53 AM

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> > Please considring attached patch.
> 
> Thanks for the prompt patch.  A doubt, though, before I move.
> 
> Why is the following not working? This surely looks fine. Why is
> ${PORTSDIR} not being expanded correctly?
> 
> The only thing broken there is the CODEC_PORT var due to PORTSDIR
> not being expanded. Why?

Because unlike expansion of ordinary variables, which are postponed
until appropriate variable is referenced in a rule or target (i.e.
if you have A=foo B=${A} bar, then internally make(1) stores B as
"${A} bar" not as "foo bar" and substitutes bar for ${A} only when
${B} is referenced in a rule or target), != assigment happens
immediately at the time of parsing. Therefore ${PORTSDIR} is just not
defined at that time, because it belongs to bsd.port.mk, which is
being included later. Move CODEC_DETECTION_FILE assignment down after
.include <bsd.port.pre.mk> if you really wanna use ${PORTSDIR}. Check
make(1) manpage for details. Though, I'm not recommending use of
${PORTSDIR} for this purpose because it's makes it harder to debug
or modify these ports outside of /usr/ports.

> As per the CODEC_DETECTION_FILE, I do believe it is a bikeshed
> though both are not isomorph. Just check mail/qmail-ldap for an
> example where using the second form brakes it. But I can appreciate
> that it is more aestheticaly pleasant. I can use the second. I was
> just wondering why it is better. I am just clueless as to why,
> this is not cinicism.

Well, do what you feel is better for you. I'm not going to enforce
my own coding rules at you.

-Maxim


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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