bsd.port.pre.mk vs bsd.port.options.mk

Christian Weisgerber naddy at mips.inka.de
Sat Sep 7 22:13:15 UTC 2013


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



More information about the freebsd-ports mailing list