[Midnightbsd-cvs] mports [15674] trunk/Mk/extensions/compiler.mk: add midnightbsd keyword

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Wed Dec 18 21:56:19 EST 2013


Revision: 15674
          http://svnweb.midnightbsd.org/mports/?rev=15674
Author:   laffer1
Date:     2013-12-18 21:56:18 -0500 (Wed, 18 Dec 2013)
Log Message:
-----------
add midnightbsd keyword

Modified Paths:
--------------
    trunk/Mk/extensions/compiler.mk

Property Changed:
----------------
    trunk/Mk/extensions/compiler.mk

Modified: trunk/Mk/extensions/compiler.mk
===================================================================
--- trunk/Mk/extensions/compiler.mk	2013-12-19 02:02:37 UTC (rev 15673)
+++ trunk/Mk/extensions/compiler.mk	2013-12-19 02:56:18 UTC (rev 15674)
@@ -4,22 +4,23 @@
 #
 # Feature:	compiler
 # Usage:	USES=compiler or USES=compiler:ARGS
-# Valid ARGS:	env (default, implicit) c++11-lib c++11-lang c11 openmp features
+# Valid ARGS:	env (default, implicit) c++11-lib c++11-lang c11 openmp nestedfct features
 #
-# c++11-lang:	The port need a compiler understanding C++11
-# c++11-lib:	The port need a compiler understanding C++11 and with a C++11 ready standard library
-# c11:		The port need a compiler understanding c11
-# openmp:	The port need a compiler understanding openmp
+# c++11-lang:	The port needs a compiler understanding C++11
+# c++11-lib:	The port needs a compiler understanding C++11 and with a C++11 ready standard library
+# c11:		The port needs a compiler understanding C11
+# openmp:	The port needs a compiler understanding openmp
+# nestedfct:	The port needs a compiler understanding nested functions
 # features:	The port will determine the features supported by the default compiler
 #
 # Variable to test after <bsd.port.pre.mk>
 #
 # COMPILER_TYPE:	can be gcc or clang
-# ALT_COMPILER_TYPE:	can be gcc or clang depending on COMPILER_TYPE and only set if the base system has 2 compiler
-# COMPILER_VERSION:	2 first digit of the version: 33 for clang 3.3.*, 46 for gcc 4.6.*
-# ALT_COMPILER_VERSION:	2 first digit of the version: 33 for clang 3.3.*, 46 for gcc 4.6.* of the ALT_COMPILER_TYPE
+# ALT_COMPILER_TYPE:	can be gcc or clang depending on COMPILER_TYPE, only set if the base system has 2 compilers
+# COMPILER_VERSION:	first 2 digits of the version: 33 for clang 3.3.*, 46 for gcc 4.6.*
+# ALT_COMPILER_VERSION:	first 2 digits of the version: 33 for clang 3.3.*, 46 for gcc 4.6.* of the ALT_COMPILER_TYPE
 #
-# COMPILER_FEATURES:	the list of features supported by the compiler include the standard C++ library.
+# COMPILER_FEATURES:	the list of features supported by the compiler includes the standard C++ library.
 # CHOSEN_COMPILER_TYPE:	can be gcc or clang (type of compiler chosen by the framework)
 
 .if !defined(_INCLUDE_USES_COMPILER_MK)
@@ -29,7 +30,7 @@
 compiler_ARGS=	env
 .endif
 
-VALID_ARGS=	c++11-lib c++11-lang c11 features openmp env
+VALID_ARGS=	c++11-lib c++11-lang c11 features openmp env nestedfct
 
 .if ${compiler_ARGS} == c++11-lib
 _COMPILER_ARGS+=	features c++11-lib
@@ -43,6 +44,8 @@
 _COMPILER_ARGS+=	env
 .elif ${compiler_ARGS} == openmp
 _COMPILER_ARGS+=	env openmp
+.elif ${compiler_ARGS} == nestedfct
+_COMPILER_ARGS+=	env nestedfct
 .else
 IGNORE=	Invalid argument "${compiler_ARGS}", valid arguments are: ${VALID_ARGS}
 _COMPILER_ARGS=	#
@@ -85,6 +88,13 @@
 .endif
 .endif
 
+.if ${_COMPILER_ARGS:Mnestedfct}
+.if ${COMPILER_TYPE} == clang
+USE_GCC=	any
+CHOSEN_COMPILER_TYPE=	gcc
+.endif
+.endif
+
 .if ${_COMPILER_ARGS:Mfeatures}
 _CXXINTERNAL!=	${CXX} -\#\#\# /dev/null 2>&1
 .if ${_CXXINTERNAL:M\"-lc++\"}
@@ -135,7 +145,7 @@
 CC=	${LOCALBASE}/bin/clang33
 CXX=	${LOCALBASE}/bin/clang++33
 CHOSEN_COMPILER_TYPE=	clang
-.if ${OSVERSION} < 900033
+.if ${OSVERSION} < 4016
 USE_BINUTILS=	yes
 LDFLAGS+=	-B${LOCALBASE}/bin
 .endif
@@ -155,7 +165,7 @@
 CPP=	${LOCALBASE}/bin/clang-cpp33
 CC=	${LOCALBASE}/bin/clang33
 CXX=	${LOCALBASE}/bin/clang++33
-.if ${OSVERSION} < 900033
+.if ${OSVERSION} < 4016
 USE_BINUTILS=	yes
 LDFLAGS+=	-B${LOCALBASE}/bin
 .endif


Property changes on: trunk/Mk/extensions/compiler.mk
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property


More information about the Midnightbsd-cvs mailing list