Move SVNVERSION_CMD into the one place that uses it.
This code, which is basically `svnversion || svnliteversion`, generates 2 fstatat(2) for every directory in PATH for every Makefile parsed that includes bsd.own.mk. This can add up for things like generating a Ports index (Poudriere) or building a dependency graph for base. Sponsored by: Dell EMC MFC after: 2 weeks
This commit is contained in:
parent
7cb7c6e37a
commit
49a1108ae7
@ -350,6 +350,16 @@ SVN= ${_P}/${_S}
|
|||||||
.endif
|
.endif
|
||||||
SVNFLAGS?= -r HEAD
|
SVNFLAGS?= -r HEAD
|
||||||
.if !defined(VCS_REVISION) && empty(VCS_REVISION)
|
.if !defined(VCS_REVISION) && empty(VCS_REVISION)
|
||||||
|
.if !defined(SVNVERSION_CMD) && empty(SVNVERSION_CMD)
|
||||||
|
. for _D in ${PATH:S,:, ,g}
|
||||||
|
. if exists(${_D}/svnversion)
|
||||||
|
SVNVERSION_CMD?=${_D}/svnversion
|
||||||
|
. endif
|
||||||
|
. if exists(${_D}/svnliteversion)
|
||||||
|
SVNVERSION_CMD?=${_D}/svnliteversion
|
||||||
|
. endif
|
||||||
|
. endfor
|
||||||
|
.endif
|
||||||
_VCS_REVISION?= $$(eval ${SVNVERSION_CMD} ${SRCDIR})
|
_VCS_REVISION?= $$(eval ${SVNVERSION_CMD} ${SRCDIR})
|
||||||
. if !empty(_VCS_REVISION)
|
. if !empty(_VCS_REVISION)
|
||||||
VCS_REVISION= $$(echo r${_VCS_REVISION})
|
VCS_REVISION= $$(echo r${_VCS_REVISION})
|
||||||
|
@ -230,17 +230,6 @@ XZ_CMD?= xz -T ${XZ_THREADS}
|
|||||||
XZ_CMD?= xz
|
XZ_CMD?= xz
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.if !defined(SVNVERSION_CMD) && empty(SVNVERSION_CMD)
|
|
||||||
. for _D in ${PATH:S,:, ,g}
|
|
||||||
. if exists(${_D}/svnversion)
|
|
||||||
SVNVERSION_CMD?=${_D}/svnversion
|
|
||||||
. endif
|
|
||||||
. if exists(${_D}/svnliteversion)
|
|
||||||
SVNVERSION_CMD?=${_D}/svnliteversion
|
|
||||||
. endif
|
|
||||||
. endfor
|
|
||||||
.endif
|
|
||||||
|
|
||||||
PKG_CMD?= pkg
|
PKG_CMD?= pkg
|
||||||
|
|
||||||
# Pointer to the top directory into which tests are installed. Should not be
|
# Pointer to the top directory into which tests are installed. Should not be
|
||||||
|
Loading…
Reference in New Issue
Block a user