aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2018-02-21 06:10:02 +0800
committerbdrewery <bdrewery@FreeBSD.org>2018-02-21 06:10:02 +0800
commit2b1b78c7ff7c01b4e85a04a3cf564fdf38d0a54c (patch)
treedf946c0ffc6881365d862ed03f502d8bb40697f0 /Mk
parentd3bd1b8ae55a58c64eb19a5be249b84c07cfa1ae (diff)
downloadfreebsd-ports-gnome-2b1b78c7ff7c01b4e85a04a3cf564fdf38d0a54c.tar.gz
freebsd-ports-gnome-2b1b78c7ff7c01b4e85a04a3cf564fdf38d0a54c.tar.zst
freebsd-ports-gnome-2b1b78c7ff7c01b4e85a04a3cf564fdf38d0a54c.zip
Avoid fstat(/usr/bin/soeliminate) for every port when building INDEX.
Approved by: portmgr (implicit)
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.commands.mk13
1 files changed, 8 insertions, 5 deletions
diff --git a/Mk/bsd.commands.mk b/Mk/bsd.commands.mk
index 959ee6f53cbf..1f657ad8668d 100644
--- a/Mk/bsd.commands.mk
+++ b/Mk/bsd.commands.mk
@@ -108,11 +108,6 @@ XZ_CMD?= /usr/bin/xz ${XZ}
MD5?= /sbin/md5
SHA256?= /sbin/sha256
-.if exists(/usr/bin/soeliminate)
-SOELIM?= /usr/bin/soeliminate
-.else
-SOELIM?= /usr/bin/soelim
-.endif
# ECHO is defined in /usr/share/mk/sys.mk, which can either be "echo",
# or "true" if the make flag -s is given. Use ECHO_CMD where you mean
@@ -134,3 +129,11 @@ PKG_ADD?= ${PKG_BIN} add
PKG_QUERY?= ${PKG_BIN} query
.endif
+
+.if defined(OSVERSION)
+.if ${OSVERSION} < 1100000
+SOELIM?= /usr/bin/soeliminate
+.else
+SOELIM?= /usr/bin/soelim
+.endif
+.endif