From 8bb6861595d01c568a22dc5e6b0def4afea2fa3f Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 20 May 2003 11:27:29 +0000 Subject: [PATCH] Updated Jamfile to use simplified naming scheme on Unix platforms. Updated build docs. [SVN r18466] --- build/Jamfile | 172 +++++++++++++++++++------------- doc/Attic/install.html | 20 ++-- doc/Attic/redistributables.html | 27 ++--- doc/install.html | 20 ++-- doc/redistributables.html | 27 ++--- 5 files changed, 151 insertions(+), 115 deletions(-) diff --git a/build/Jamfile b/build/Jamfile index 3967f56b..98c800c1 100644 --- a/build/Jamfile +++ b/build/Jamfile @@ -23,78 +23,111 @@ dll boost_regex : ../src/$(SOURCES).cpp debug release ; - -rule boost-regex-stage-tag ( toolset variant : properties * ) +if $(NT) { - local lib-thread-opt = s ; - if multi in $(properties) - { - lib-thread-opt = m ; - } - - local lib-rt-opt = s ; - if dynamic in $(properties) - { - lib-rt-opt = d ; - } - - local lib-debug-opt = "" ; - if [ MATCH .*(debug).* : $(variant) ] - { - lib-debug-opt = d ; - } - - local lib-toolset = $(toolset) ; - - local warning-var = regex.$(toolset)-warning-issued ; - local warning ; - - switch $(toolset) - { + # on NT we use the name mangling scheme defined in + # boost/regex/config/regex_library_include.hpp : + + rule boost-regex-stage-tag ( toolset variant : properties * ) + { + local lib-thread-opt = s ; + if multi in $(properties) + { + lib-thread-opt = m ; + } + + local lib-rt-opt = s ; + if dynamic in $(properties) + { + lib-rt-opt = d ; + } + + local lib-debug-opt = "" ; + if [ MATCH .*(debug).* : $(variant) ] + { + lib-debug-opt = d ; + } + + local lib-toolset = $(toolset) ; + + local warning-var = regex.$(toolset)-warning-issued ; + local warning ; + + switch $(toolset) + { + + case borland : + if ! ( BORLAND_VERSION) in 4 5 6 ) + { + BORLAND_VERSION = 6 ; # chose default version + warning = "BORLAND_VERSION not set to 4, 5, or 6: staged Boost.Regex library will be named appropriately for version" $(BORLAND_VERSION) ; + } + lib-toolset = bcb$(BORLAND_VERSION) ; - case borland : - if ! ( BORLAND_VERSION) in 4 5 6 ) - { - BORLAND_VERSION = 5 ; # chose default version - warning = "BORLAND_VERSION not set to 4, 5, or 6 - staged Boost.Regex library will be named appropriately for version" $(BORLAND_VERSION) ; - } - lib-toolset = bcb$(BORLAND_VERSION) ; - - case msvc : - warning = "msvc toolset builds Boost.Regex library for vc6; use vc7 or vc7.1 toolsets for other versions" ; - lib-toolset = vc6 ; - if dynamic in $(properties) - { - lib-thread-opt = m ; - } + case msvc : + warning = "msvc toolset builds Boost.Regex library for vc6; use vc7 or vc7.1 toolsets for other versions" ; + lib-toolset = vc6 ; + if dynamic in $(properties) + { + lib-thread-opt = m ; + } - - case msvc-stlport : - warning = "msvc-stlport toolset only builds Boost.Regex library for use with vc6" ; - lib-toolset = vc6-stlport ; - if debug in $(properties) - { - lib-debug-opt = dd ; - } - if dynamic in $(properties) - { - lib-thread-opt = m ; - } - case vc7.1 : - lib-toolset = vc71 ; - if dynamic in $(properties) - { - lib-thread-opt = m ; - } - } - - if $(warning) && ! $($(warning-var)) - { - ECHO Warning: $(warning) ; - $(warning-var) = issued ; - } - return $(properties) <$(variant)>_$(lib-toolset)_$(lib-thread-opt)$(lib-rt-opt)$(lib-debug-opt) ; + + case msvc-stlport : + warning = "msvc-stlport toolset only builds Boost.Regex library for use with vc6" ; + lib-toolset = vc6-stlport ; + if debug in $(properties) + { + lib-debug-opt = dd ; + } + if dynamic in $(properties) + { + lib-thread-opt = m ; + } + case vc7 : + warning = "vc7 toolset builds Boost.Regex library for vc7.0; use msvc or vc7.1 toolsets for other versions" ; + + case vc7.1 : + warning = "vc7.1 toolset builds Boost.Regex library for vc7.1; use vc7 or msvc toolsets for other versions" ; + lib-toolset = vc71 ; + if dynamic in $(properties) + { + lib-thread-opt = m ; + } + } + + if $(warning) && ! $($(warning-var)) + { + ECHO Warning: $(warning) ; + $(warning-var) = issued ; + } + return $(properties) <$(variant)>_$(lib-toolset)_$(lib-thread-opt)$(lib-rt-opt)$(lib-debug-opt) ; + } + +} +else +{ + + # On Unix platforms we use a simplified naming scheme, + # just appending _mt for multi-threaded builds and + # _debug for debug builds. + + rule boost-regex-stage-tag ( toolset variant : properties * ) + { + local lib-thread-opt = "" ; + if multi in $(properties) + { + lib-thread-opt = _mt ; + } + + local lib-debug-opt = "" ; + if [ MATCH .*(debug).* : $(variant) ] + { + lib-debug-opt = _debug ; + } + + return $(properties) <$(variant)>$(lib-thread-opt)$(lib-debug-opt) ; + } } stage bin-stage : boost_regex boost_regex @@ -109,3 +142,4 @@ stage bin-stage : boost_regex boost_regex + diff --git a/doc/Attic/install.html b/doc/Attic/install.html index f24fb744..77f15adc 100644 --- a/doc/Attic/install.html +++ b/doc/Attic/install.html @@ -128,11 +128,11 @@ project; the headers will automatically select the correct .lib file for your build mode and tell the linker to include it.

-

Note that if you want to statically link to the regex library when using the - dynamic C++ runtime, define BOOST_REGEX_STATIC_LINK when building your project - (this only has an effect for release builds). If you want to add the source - directly to your project then define BOOST_REGEX_NO_LIB to disable automatic - library selection.

+

+ Note that if you want to dynamically link to the regex library when using the + dynamic C++ runtime, define BOOST_REGEX_DYN_LINK when building your project. If + you want to add the source directly to your project then define + BOOST_REGEX_NO_LIB to disable automatic library selection.

Important: there have been some reports of compiler-optimization bugs affecting this library, (particularly with VC6 versions prior to service patch 5) the workaround is to build the library using @@ -152,11 +152,12 @@

If you are building with the full STLPort v4.x, then use the vc6-stlport.mak file provided and set the environment variable STLPORT_PATH to point to the location of your STLport installation (Note that the full STLPort libraries - appear not to support single-thread static builds). + appear not to support single-thread static builds). 
-   +   
-   + If you are building your application with /Zc:wchar_t then you will need to + modify the makefile to add /Zc:wchar_t before building the library.

GCC(2.95 and 3.x)

@@ -225,7 +226,7 @@ 17 May 2003

-

© Copyright John Maddock 1998- 2003

+

© Copyright John Maddock 1998- 2003

Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that @@ -234,4 +235,3 @@ for any purpose. It is provided "as is" without express or implied warranty.

- diff --git a/doc/Attic/redistributables.html b/doc/Attic/redistributables.html index 884fca7a..f40f40f4 100644 --- a/doc/Attic/redistributables.html +++ b/doc/Attic/redistributables.html @@ -25,25 +25,27 @@

If you are using Microsoft or Borland C++ and link to a dll version of the run - time library, then you will also link to one of the dll versions of boost.regex. - While these dll's are redistributable, there are no "standard" versions, so - when installing on the users PC, you should place these in a directory private - to your application, and not in the PC's directory path. Note that if you link - to a static version of your run time library, then you will also link to a - static version of boost.regex and no dll's will need to be distributed. The - possible boost.regex dll and library names are computed according to the following - formula:
+ time library, then you will also link to one of the dll versions of + boost.regex. While these dll's are redistributable, there are no "standard" + versions, so when installing on the users PC, you should place these in a + directory private to your application, and not in the PC's directory path. Note + that if you link to a static version of your run time library, then you will + also link to a static version of boost.regex and no dll's will need to be + distributed. The possible boost.regex dll and library names are computed + according to the following formula:

-

"boost_regex_"
+

BOOST_LIB_PREFIX
+ + "boost_regex_"
+ BOOST_LIB_TOOLSET
+ "_"
+ BOOST_LIB_THREAD_OPT
+ BOOST_LIB_RT_OPT
- + BOOST_LIB_LINK_OPT
+ BOOST_LIB_DEBUG_OPT

- These are defined as:
+ These are defined as:

+

BOOST_LIB_PREFIX: Either "lib" if this is a static link library, + or nothing for dynamic / shared libraries.

BOOST_LIB_TOOLSET: The compiler toolset name (vc6, vc7, bcb5 etc).

@@ -72,7 +74,7 @@ 17 May 2003

-

© Copyright John Maddock 1998- 2003

+

© Copyright John Maddock 1998- 2003

Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that @@ -81,4 +83,3 @@ for any purpose. It is provided "as is" without express or implied warranty.

- diff --git a/doc/install.html b/doc/install.html index f24fb744..77f15adc 100644 --- a/doc/install.html +++ b/doc/install.html @@ -128,11 +128,11 @@ project; the headers will automatically select the correct .lib file for your build mode and tell the linker to include it.

-

Note that if you want to statically link to the regex library when using the - dynamic C++ runtime, define BOOST_REGEX_STATIC_LINK when building your project - (this only has an effect for release builds). If you want to add the source - directly to your project then define BOOST_REGEX_NO_LIB to disable automatic - library selection.

+

+ Note that if you want to dynamically link to the regex library when using the + dynamic C++ runtime, define BOOST_REGEX_DYN_LINK when building your project. If + you want to add the source directly to your project then define + BOOST_REGEX_NO_LIB to disable automatic library selection.

Important: there have been some reports of compiler-optimization bugs affecting this library, (particularly with VC6 versions prior to service patch 5) the workaround is to build the library using @@ -152,11 +152,12 @@

If you are building with the full STLPort v4.x, then use the vc6-stlport.mak file provided and set the environment variable STLPORT_PATH to point to the location of your STLport installation (Note that the full STLPort libraries - appear not to support single-thread static builds). + appear not to support single-thread static builds). 
-   +   
-   + If you are building your application with /Zc:wchar_t then you will need to + modify the makefile to add /Zc:wchar_t before building the library.

