From owner-svn-ports-all@freebsd.org Sun Feb 12 21:53:48 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97C39CDCAAB; Sun, 12 Feb 2017 21:53:48 +0000 (UTC) (envelope-from rene@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 mx1.freebsd.org (Postfix) with ESMTPS id 4C3BE1DA2; Sun, 12 Feb 2017 21:53:48 +0000 (UTC) (envelope-from rene@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1CLrlXp078152; Sun, 12 Feb 2017 21:53:47 GMT (envelope-from rene@FreeBSD.org) Received: (from rene@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1CLrlDQ078151; Sun, 12 Feb 2017 21:53:47 GMT (envelope-from rene@FreeBSD.org) Message-Id: <201702122153.v1CLrlDQ078151@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rene set sender to rene@FreeBSD.org using -f From: Rene Ladan Date: Sun, 12 Feb 2017 21:53:47 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r433968 - head/Mk/Uses X-SVN-Group: ports-head 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.23 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, 12 Feb 2017 21:53:48 -0000 Author: rene Date: Sun Feb 12 21:53:47 2017 New Revision: 433968 URL: https://svnweb.freebsd.org/changeset/ports/433968 Log: Fix check-plist of USES=kmod No longer depend on (KERN_)DEBUGDIR being non-empty to decide whether to create the empty KERN_DEBUGDIR/KMODDIR directory, instead use a new argument 'debug' to indicate this. Add KERN_DEBUGDIR to PLIST_SUB and MAKE_ENV so that the including ports can use them. Ports using kmod:debug do need to add @dir entries to their pkg-plist for now to prevent 'make check-plist' errors, for example for default KMODDDIR: @dir /%%KERN_DEBUGDIR%%/%%KMODDIR%% @dir /%%KERN_DEBUGDIR%%/boot @dir /%%KERN_DEBUGDIR%% It would indeed be nice to automate this. PR: 216879 Submitted by: Sergey Kozlov (kozlov.sergey.404@gmail.com) Modified: head/Mk/Uses/kmod.mk Modified: head/Mk/Uses/kmod.mk ============================================================================== --- head/Mk/Uses/kmod.mk Sun Feb 12 21:51:34 2017 (r433967) +++ head/Mk/Uses/kmod.mk Sun Feb 12 21:53:47 2017 (r433968) @@ -4,7 +4,7 @@ # # Feature: kmod # Usage: USES=kmod -# Valid ARGS: none +# Valid ARGS: (none) debug # # MAINTAINER: rene@FreeBSD.org @@ -13,8 +13,12 @@ _INCLUDE_USES_KMOD_MK= yes _USES_POST+= kmod -.if !empty(kmod_ARGS) -IGNORE= USES=kmod takes no arguments +.if empty(kmod_ARGS) +_DEBUG_KMOD= +.elif ${kmod_ARGS} == "debug" +_DEBUG_KMOD= yes +.else +IGNORE= USES=kmod takes either no arguments or 'debug' .endif .if !exists(${SRC_BASE}/sys/Makefile) @@ -34,21 +38,25 @@ MAKE_ENV+= KMODDIR="${KMODDIR}" SYSDIR=" PLIST_FILES+= "@kld ${KMODDIR}" STRIP_CMD+= --strip-debug # do not strip kernel symbols +.if !empty(_DEBUG_KMOD) KERN_DEBUGDIR?= ${DEBUGDIR} +PLIST_SUB+= KERN_DEBUGDIR="${KERN_DEBUGDIR:C,^/,,}" +MAKE_ENV+= KERN_DEBUGDIR="${KERN_DEBUGDIR}" +#XXX (rene): it would be nice to automatically add @dir entries here, +# they are somehow needed according to 'make makeplist' +.endif + .endif .if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_KMOD_POST_MK) _INCLUDE_USES_KMOD_POST_MK= yes _USES_install+= 290:${STAGEDIR}${KMODDIR} -.if !empty(KERN_DEBUGDIR) -_USES_install+= 291:${STAGEDIR}${KERN_DEBUGDIR}${KMODDIR} -.endif - ${STAGEDIR}${KMODDIR}: @${MKDIR} ${.TARGET} -.if !empty(KERN_DEBUGDIR) +.if !empty(_DEBUG_KMOD) +_USES_install+= 291:${STAGEDIR}${KERN_DEBUGDIR}${KMODDIR} ${STAGEDIR}${KERN_DEBUGDIR}${KMODDIR}: @${MKDIR} ${.TARGET} .endif