in the global scope as bsd.ccache.mk expected. This was causing ccache to use WKRDIR/.ccache for obj caching. 'make clean' would then lose all cached files. This worked in in Poudriere though as CCACHE_DIR is explicitly defined. With hat: portmgr
With hat: portmgr