svn commit: r265581 - in head: . share/mk

Warner Losh imp at FreeBSD.org
Wed May 7 18:15:03 UTC 2014


Author: imp
Date: Wed May  7 18:15:02 2014
New Revision: 265581
URL: http://svnweb.freebsd.org/changeset/base/265581

Log:
  bsd.compiler.mk was implicitly included by bsd.own.mk in historical
  versions. With its movement to src.opts.mk, bsd.prog.mk was testing
  COMPILER_TYPE without including the bsd.compiler.mk anymore. In the
  source tree, this caused no problems, for reasons that aren't clear,
  but does cause problems outside of the source tree. Allow
  bsd.compiler.mk to be included multiple times safely, and always
  include bsd.compiler.mk at the top of bsd.prog.mk. Resist the urge to
  put it in bsd.init.mk, since that would reintroduce the implicit
  include.

Modified:
  head/UPDATING
  head/share/mk/bsd.compiler.mk
  head/share/mk/bsd.prog.mk

Modified: head/UPDATING
==============================================================================
--- head/UPDATING	Wed May  7 18:14:56 2014	(r265580)
+++ head/UPDATING	Wed May  7 18:15:02 2014	(r265581)
@@ -44,6 +44,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11
 	temporary breakage was fixed with MAKESYSPATH settings for buildworld
 	as well...
 
+	One side effect of all this cleaning up is that bsd.compiler.mk
+	is no longer implicitly included by bsd.own.mk. If you wish to
+	use COMPILER_TYPE, you must now explicitly include bsd.compiler.mk
+	as well.
+
 20140430:
 	The lindev device has been removed since /dev/full has been made a
 	standard device.  __FreeBSD_version has been bumped.

Modified: head/share/mk/bsd.compiler.mk
==============================================================================
--- head/share/mk/bsd.compiler.mk	Wed May  7 18:14:56 2014	(r265580)
+++ head/share/mk/bsd.compiler.mk	Wed May  7 18:15:02 2014	(r265581)
@@ -1,5 +1,8 @@
 # $FreeBSD$
 
+.if !target(__<bsd.compiler.mk>__)
+__<bsd.compiler.mk>__:
+
 .if !defined(COMPILER_TYPE)
 . if ${CC:T:Mgcc*}
 COMPILER_TYPE:=	gcc  
@@ -25,3 +28,5 @@ COMPILER_FEATURES=	c++11
 .else
 COMPILER_FEATURES=
 .endif
+
+.endif	# !target(__<bsd.compiler.mk>__)

Modified: head/share/mk/bsd.prog.mk
==============================================================================
--- head/share/mk/bsd.prog.mk	Wed May  7 18:14:56 2014	(r265580)
+++ head/share/mk/bsd.prog.mk	Wed May  7 18:15:02 2014	(r265581)
@@ -2,6 +2,7 @@
 # $FreeBSD$
 
 .include <bsd.init.mk>
+.include <bsd.compiler.mk>
 
 .SUFFIXES: .out .o .c .cc .cpp .cxx .C .m .y .l .ln .s .S .asm
 


More information about the svn-src-all mailing list