From owner-cvs-all Mon Feb 12 20:49: 9 2001 Delivered-To: cvs-all@freebsd.org Received: from blizzard.sabbo.net (smtp.sabbo.net [193.193.218.18]) by hub.freebsd.org (Postfix) with ESMTP id E8AC437B4EC; Mon, 12 Feb 2001 20:48:55 -0800 (PST) Received: from vic.sabbo.net (root@vic.sabbo.net [193.193.218.112]) by blizzard.sabbo.net (8.10.1/8.10.1) with ESMTP id f1D4moH25655; Tue, 13 Feb 2001 06:48:52 +0200 Received: (from max@localhost) by vic.sabbo.net (8.11.2/8.11.2) id f1D4mqi53345; Tue, 13 Feb 2001 06:48:52 +0200 (EET) (envelope-from sobomax@FreeBSD.org) From: Maxim Sobolev Message-Id: <200102130448.f1D4mqi53345@vic.sabbo.net> Subject: Re: cvs commit: ports/graphics/avifile Makefile distinfo pkg-plist To: lioux@uol.com.br (Mario Sergio Fujikawa Ferreira) Date: Tue, 13 Feb 2001 06:48:51 +0200 (EET) Cc: sobomax@FreeBSD.org (Maxim Sobolev), cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org In-Reply-To: <20010213022053.A3912@Fedaykin.here> from "Mario Sergio Fujikawa Ferreira" at Feb 13, 2001 02:20:53 AM X-Mailer: ELM [version 2.5 PL3] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > > 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 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