bsd.port.pre.mk vs bsd.port.options.mk
Jason Helfman
jgh at FreeBSD.org
Sun Sep 8 06:43:48 UTC 2013
On Sat, Sep 7, 2013 at 2:42 PM, Christian Weisgerber <naddy at mips.inka.de>wrote:
> I have port that does something like
>
> .include <bsd.port.pre.mk>
>
> .if ${ARCH} == ...
> ...
> .endif
>
> .include <bsd.port.post.mk>
>
> A while back somebody submitted a PR asking me to replace bsd.port.pre.mk
> with bsd.port.options.mk, because it also makes ARCH available and
> is far less expensive.
>
> Now, a priori it is not clear to me that including options.mk is
> actually cheaper than pre.mk. And it seems odd to include options.mk
> but then not use any part of the options framework. The Porter's
> Handbook explicitly mentions ARCH as one of the variables provided
> by pre.mk.
>
> What's the preferred way to handle this?
>
> --
> Christian "naddy" Weisgerber naddy at mips.inka.de
>
>
It is preferred to evaluate ARCH with bsd.port.options.mk.
-jgh
--
Jason Helfman | FreeBSD Committer
jgh at FreeBSD.org | http://people.freebsd.org/~jgh | The Power to Serve
More information about the freebsd-ports
mailing list