svn commit: r464138 - head/Mk/Uses
Ben Woods
woodsb02 at FreeBSD.org
Sun Mar 11 02:24:27 UTC 2018
Author: woodsb02
Date: Sun Mar 11 02:24:26 2018
New Revision: 464138
URL: https://svnweb.freebsd.org/changeset/ports/464138
Log:
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)
Modified:
head/Mk/Uses/go.mk
Modified: head/Mk/Uses/go.mk
==============================================================================
--- head/Mk/Uses/go.mk Sun Mar 11 01:22:55 2018 (r464137)
+++ head/Mk/Uses/go.mk Sun Mar 11 02:24:26 2018 (r464138)
@@ -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)
More information about the svn-ports-head
mailing list