Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Jul 2005 23:27:24 -0400
From:      Mikhail Teterin <mi+mx@aldan.algebra.com>
To:        Mark Linimon <linimon@lonesome.com>
Cc:        ports@freebsd.org
Subject:   Re: a portlint dilemma
Message-ID:  <200507262327.24793.mi%2Bmx@aldan.algebra.com>
In-Reply-To: <20050727024231.GA18447@soaustin.net>
References:  <200507262156.43233.mi%2Bmx@aldan.algebra.com> <20050727024231.GA18447@soaustin.net>

next in thread | previous in thread | raw e-mail | index | archive | help
> There are some chicken-and-egg problems like this in bsd.port.mk (well,
> the part that is invoked by bsd.port.pre.mk).  At one time I understood
> which each of them was but I haven't looked at them in a long time.

Actually, I think, I found the way. Look at the new GraphicsMagick port.

portlint would've raised hell about this trick (if it new about variable 
modifiers), but that would be groundless. ARCH is not expanded until OPTIONS 
is used (by which time ARCH is already known), so things work just fine.

A more straightforward way would be to:

	OPTIONS=	MEOW "MEOW?" ${MEOW_on_off}

	.include <bsd.port.pre.mk>

	.if ${ARCH} == "i386"
	MEOW_on_off=	on
	.else
	MEOW_on_off=	off
	.endif

	.include <bsd.port.post.mk>

This is also fooling portlint -- OPTIONS are, in fact, modified after 
including the ...pre.mk. And there is nothing wrong with that :-)

	-mi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200507262327.24793.mi%2Bmx>