GCC(2.95 and 3.x)

@@ -225,7 +226,7 @@ 17 May 2003

-

© Copyright John Maddock 1998- 2003

+

© Copyright John Maddock 1998- 2003

Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that @@ -234,4 +235,3 @@ for any purpose. It is provided "as is" without express or implied warranty.

- diff --git a/doc/redistributables.html b/doc/redistributables.html index 884fca7a..f40f40f4 100644 --- a/doc/redistributables.html +++ b/doc/redistributables.html @@ -25,25 +25,27 @@

If you are using Microsoft or Borland C++ and link to a dll version of the run - time library, then you will also link to one of the dll versions of boost.regex. - While these dll's are redistributable, there are no "standard" versions, so - when installing on the users PC, you should place these in a directory private - to your application, and not in the PC's directory path. Note that if you link - to a static version of your run time library, then you will also link to a - static version of boost.regex and no dll's will need to be distributed. The - possible boost.regex dll and library names are computed according to the following - formula:
+ time library, then you will also link to one of the dll versions of + boost.regex. While these dll's are redistributable, there are no "standard" + versions, so when installing on the users PC, you should place these in a + directory private to your application, and not in the PC's directory path. Note + that if you link to a static version of your run time library, then you will + also link to a static version of boost.regex and no dll's will need to be + distributed. The possible boost.regex dll and library names are computed + according to the following formula:

-

"boost_regex_"
+

BOOST_LIB_PREFIX
+ + "boost_regex_"
+ BOOST_LIB_TOOLSET
+ "_"
+ BOOST_LIB_THREAD_OPT
+ BOOST_LIB_RT_OPT
- + BOOST_LIB_LINK_OPT
+ BOOST_LIB_DEBUG_OPT

- These are defined as:
+ These are defined as:

+

BOOST_LIB_PREFIX: Either "lib" if this is a static link library, + or nothing for dynamic / shared libraries.

BOOST_LIB_TOOLSET: The compiler toolset name (vc6, vc7, bcb5 etc).

@@ -72,7 +74,7 @@ 17 May 2003

-

© Copyright John Maddock 1998- 2003

+

© Copyright John Maddock 1998- 2003

Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that @@ -81,4 +83,3 @@ for any purpose. It is provided "as is" without express or implied warranty.

-