Mk/bsd.ccache.mk: Add CCACHE_ENABLED variable for ports' convenience
Some projects do some special handling when the ccache program is present. This causes problems because ports framework has its own ccache settings and mere presence of ccache program doesn't mean that ccache is enabled. The new CCACHE_ENABLED variable can be used to tell projects if ccache is really enabled. PR: 266310 Approved by: tcberner@ (as portmgr)
This commit is contained in:
parent
49bbc37e52
commit
679b9e2f43
@ -11,6 +11,7 @@
|
||||
# default.
|
||||
#
|
||||
# Port use (users should not modify these):
|
||||
# - CCACHE_ENABLED - tells the port if ccache is enabled.
|
||||
# - CCACHE_BIN - path to the ccache binary. Intended to be prefixed before CC.
|
||||
# - CCACHE_WRAPPER_PATH - path to directory containing compiler symlinks back
|
||||
# to ccache. For example, gcc5 -> ccache. Intended
|
||||
@ -42,11 +43,18 @@ _CCACHEMKINCLUDED= yes
|
||||
NO_CCACHE= t
|
||||
. endif
|
||||
|
||||
. if defined(WITH_CCACHE_BUILD)
|
||||
CCACHE_ENABLED= yes
|
||||
. else
|
||||
CCACHE_ENABLED= no
|
||||
. endif
|
||||
|
||||
# HOME is always set to ${WRKDIR} now. Try to use /root/.ccache as default.
|
||||
. if defined(WITH_CCACHE_BUILD) && !defined(CCACHE_DIR)
|
||||
. if defined(USER) && ${USER} == root
|
||||
CCACHE_DIR= /root/.ccache
|
||||
. else
|
||||
CCACHE_ENABLED= no
|
||||
NO_CCACHE= yes
|
||||
WARNING+= WITH_CCACHE_BUILD support disabled, please set CCACHE_DIR.
|
||||
. endif
|
||||
|
Loading…
Reference in New Issue
Block a user