Update makesfiles.

Deprecate makefiles and update docs.
Fixes #7286.

[SVN r81621]
This commit is contained in:
John Maddock
2012-11-29 10:46:51 +00:00
parent e2632f2f2f
commit 333bdbaf14
15 changed files with 3615 additions and 4016 deletions

View File

@ -159,268 +159,39 @@
</p>
<h5>
<a name="boost_regex.install.h2"></a>
<span class="phrase"><a name="boost_regex.install.building_via_makefiles"></a></span><a class="link" href="install.html#boost_regex.install.building_via_makefiles">Building
via makefiles</a>
</h5>
<h6>
<a name="boost_regex.install.h3"></a>
<span class="phrase"><a name="boost_regex.install.borland_c___builder_"></a></span><a class="link" href="install.html#boost_regex.install.borland_c___builder_">Borland
C++ Builder:</a>
</h6>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
Open up a console window and change to the <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">&gt;\</span><span class="identifier">libs</span><span class="special">\</span><span class="identifier">regex</span><span class="special">\</span><span class="identifier">build</span></code> directory.
</li>
<li class="listitem">
Select the appropriate makefile (bcb4.mak for C++ Builder 4, bcb5.mak for
C++ Builder 5, and bcb6.mak for C++ Builder 6).
</li>
<li class="listitem">
Invoke the makefile (pass the full path to your version of make if you
have more than one version installed, the makefile relies on the path to
make to obtain your C++ Builder installation directory and tools) for example:
</li>
</ul></div>
<pre class="programlisting">make -fbcb5.mak</pre>
<p>
The build process will build a variety of .lib and .dll files (the exact number
depends upon the version of Borland's tools you are using) the .lib and dll
files will be in a sub-directory called bcb4 or bcb5 depending upon the makefile
used. To install the libraries into your development system use:
</p>
<pre class="programlisting">make -fbcb5.mak install</pre>
<p>
library files will be copied to <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">BCROOT</span><span class="special">&gt;/</span><span class="identifier">lib</span></code> and the dll's to <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">BCROOT</span><span class="special">&gt;/</span><span class="identifier">bin</span></code>, where <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">BCROOT</span><span class="special">&gt;</span></code>
corresponds to the install path of your Borland C++ tools.
</p>
<p>
You may also remove temporary files created during the build process (excluding
lib and dll files) by using:
</p>
<pre class="programlisting">make -fbcb5.mak clean</pre>
<p>
Finally when you use Boost.Regex it is only necessary for you to add the <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">&gt;</span></code> root director to your list of include directories
for that project. It is not necessary for you to manually add a .lib file to
the project; the headers will automatically select the correct .lib file for
your build mode and tell the linker to include it. There is one caveat however:
the library can not tell the difference between VCL and non-VCL enabled builds
when building a GUI application from the command line, if you build from the
command line with the 5.5 command line tools then you must define the pre-processor
symbol _NO_VCL in order to ensure that the correct link libraries are selected:
the C++ Builder IDE normally sets this automatically. Hint, users of the 5.5
command line tools may want to add a -D_NO_VCL to bcc32.cfg in order to set
this option permanently.
</p>
<p>
If you would prefer to do a dynamic link to the regex libraries when using
the dll runtime then define BOOST_REGEX_DYN_LINK (you must do this if you want
to use Boost.Regex in multiple dll's), otherwise Boost.Regex will be statically
linked by default.
</p>
<p>
If you want to suppress automatic linking altogether (and supply your own custom
build of the lib) then define BOOST_REGEX_NO_LIB.
</p>
<p>
If you are building with C++ Builder 6, you will find that <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
can not be used in a pre-compiled header (the actual problem is in <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">locale</span><span class="special">&gt;</span></code> which gets included by <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>),
if this causes problems for you, then try defining BOOST_NO_STD_LOCALE when
building, this will disable some features throughout boost, but may save you
a lot in compile times!
</p>
<h5>
<a name="boost_regex.install.h4"></a>
<span class="phrase"><a name="boost_regex.install.microsoft_visual_c___6__7__7_1_and_8"></a></span><a class="link" href="install.html#boost_regex.install.microsoft_visual_c___6__7__7_1_and_8">Microsoft
Visual C++ 6, 7, 7.1 and 8</a>
<span class="phrase"><a name="boost_regex.install.building_from_source"></a></span><a class="link" href="install.html#boost_regex.install.building_from_source">Building
from Source</a>
</h5>
<p>
You need version 6 or later of MSVC to build this library. If you are using
VC5 then you may want to look at one of the previous releases of this library.
The Regex library is "just a bunch of source files": nothing special
is required to build them.
</p>
<p>
Open up a command prompt, which has the necessary MSVC environment variables
defined (for example by using the batch file Vcvars32.bat installed by the
Visual Studio installation), and change to the <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">&gt;\</span><span class="identifier">libs</span><span class="special">\</span><span class="identifier">regex</span><span class="special">\</span><span class="identifier">build</span> <span class="identifier">directory</span></code>.
You can either build the files under boost-path/libs/regex/src/*.cpp as a library,
or add them directly to your project. This is particularly useful if you need
to use specific compiler options not supported by the default Boost build.
</p>
<p>
Select the correct makefile - vc6.mak for "vanilla" Visual C++ 6
or vc6-stlport.mak if you are using STLPort.
</p>
<p>
Invoke the makefile like this:
</p>
<pre class="programlisting">nmake -fvc6.mak</pre>
<p>
You will now have a collection of lib and dll files in a "vc6" subdirectory,
to install these into your development system use:
</p>
<pre class="programlisting">nmake -fvc6.mak install</pre>
<p>
The lib files will be copied to your <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">VC6</span><span class="special">&gt;\</span><span class="identifier">lib</span></code> directory and the dll files to <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">VC6</span><span class="special">&gt;\</span><span class="identifier">bin</span></code>, where <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">VC6</span><span class="special">&gt;</span></code> is
the root of your Visual C++ 6 installation.
</p>
<p>
You can delete all the temporary files created during the build (excluding
lib and dll files) using:
</p>
<pre class="programlisting">nmake -fvc6.mak clean </pre>
<p>
If you want to build with ICU support, then you need to pass the path to your
ICU directory to the makefile, for example with:
</p>
<pre class="programlisting">nmake ICU_PATH=c:\open-source\icu -fvc71.mak install</pre>
<p>
Finally when you use Boost.Regex it is only necessary for you to add the <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">&gt;</span></code> root directory to your list of include
directories for that project. It is not necessary for you to manually add a
.lib file to the project; the headers will automatically select the correct
.lib file for your build mode and tell the linker to include it.
</p>
<p>
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.
</p>
<p>
If you want to add the source directly to your project then define BOOST_REGEX_NO_LIB
to disable automatic library selection.
</p>
<p>
There are several important caveats to remember when using Boost.Regex with
Microsoft's Compiler:
There are two #defines you should be aware of:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
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 /Oityb1 rather than /O2. That
is to use all optimization settings except /Oa. This problem is reported
to affect some standard library code as well ( in fact I'm not sure if
the problem is with the regex code or the underlying standard library),
so it's probably worthwhile applying this workaround in normal practice
in any case.
BOOST_HAS_ICU should be defined if you want ICU support compiled in.
</li>
<li class="listitem">
If you have replaced the C++ standard library that comes with VC6, then
when you build the library you must ensure that the environment variables
"INCLUDE" and "LIB" have been updated to reflect the
include and library paths for the new library - see vcvars32.bat (part
of your Visual Studio installation) for more details.
</li>
<li class="listitem">
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).
</li>
<li class="listitem">
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.
BOOST_REGEX_DYN_LINK should be defined if you are building a DLL on Windows.
</li>
</ul></div>
<h6>
<a name="boost_regex.install.h5"></a>
<span class="phrase"><a name="boost_regex.install.gcc_2_95_and_later_"></a></span><a class="link" href="install.html#boost_regex.install.gcc_2_95_and_later_">GCC(2.95
and later)</a>
</h6>
<p>
You can build with gcc using the normal boost Jamfile in <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">&gt;/</span><span class="identifier">libs</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">build</span></code>, alternatively
there is a conservative makefile for the g++ compiler. From the command prompt
change to the &lt;boost&gt;/libs/regex/build directory and type:
</p>
<pre class="programlisting">make -fgcc.mak </pre>
<p>
At the end of the build process you should have a gcc sub-directory containing
release and debug versions of the library (libboost_regex.a and libboost_regex_debug.a).
When you build projects that use regex++, you will need to add the boost install
directory to your list of include paths and add &lt;boost&gt;/libs/regex/build/gcc/libboost_regex.a
to your list of library files.
</p>
<p>
There is also a makefile to build the library as a shared library:
</p>
<pre class="programlisting">make -fgcc-shared.mak</pre>
<p>
which will build libboost_regex.so and libboost_regex_debug.so.
</p>
<p>
Both of the these makefiles support the following environment variables:
</p>
<p>
ICU_PATH: tells the makefile to build with Unicode support, set to the path
where your ICU installation is located, for example with: make ICU_PATH=/usr/local
install -fgcc.mak
</p>
<p>
CXXFLAGS: extra compiler options - note that this applies to both the debug
and release builds.
</p>
<p>
INCLUDES: additional include directories.
</p>
<p>
LDFLAGS: additional linker options.
</p>
<p>
LIBS: additional library files.
</p>
<p>
For the more adventurous there is a configure script in <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">&gt;/</span><span class="identifier">libs</span><span class="special">/</span><span class="identifier">config</span></code>;
see the <a href="../../../../config/index.html" target="_top">config library documentation</a>.
</p>
<h6>
<a name="boost_regex.install.h6"></a>
<span class="phrase"><a name="boost_regex.install.sun_workshop_6_1"></a></span><a class="link" href="install.html#boost_regex.install.sun_workshop_6_1">Sun
Workshop 6.1</a>
</h6>
<p>
There is a makefile for the sun (6.1) compiler (C++ version 3.12). From the
command prompt change to the <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">&gt;/</span><span class="identifier">libs</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">build</span></code> directory
and type:
</p>
<pre class="programlisting">dmake -f sunpro.mak </pre>
<p>
At the end of the build process you should have a sunpro sub-directory containing
single and multithread versions of the library (libboost_regex.a, libboost_regex.so,
libboost_regex_mt.a and libboost_regex_mt.so). When you build projects that
use Boost.Regex, you will need to add the boost install directory to your list
of include paths and add <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">&gt;/</span><span class="identifier">libs</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">build</span><span class="special">/</span><span class="identifier">sunpro</span><span class="special">/</span></code> to
your library search path.
</p>
<p>
Both of the these makefiles support the following environment variables:
</p>
<p>
CXXFLAGS: extra compiler options - note that this applies to both the single
and multithreaded builds.
</p>
<p>
INCLUDES: additional include directories.
</p>
<p>
LDFLAGS: additional linker options.
</p>
<p>
LIBS: additional library files.
</p>
<p>
LIBSUFFIX: a suffix to mangle the library name with (defaults to nothing).
</p>
<p>
This makefile does not set any architecture specific options like -xarch=v9,
you can set these by defining the appropriate macros, for example:
</p>
<pre class="programlisting">dmake CXXFLAGS="-xarch=v9" LDFLAGS="-xarch=v9" LIBSUFFIX="_v9" -f sunpro.mak</pre>
<p>
will build v9 variants of the regex library named libboost_regex_v9.a etc.
</p>
<h6>
<a name="boost_regex.install.h7"></a>
<span class="phrase"><a name="boost_regex.install.makefiles_for_other_compilers"></a></span><a class="link" href="install.html#boost_regex.install.makefiles_for_other_compilers">Makefiles
for Other compilers</a>
</h6>
<p>
There is a generic makefile (generic.mak ) provided in <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">-</span><span class="identifier">root</span><span class="special">&gt;/</span><span class="identifier">libs</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">build</span></code> - see that makefile for details of
environment variables that need to be set before use.
</p>
<div class="important"><table border="0" summary="Important">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../../../../../doc/src/images/important.png"></td>
<th align="left">Important</th>
</tr>
<tr><td align="left" valign="top"><p>
The makefiles that were supplied with Boost.Regex are now deprecated and
will be removed in the next release.
</p></td></tr>
</table></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>