Gave the amalgamated source section a makeover.

This commit is contained in:
Aaron Jacobs 2014-07-01 13:09:15 +10:00
parent b2a086adeb
commit d61fa29da8

View File

@ -80,7 +80,7 @@ Building and testing with SCons
**Note:** The SCons-based build system is deprecated. Please use CMake; see the **Note:** The SCons-based build system is deprecated. Please use CMake; see the
section above. section above.
JsonCpp can use [Scons][] as a build system. Note that SCons requires python to JsonCpp can use [Scons][] as a build system. Note that SCons requires Python to
be installed. be installed.
[SCons]: http://www.scons.org/ [SCons]: http://www.scons.org/
@ -139,7 +139,7 @@ In the instructions below, replace `path/to/jsontest` with the path of the
Building the documentation Building the documentation
-------------------------- --------------------------
Run the python script `doxybuild.py` from the top directory: Run the Python script `doxybuild.py` from the top directory:
python doxybuild.py --open --with-dot python doxybuild.py --open --with-dot
@ -150,25 +150,24 @@ Generating amalgamated source and header
---------------------------------------- ----------------------------------------
JsonCpp is provided with a script to generate a single header and a single JsonCpp is provided with a script to generate a single header and a single
source file to ease inclusion in an existing project. source file to ease inclusion into an existing project. The amalgamated source
can be generated at any time by running the following command from the
The amalgamated source can be generated at any time by running the following top-directory (this requires Python 2.6):
command from the top-directory (requires python 2.6):
python amalgamate.py python amalgamate.py
It is possible to specify header name. See -h options for detail. By default, It is possible to specify header name. See the `-h` option for detail.
the following files are generated:
- dist/jsoncpp.cpp: source file that need to be added to your project By default, the following files are generated:
- dist/json/json.h: header file corresponding to use in your project. It is * `dist/jsoncpp.cpp`: source file that needs to be added to your project.
equivalent to including json/json.h in non-amalgamated source. This header * `dist/json/json.h`: corresponding header file for use in your project. It is
equivalent to including `json/json.h` in non-amalgamated source. This header
only depends on standard headers. only depends on standard headers.
- dist/json/json-forwards.h: header the provides forward declaration * `dist/json/json-forwards.h`: header that provides forward declaration of all
of all JsonCpp types. This typically what should be included in headers to JsonCpp types.
speed-up compilation.
The amalgamated sources are generated by concatenating JsonCpp source in the The amalgamated sources are generated by concatenating JsonCpp source in the
correct order and defining macro JSON_IS_AMALGAMATION to prevent inclusion correct order and defining the macro `JSON_IS_AMALGAMATION` to prevent inclusion
of other headers. of other headers.
Adding a reader/writer test Adding a reader/writer test