Bump to boost 1.71.0
[platform/upstream/boost.git] / Jamroot
diff --git a/Jamroot b/Jamroot
index 4bada93..4e913c2 100644 (file)
--- a/Jamroot
+++ b/Jamroot
 #   =======                 configured locations (below).
 #
 #   --prefix=<PREFIX>       Install architecture independent files here.
-#                           Default; C:\Boost on Win32
-#                           Default; /usr/local on Unix. Linux, etc.
+#                           Default: C:\Boost on Windows
+#                           Default: /usr/local on Unix, Linux, etc.
 #
 #   --exec-prefix=<EPREFIX> Install architecture dependent files here.
-#                           Default; <PREFIX>
+#                           Default: <PREFIX>
 #
-#   --libdir=<DIR>          Install library files here.
-#                           Default; <EPREFIX>/lib
+#   --libdir=<LIBDIR>       Install library files here.
+#                           Default: <EPREFIX>/lib
 #
 #   --includedir=<HDRDIR>   Install header files here.
-#                           Default; <PREFIX>/include
+#                           Default: <PREFIX>/include
+#
+#   --cmakedir=<CMAKEDIR>   Install CMake configuration files here.
+#                           Default: <LIBDIR>/cmake
+#
+#   --no-cmake-config       Do not install CMake configuration files.
 #
 #   stage                   Build and install only compiled library files to the
 #   =====                   stage directory.
 #
 #   --stagedir=<STAGEDIR>   Install library files here
-#                           Default; ./stage
+#                           Default: ./stage
 #
 # Other Options:
 #
@@ -129,16 +134,25 @@ import xsltproc ;
 import set ;
 import path ;
 import link ;
+import notfile ;
+import virtual-target ;
+import "class" : new ;
+import property-set ;
+import threadapi-feature ;
+import option ;
+# Backslash because of `bcp --namespace`
+import tools/boost\_install/boost-install ;
 
 path-constant BOOST_ROOT : . ;
-constant BOOST_VERSION : 1.57.0 ;
+constant BOOST_VERSION : 1.71.0 ;
 constant BOOST_JAMROOT_MODULE : $(__name__) ;
 
 boostcpp.set-version $(BOOST_VERSION) ;
 
-       
+use-project /boost/architecture : libs/config/checks/architecture ;
+
 local all-headers =
-    [ MATCH .*libs/(.*)/include/boost : [ glob libs/*/include/boost ] ] ;
+    [ MATCH .*libs/(.*)/include/boost : [ glob libs/*/include/boost libs/*/*/include/boost ] ] ;
 
 for dir in $(all-headers)
 {
@@ -146,37 +160,33 @@ for dir in $(all-headers)
     explicit $(dir)-headers ;
 }
 
-local numeric-headers =
-   [ MATCH .*libs/numeric/(.*)/include/boost : [ glob libs/*/*/include/boost ] ] ;
-
-for dir in $(numeric-headers)
-{
-    link-directory numeric-$(dir)-headers : libs/numeric/$(dir)/include/boost : <location>. ;
-    explicit numeric-$(dir)-headers ;
-}
-
 if $(all-headers)
 {
-    constant BOOST_MODULARLAYOUT : $(all-headers) $(numeric-headers) ;
+    constant BOOST_MODULARLAYOUT : $(all-headers) ;
 }
 
 project boost
     : requirements <include>.
+
+      [ boostcpp.architecture ]
+      [ boostcpp.address-model ]
+
       # Disable auto-linking for all targets here, primarily because it caused
       # troubles with V2.
       <define>BOOST_ALL_NO_LIB=1
       # Used to encode variant in target name. See the 'tag' rule below.
       <tag>@$(__name__).tag
       <conditional>@handle-static-runtime
-      # The standard library Sun compilers use by default has no chance
-      # of working with Boost. Override it.
-      <toolset>sun:<stdlib>sun-stlport
       # Comeau does not support shared lib
       <toolset>como:<link>static
       <toolset>como-linux:<define>_GNU_SOURCE=1
       # When building docs within Boost, we want the standard Boost style
       <xsl:param>boost.defaults=Boost
+      <conditional>@threadapi-feature.detect
     : usage-requirements <include>.
+    : default-build
+      <visibility>hidden
+      <threading>multi
     : build-dir bin.v2
     ;
 
@@ -189,6 +199,11 @@ rule tag ( name : type ? : property-set )
     return [ boostcpp.tag $(name) : $(type) : $(property-set) ] ;
 }
 
