tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Purpose of mk/


On Sat, 18 Oct 2014 02:20:50 +0900, J. Lewis Muir <> wrote:

Hello, pkgsrc experts!

I've noticed some packages (e.g. editors/OmegaT) use mk/
to find the installation prefix of a particular package (e.g.
devel/apache-ant) while others (e.g. devel/opengrok) just assume an
installation prefix of a particular package (e.g. devel/apache-ant) to
be "${PREFIX}".  What is the reason for using mk/ instead
of "${PREFIX}"?

Use mk/, it is the right solution.

PREFIX is the installation prefix of currently handling package,
it may not same as other packages.

LOCALBASE is better than PREFIX to refer prefix of other packages,
because it is the default variable.

I might guess the following reason: if a package dependency, let's say
devel/apache-ant, were satisfied as a "built-in" package, that package
would reside outside of the pkgsrc PREFIX directory and therefore
"${PREFIX}/bin/ant" wouldn't work.  Is this the main reason?  Are there
other reasons?

mk/ itself dose not handle built-in package,
but used by pkgsrc tools framework.

OBATA Akio /

Home | Main Index | Thread Index | Old Index