Explorar o código

Add support for --layout option.

[SVN r24428]
Rene Rivera %!s(int64=22) %!d(string=hai) anos
pai
achega
efbbf56d92
Modificáronse 1 ficheiros con 35 adicións e 2 borrados
  1. 35 2
      Jamfile

+ 35 - 2
Jamfile

@@ -13,20 +13,44 @@ Usage:
 
 
 Options:
 Options:
     --help                  This message.
     --help                  This message.
+    
     -sTOOLS=<toolsets>      Indicates the tools to build with.
     -sTOOLS=<toolsets>      Indicates the tools to build with.
+    
+    --layout=<layout>       Determines what kind of build layout to use. This
+                            allows one to control the naming of the resulting
+                            libraries, and the locations of the installed
+                            files. Default is "versioned". Possible values:
+                            
+                                versioned - Uses the Boost standard names
+                                which include version number for Boost the
+                                release and version and name of the
+                                compiler as part of the library names. Also
+                                installs the includes to a versioned
+                                sub-directory.
+                                
+                                system - Builds an install without the
+                                Boost standard names, and does not install
+                                includes to a versioned sub-directory. This
+                                is intended for system integrators to build
+                                for packaging of distributions.
 
 
 Locations:
 Locations:
     --prefix=PREFIX         Install architecture independent files here.
     --prefix=PREFIX         Install architecture independent files here.
                             Default; C:\\Boost on Win32
                             Default; C:\\Boost on Win32
                             Default; /usr/local on Unix. Linux, etc.
                             Default; /usr/local on Unix. Linux, etc.
+                            
     --exec-prefix=EPREFIX   Install architecture dependent files here.
     --exec-prefix=EPREFIX   Install architecture dependent files here.
                             Default; PREFIX
                             Default; PREFIX
+                            
     --libdir=DIR            Install libraries here.
     --libdir=DIR            Install libraries here.
                             Default; EPREFIX/lib
                             Default; EPREFIX/lib
+                            
     --includedir=DIR        Install source headers here.
     --includedir=DIR        Install source headers here.
                             Default; PREFIX/include
                             Default; PREFIX/include
+                            
     --builddir=DIR          Build in this location instead of building
     --builddir=DIR          Build in this location instead of building
                             within the distribution tree. Recomended!
                             within the distribution tree. Recomended!
+                            
     --stagedir=DIR          When staging only, stage to the location.
     --stagedir=DIR          When staging only, stage to the location.
                             Default; ./stage
                             Default; ./stage
 
 
@@ -34,14 +58,17 @@ Features:
     --with-<library>        Build, stage, or install the specified <library>
     --with-<library>        Build, stage, or install the specified <library>
                             If used, teh default becomes to only build
                             If used, teh default becomes to only build
                             indicated libraries.
                             indicated libraries.
+                            
     --without-<library>     Do not build, stage, or install the specified
     --without-<library>     Do not build, stage, or install the specified
                             <library>. By default all libraries attempt to build.
                             <library>. By default all libraries attempt to build.
+                            
     --with-python-root[=PYTHON_ROOT]
     --with-python-root[=PYTHON_ROOT]
                             Build Boost.Python libraries with the Python
                             Build Boost.Python libraries with the Python
                             devel packages located at PYTHON_ROOT.
                             devel packages located at PYTHON_ROOT.
                             Default PYTHON_ROOT; C:\\tools\\python on Win32.
                             Default PYTHON_ROOT; C:\\tools\\python on Win32.
                             Default PYTHON_ROOT; /usr/local on Unix, Linux, etc.
                             Default PYTHON_ROOT; /usr/local on Unix, Linux, etc.
                             Default PYTHON_ROOT; /usr on Cygwin.
                             Default PYTHON_ROOT; /usr on Cygwin.
+                            
     --with-pydebug          Build Boost.Python libraries using the
     --with-pydebug          Build Boost.Python libraries using the
                             Python debug runtime.
                             Python debug runtime.
 " ;
 " ;
@@ -65,6 +92,11 @@ if stage in $(ARGV)
     with-install = ;
     with-install = ;
 }
 }
 
 
+# what kind of layout are we doing?
+local layout = [ MATCH "^--layout=(.*)" : $(ARGV) ] ;
+layout ?= versioned ;
+layout-$(layout) = true ;
+
 # possible stage only location
 # possible stage only location
 local stage-locate = [ MATCH "^--stagedir=(.*)" : $(ARGV) ] ;
 local stage-locate = [ MATCH "^--stagedir=(.*)" : $(ARGV) ] ;
 stage-locate ?= stage ;
 stage-locate ?= stage ;
@@ -138,6 +170,7 @@ local lib-sources = [ install-sources lib ] ;
 if $(lib-sources)
 if $(lib-sources)
 {
 {
     local gNOWARN_INCOMPATIBLE_BUILDS = TRUE ;
     local gNOWARN_INCOMPATIBLE_BUILDS = TRUE ;
+    local gUNVERSIONED_VARIANT_TAG = [ cond $(layout-system) : TRUE ] ;
     
     
     local lib-build =
     local lib-build =
         debug release
         debug release
@@ -161,7 +194,7 @@ if $(lib-sources)
                 $(lib-build)
                 $(lib-build)
                 [ unless $(with-install) $(with-stage) : <suppress>true ]
                 [ unless $(with-install) $(with-stage) : <suppress>true ]
         ] ;
         ] ;
-    if ! $(gIN_LIB_INCLUDE)
+    if ! $(gIN_LIB_INCLUDE) && $(layout-versioned)
     {
     {
         local unversioned-files ;
         local unversioned-files ;
         if $(with-install) || $(with-stage)
         if $(with-install) || $(with-stage)
@@ -203,7 +236,7 @@ if $(lib-sources)
     }
     }
 }
 }
 
 
-stage $(include-locate:D=)/boost-$(version-tag)
+stage [ cond $(layout-versioned) : $(include-locate:D=)/boost-$(version-tag) : $(include-locate:D=) ]
     :
     :
         [ glob-tree $(BOOST_ROOT)/boost/compatibility/cpp_c_headers : c* ]
         [ glob-tree $(BOOST_ROOT)/boost/compatibility/cpp_c_headers : c* ]
         [ glob-tree $(BOOST_ROOT)/boost : *.hpp *.ipp *.h *.inc ]
         [ glob-tree $(BOOST_ROOT)/boost : *.hpp *.ipp *.h *.inc ]

粤ICP备19079148号