Mk/Uses/go.mk: Warn if Go is not installed for gomod-vendor

PR:		242872
Reviewed by:	yuri
Differential Revision:	https://reviews.freebsd.org/D22923
This commit is contained in:
Dmitri Goutnik 2019-12-25 18:10:54 +00:00
parent d9695ad5db
commit 64144824d1
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=520881

View file

@ -165,11 +165,15 @@ do-install:
.if ${go_ARGS:Mmodules}
_MODULES2TUPLE_CMD= modules2tuple
gomod-vendor: patch
@if type ${_MODULES2TUPLE_CMD} > /dev/null 2>&1; then \
cd ${WRKSRC}; ${GO_CMD} mod vendor; \
[ -r vendor/modules.txt ] && ${_MODULES2TUPLE_CMD} vendor/modules.txt; \
@if type ${GO_CMD} > /dev/null 2>&1; then \
if type ${_MODULES2TUPLE_CMD} > /dev/null 2>&1; then \
cd ${WRKSRC}; ${GO_CMD} mod vendor; \
[ -r vendor/modules.txt ] && ${_MODULES2TUPLE_CMD} vendor/modules.txt; \
else \
${ECHO_MSG} "===> Please install \"ports-mgmt/modules2tuple\""; \
fi \
else \
${ECHO_MSG} "===> Please install \"ports-mgmt/modules2tuple\""; \
${ECHO_MSG} "===> Please install \"${GO_PORT}\""; \
fi
.endif