From d61fa29da86872a011dcc31bd5545aee8655f9d1 Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Tue, 1 Jul 2014 13:09:15 +1000 Subject: [PATCH] Gave the amalgamated source section a makeover. --- README.md | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index bc9422d..a933a7a 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ Building and testing with SCons **Note:** The SCons-based build system is deprecated. Please use CMake; see the 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. [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 -------------------------- -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 @@ -150,25 +150,24 @@ Generating amalgamated source and header ---------------------------------------- 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 +top-directory (this requires Python 2.6): -The amalgamated source can be generated at any time by running the following -command from the top-directory (requires python 2.6): + python amalgamate.py -python amalgamate.py +It is possible to specify header name. See the `-h` option for detail. -It is possible to specify header name. See -h options for detail. By default, -the following files are generated: -- dist/jsoncpp.cpp: source file that need to be added to your project -- dist/json/json.h: header file corresponding to use in your project. It is -equivalent to including json/json.h in non-amalgamated source. This header -only depends on standard headers. -- dist/json/json-forwards.h: header the provides forward declaration -of all JsonCpp types. This typically what should be included in headers to -speed-up compilation. +By default, the following files are generated: +* `dist/jsoncpp.cpp`: source file that needs to be added to your project. +* `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. +* `dist/json/json-forwards.h`: header that provides forward declaration of all + JsonCpp types. 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. Adding a reader/writer test