+rule python-tag ( name : type ? : property-set )
+{
+    return [ boostcpp.python-tag $(name) : $(type) : $(property-set) ] ;
+}
+
 rule handle-static-runtime ( properties * )
 {
     # Using static runtime with shared libraries is impossible on Linux, and
@@ -199,10 +214,15 @@ rule handle-static-runtime ( properties * )
     if <link>shared in $(properties) && <runtime-link>static in $(properties) &&
         ! ( <toolset>cw in $(properties) )
     {
-        ECHO "error: link=shared together with runtime-link=static is not allowed" ;
-        ECHO "error: such property combination is either impossible " ;
-        ECHO "error: or too dangerious to be of any use" ;
-        EXIT ;
+        if ! $(.shared-static-warning-emitted)
+        {
+            ECHO "warning: skipping configuration link=shared, runtime-link=static" ;
+            ECHO "warning: this combination is either impossible or too dangerous" ;
+            ECHO "warning: to be of any use" ;
+            .shared-static-warning-emitted = 1 ;
+        }
+
+        return <build>no ;
     }
 }
 
@@ -232,13 +252,30 @@ explicit-alias serialization : libs/serialization/build//boost_serialization ;
 explicit-alias wserialization : libs/serialization/build//boost_wserialization ;
 for local l in $(all-libraries)
 {
-    if ! $(l) in test graph serialization
+    if ! $(l) in test graph serialization headers
     {
         explicit-alias $(l) : libs/$(l)/build//boost_$(l) ;
     }
 }
 
-alias headers : $(all-headers)-headers numeric-$(numeric-headers)-headers : : : <include>.  ;
+# Log has an additional target
+explicit-alias log_setup : libs/log/build//boost_log_setup ;
+
+rule do-nothing { }
+
+rule generate-alias ( project name : property-set : sources * )
+{
+    local action-name = [ $(property-set).get <action> ] ;
+    local m = [ MATCH ^@(.*) : $(action-name) ] ;
+    property-set = [ property-set.empty ] ;
+    local action = [ new action $(sources) : $(m[1]) : $(property-set) ] ;
+    local t = [ new notfile-target $(name) : $(project) : $(action) ] ;
+    return [ virtual-target.register $(t) ] ;
+}
+
+generate headers : $(all-headers)-headers : <generating-rule>@generate-alias <action>@do-nothing : : <include>.  ;
+
+#alias headers : $(all-headers)-headers : : : <include>.  ;
 explicit headers ;
 
 # Make project ids of all libraries known.
@@ -247,8 +284,17 @@ for local l in $(all-libraries)
     use-project /boost/$(l) : libs/$(l)/build ;
 }
 
-use-project /boost/tools/inspect : tools/inspect/build ;
-use-project /boost/libs/wave/tool : libs/wave/tool/build ;
+if [ path.exists $(BOOST_ROOT)/tools/inspect/build ]
+{
+    use-project /boost/tools/inspect : tools/inspect/build ;
+}
+
+if [ path.exists $(BOOST_ROOT)/libs/wave/tool/build ]
+{
+    use-project /boost/libs/wave/tool : libs/wave/tool/build ;
+}
+
+# Make the boost-install rule visible in subprojects
 
 # This rule should be called from libraries' Jamfiles and will create two
 # targets, "install" and "stage", that will install or stage that library. The
@@ -256,33 +302,28 @@ use-project /boost/libs/wave/tool : libs/wave/tool/build ;
 # ignored.
 #
 # - libraries -- list of library targets to install.
-#
+
 rule boost-install ( libraries * )
 {
-    package.install install
-        : <dependency>/boost//install-proper-headers $(install-requirements)
-        : # No binaries
-        : $(libraries)
-        : # No headers, it is handled by the dependency.
-    ;
-
-    install stage : $(libraries) : <location>$(BOOST_STAGE_LOCATE) ;
+    boost-install.boost-install $(libraries) ;
+}
 
-    module [ CALLER_MODULE ]
-    {
-        explicit stage ;
-        explicit install ;
-    }
+# Creates a library target, adding autolink support and also creates
+# stage and install targets via boost-install, above.
+rule boost-lib ( name : sources * : requirements * : default-build * : usage-requirements * )
+{
+    autolink = <link>shared:<define>BOOST_$(name:U)_DYN_LINK=1 ;
+    name = boost_$(name) ;
+    lib $(name)
+        : $(sources)
+        : $(requirements) $(autolink)
+        : $(default-build)
+        : $(usage-requirements) $(autolink)
+        ;
+    boost-install $(name) ;
 }
 
-headers =
-    # The .SUNWCCh files are present in tr1 include directory and have to be
-    # installed (see http://lists.boost.org/Archives/boost/2007/05/121430.php).
-    [ path.glob-tree $(BOOST_ROOT)/boost : *.hpp *.ipp *.h *.inc *.SUNWCCh : CVS .svn ]
-    [ path.glob-tree $(BOOST_ROOT)/boost/compatibility/cpp_c_headers : c* : CVS .svn ]
-    [ path.glob boost/tr1/tr1 : * : bcc32 sun CVS .svn ]
-    ;
 
 # Declare special top-level targets that build and install the desired variants
 # of the libraries.
-boostcpp.declare-targets $(all-libraries) : $(headers) ;
+boostcpp.declare-targets $(all-libraries) ;