svn commit: r415530 - head/Mk

Bryan Drewery bdrewery at FreeBSD.org
Thu May 19 22:06:29 UTC 2016


Author: bdrewery
Date: Thu May 19 22:06:28 2016
New Revision: 415530
URL: https://svnweb.freebsd.org/changeset/ports/415530

Log:
  Use MK_* to prevent debug files if possible.
  
  A longstanding bug with the base /usr/share/mk files is that /etc/src.conf
  *does* get pulled in when building ports which use /usr/share/mk.  This despite
  the documentation saying it is only used for "the FreeBSD tree".  If users
  have a WITH_DEBUG_FILES=yes in their src.conf then the previous
  WITHOUT_DEBUG_FILES=yes would hit an error.  Fixing pulling in src.conf is
  risky.  MK_* overrides work fine here after recent stable/9 and stable/10
  updates.
  
  If you run into the WITH_ vs WITHOUT_ problem on a release build then you can
  protect your src.conf value with something like:
    .if !${.CURDIR:M*ports*}
    WITH_DEBUG_FILES=yes
    .endif
  
  PR:		D6271
  With hat:	portmgr
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  head/Mk/bsd.port.mk

Modified: head/Mk/bsd.port.mk
==============================================================================
--- head/Mk/bsd.port.mk	Thu May 19 21:16:11 2016	(r415529)
+++ head/Mk/bsd.port.mk	Thu May 19 22:06:28 2016	(r415530)
@@ -1638,10 +1638,20 @@ INSTALL_TARGET:=	${INSTALL_TARGET:S/^ins
 
 # XXX PIE support to be added here
 MAKE_ENV+=	NO_PIE=yes
+# We prefer to pass MK_*=no but it was only supported after a certain
+# revision.  Passing WITHOUT_* may conflict with a make.conf or src.conf's
+# WITH_* value.  Note that ports *do* pull in src.conf.
+.if (${OSVERSION} >= 903510 && ${OSVERSION} < 1000000) || \
+    (${OSVERSION} >= 1003503 && ${OSVERSION} < 1100000) || \
+    ${OSVERSION} >= 1100000
 # We will control debug files.  Don't let builds that use /usr/share/mk
 # split out debug symbols since the plist won't know to expect it.
+MAKE_ARGS+=	MK_DEBUG_FILES=no
+MAKE_ARGS+=	MK_KERNEL_SYMBOLS=no
+.else
 MAKE_ENV+=	WITHOUT_DEBUG_FILES=yes
 MAKE_ENV+=	WITHOUT_KERNEL_SYMBOLS=yes
+.endif
 
 .if defined(NOPORTDOCS)
 PLIST_SUB+=		PORTDOCS="@comment "


More information about the svn-ports-head mailing list