diff --git a/Makefile.inc1 b/Makefile.inc1 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2418,7 +2418,13 @@ ${REPODIR}/${PKG_ABI}/${PKG_VERSION} \ ${PKG_REPO_SIGNING_KEY} ; \ cd ${REPODIR}/${PKG_ABI}; \ + # All BSDs and macOS support ln -h; Linux does not, but -T provides + # the same functionality. +.if ${.MAKE.OS} == "Linux" + ln -Tfs ${PKG_OUTPUT_DIR} latest +.else ln -hfs ${PKG_OUTPUT_DIR} latest +.endif # #