diff options
author | Ben Woods <woodsb02@FreeBSD.org> | 2018-03-11 02:24:26 +0000 |
---|---|---|
committer | Ben Woods <woodsb02@FreeBSD.org> | 2018-03-11 02:24:26 +0000 |
commit | ddc0a187c8b6fce80e12d27f74f5526a161f2c02 (patch) | |
tree | 19cf36a450a962c2cf3f1423ba56d65ba269c550 /Mk/Uses/go.mk | |
parent | - Update to 1.0.2 (diff) |
Allow USES=go ports to override make targets & include <bsd.port.pre.mk>
Prior to this change, if a port had:
- USES=go.mk,
- .include <bsd.port.pre.mk>, and
- overrode a make target (e.g. post-extract:)
then the following warnings were produced when invoking make on the port:
make: "/usr/local/poudriere/ports/default/CATEGORY/PORT/Makefile" line XX: warning: duplicate script for target "post-extract" ignored
make: "/usr/local/poudriere/ports/default/Mk/Uses/go.mk" line 68: warning: using previous script for "post-extract" defined here
This change fixes this issue by wrapping the definition of make targets
in a separate once-only !defined wrapper which is blocked until post.mk.
This concept was copied from Mk/Uses/python.mk.
PR: 224948
Submitted by: woodsb02
Approved by: jlaffaye (maintainer)
Notes
Notes:
svn path=/head/; revision=464138
Diffstat (limited to 'Mk/Uses/go.mk')
-rw-r--r-- | Mk/Uses/go.mk | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Mk/Uses/go.mk b/Mk/Uses/go.mk index eb63d03e2bee..d526ee61a43d 100644 --- a/Mk/Uses/go.mk +++ b/Mk/Uses/go.mk @@ -62,6 +62,12 @@ PLIST_SUB+= GO_LIBDIR=${GO_LIBDIR} \ GO_SRCDIR=${GO_SRCDIR} \ GO_PKGNAME=${GO_PKGNAME} +_USES_POST+= go +.endif # !defined(_INCLUDE_USES_GO_MK) + +.if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_GO_POST_MK) +_INCLUDE_USES_GO_POST_MK= yes + .if !target(post-extract) post-extract: @${MKDIR} ${GO_WRKSRC:H} @@ -90,4 +96,4 @@ do-install: .endfor .endif -.endif +.endif # defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_GO_POST_MK) |