svn commit: r518928 - head/Mk/Uses
Antoine Brodin
antoine at FreeBSD.org
Tue Dec 3 11:16:19 UTC 2019
Author: antoine
Date: Tue Dec 3 11:16:19 2019
New Revision: 518928
URL: https://svnweb.freebsd.org/changeset/ports/518928
Log:
Revert r517831, FOO_TEST_TARGET is reserved for option helpers
With hat: portmgr
Modified:
head/Mk/Uses/go.mk
Modified: head/Mk/Uses/go.mk
==============================================================================
--- head/Mk/Uses/go.mk Tue Dec 3 11:15:15 2019 (r518927)
+++ head/Mk/Uses/go.mk Tue Dec 3 11:16:19 2019 (r518928)
@@ -12,8 +12,8 @@
# in modules-aware mode.
# no_targets Indicates that Go is needed at build time as a part of
# make/CMake build. This will setup build environment like
-# GO_ENV, GO_BUILDFLAGS but will not create post-extract and
-# do-{build,install,test} targets.
+# GO_ENV, GO_BUILDFLAGS but will not create post-extract, do-build
+# and do-install targets.
# run Indicates that Go is needed at run time and adds it to
# RUN_DEPENDS.
#
@@ -21,20 +21,20 @@
#
# GO_PKGNAME
# The name of the package when building in GOPATH mode. This
-# is the directory that will be created in ${GOPATH}/src. If not set
-# explicitly and GH_SUBDIR or GL_SUBDIR is present, GO_PKGNAME will
-# be inferred from it.
+# is the directory that will be created in GOPATH/src and seen
+# by the `go` command. If not set explicitly and GH_SUBDIR or
+# GL_SUBDIR is present, GO_PKGNAME will be inferred from it.
# It is not needed when building in modules-aware mode.
#
# GO_TARGET
-# The packages to build. The default value is ${GO_PKGNAME}.
-# GO_TARGET can also be a tuple in the form package:path where path can be
-# either a simple filename or a full path starting with ${PREFIX}.
+# The packages to build. If not set explicitly, defaults to
+# GO_PKGNAME. GO_TARGET can also be a tuple in the form
+# package:path where path can be either a simple filename or a
+# full path starting with ${PREFIX}. Specifying a full path
+# like ${PREFIX}/sbin/binary will install the resulting binary
+# as ${PREFIX}/sbin/binary. Using just simple filename is a
+# shortcut to installing it as ${PREFIX}/bin/filename.
#
-# GO_TEST_TARGET
-# The packages to test. The default value is `./...` (the current package
-# and all subpackages).
-#
# CGO_CFLAGS
# Additional CFLAGS variables to be passed to the C compiler by the `go`
# command
@@ -72,9 +72,7 @@ GO_PKGNAME= ${GL_SUBDIR:S|^src/||}
GO_PKGNAME= ${PORTNAME}
. endif
.endif
-
GO_TARGET?= ${GO_PKGNAME}
-GO_TEST_TARGET?= ./...
GO_BUILDFLAGS+= -v -buildmode=exe
.if !defined(WITH_DEBUG) && empty(GO_BUILDFLAGS:M-ldflags*)
@@ -104,7 +102,8 @@ GO_WRKSRC= ${WRKSRC}
GO_ENV+= GOPATH="" \
GOBIN="${GO_WRKDIR_BIN}"
.else
-GO_WRKSRC= ${WRKDIR}/src/${GO_PKGNAME}
+GO_WRKDIR_SRC= ${WRKDIR}/src
+GO_WRKSRC= ${GO_WRKDIR_SRC}/${GO_PKGNAME}
GO_ENV+= GOPATH="${WRKDIR}" \
GOBIN=""
.endif
@@ -159,15 +158,6 @@ do-install:
${ECHO_MSG} "===> Installing $${src} as $${dst}"; \
${INSTALL_PROGRAM} ${GO_WRKDIR_BIN}/$${src} $${dst}; \
done
-.endif
-
-.if !target(do-test) && empty(go_ARGS:Mno_targets)
-do-test:
- (cd ${GO_WRKSRC}; \
- for t in ${GO_TEST_TARGET}; do \
- ${ECHO_MSG} "===> Testing $${t}"; \
- ${SETENV} ${MAKE_ENV} ${GO_ENV} ${GO_CMD} test ${GO_BUILDFLAGS} $${t}; \
- done)
.endif
# Helper targets for port maintainers
More information about the svn-ports-head
mailing list