From owner-svn-ports-all@freebsd.org Sun Mar 11 02:24:27 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53112F4CBCB; Sun, 11 Mar 2018 02:24:27 +0000 (UTC) (envelope-from woodsb02@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EC23D72474; Sun, 11 Mar 2018 02:24:26 +0000 (UTC) (envelope-from woodsb02@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E169D1666A; Sun, 11 Mar 2018 02:24:26 +0000 (UTC) (envelope-from woodsb02@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2B2OQRp027976; Sun, 11 Mar 2018 02:24:26 GMT (envelope-from woodsb02@FreeBSD.org) Received: (from woodsb02@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2B2OQFv027975; Sun, 11 Mar 2018 02:24:26 GMT (envelope-from woodsb02@FreeBSD.org) Message-Id: <201803110224.w2B2OQFv027975@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: woodsb02 set sender to woodsb02@FreeBSD.org using -f From: Ben Woods Date: Sun, 11 Mar 2018 02:24:26 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r464138 - head/Mk/Uses X-SVN-Group: ports-head X-SVN-Commit-Author: woodsb02 X-SVN-Commit-Paths: head/Mk/Uses X-SVN-Commit-Revision: 464138 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 02:24:27 -0000 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 Prior to this change, if a port had: - USES=go.mk, - .include , 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)