Changeset View
Changeset View
Standalone View
Standalone View
Mk/bsd.ccache.mk
Show All 25 Lines | |||||
. endif | . endif | ||||
.endif | .endif | ||||
# Support NO_CCACHE for common setups, require WITH_CCACHE_BUILD, and | # Support NO_CCACHE for common setups, require WITH_CCACHE_BUILD, and | ||||
# don't use if ccache already set in CC | # don't use if ccache already set in CC | ||||
.if !defined(NO_CCACHE) && defined(WITH_CCACHE_BUILD) && !${CC:M*ccache*} && \ | .if !defined(NO_CCACHE) && defined(WITH_CCACHE_BUILD) && !${CC:M*ccache*} && \ | ||||
!defined(NO_BUILD) | !defined(NO_BUILD) | ||||
# Avoid depends loops between ccache and pkg | # Avoid depends loops between ccache, pkg and dependencies of ccache | ||||
. if !defined(NO_CCACHE_DEPEND) && \ | . if defined(NO_CCACHE_DEPEND) | ||||
${PKGORIGIN} != ${PKG_ORIGIN} | .MAKEFLAGS: NO_CCACHE_DEPEND=${NO_CCACHE_DEPEND:Q} | ||||
bdrewery: I like the idea here but I believe this only works with direct port builds but will not with… | |||||
. elif ${PKGORIGIN} != ${PKG_ORIGIN} | |||||
BUILD_DEPENDS+= ${LOCALBASE}/bin/ccache:devel/ccache | BUILD_DEPENDS+= ${LOCALBASE}/bin/ccache:devel/ccache | ||||
. endif | . endif | ||||
CCACHE_WRAPPER_PATH?= ${LOCALBASE}/libexec/ccache | CCACHE_WRAPPER_PATH?= ${LOCALBASE}/libexec/ccache | ||||
CCACHE_BIN?= ${CCACHE_WRAPPER_PATH:C,/libexec/ccache$,,}/bin/ccache | CCACHE_BIN?= ${CCACHE_WRAPPER_PATH:C,/libexec/ccache$,,}/bin/ccache | ||||
.if exists(${CCACHE_WRAPPER_PATH}) | .if exists(${CCACHE_WRAPPER_PATH}) | ||||
# Prepend the ccache dir into the PATH and setup ccache env | # Prepend the ccache dir into the PATH and setup ccache env | ||||
Show All 24 Lines |
I like the idea here but I believe this only works with direct port builds but will not with Poudriere. At least not without using the DEPENDS_ARGS hack which I think was mutually exclusive with FLAVORS support. I'll look into that.