Marc Espie writes:
> Okay, the directory should be called MODCCACHE_DIR. Not that
> it makes a lot of difference, but those are the naming rules:
> new stuff in modules is prefixed with MOD to avoid invading
> the global namespace...
Thanks. For an example of what he means here, look at
/usr/ports/lang/python/python.port.mk
So ...
[ /usr/ports/infrastructure/mk/ccache.port.mk ]
MODCCACHE_DIR?= "${WRKDIR}/ccache"
BUILD_DEPENDS+= ::devel/ccache
CONFIGURE_ENV+= CCACHE_DIR="${MODCCACHE_DIR}" \
CC="ccache ${CC}" \
CXX="ccache ${CXX}"
MAKE_ENV+= CCACHE_DIR="${MODCCACHE_DIR}"
[ /etc/mk.conf (example) ]
TMPDIR=/usr/obj
MODCCACHE_DIR=${TMPDIR}/ccache
In a port's Makefile:
MODULES=ccache