From 121b51dcc1df45725229aa7eed27822c0f455748 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Tue, 21 Apr 2009 01:00:37 +0000 Subject: Expand documentation, bringing it into line with reality. svn path=/trunk/hubbub/; revision=7141 --- README | 91 ++++++++++++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 67 insertions(+), 24 deletions(-) (limited to 'README') diff --git a/README b/README index ef3837c..1c8c443 100644 --- a/README +++ b/README @@ -30,40 +30,58 @@ Requirements + gcov and lcov, for test coverage data +LibParserUtils +-------------- -Compilation ------------ - - In order to compile Hubbub, you will need LibParserUtils. This can be + To compile Hubbub, you will need LibParserUtils. This can be obtained from SVN: $ svn co svn://svn.netsurf-browser.org/trunk/libparserutils/ - In order to run tests, you will need JSON-C. You can obtain the version + Follow the instructions in LibParserUtils' README file to build and + install it. + + Note: By default, libparserutils only supports a few character sets. It may, + however, be configured to use iconv() to provide charset conversion. + See LibParserUtils' README for further information. + +JSON-C +------ + + To run tests, you will need JSON-C. You can obtain the version that Hubbub needs from SVN: $ svn co svn://svn.netsurf-browser.org/trunk/json-c/json-c/ + Build and install JSON-C as follows: - Compile and install both of these before trying to make Hubbub. + $ sh autogen.sh + $ make install - Note: By default, libparserutils only supports a few character sets. It may, - however, be configured to use iconv() to provide charset conversion. - To do this, do the following: +Compilation +----------- - $ cd /path/to/libparserutils - $ echo "CFLAGS += -DWITH_ICONV_FILTER" \ - >build/Makefile.config.override + The exact type of build may be configured by passing parameters to make. + Common usage is described below. - Then build libparserutils as normal. + For a static library: - If necessary, modify the toolchain settings in the Makefile. - Invoke make: $ make + For a shared library: + + $ make COMPONENT_TYPE=lib-shared + + For a static library with debug enabled: + + $ make BUILD=debug + + To cross-compile a static library: + + $ make TARGET= + Verification ------------ - To verify that the parser is working, it is necessary to specify a - different makefile target than that used for normal compilation, thus: + The library's functionality may be verified, thus: $ make test @@ -71,21 +89,46 @@ Verification $ make coverage - Then open the build/coverage/index.html file in a web browser. + Then open build/coverage/index.html in a web browser. + + In both cases, ensure that the same parameters to make are passed as when + building the library. + +(Un)installation +---------------- + + To install the library: + + $ make install + + Ensure that the same parameters to make are passed as when building the + library. + + To specify the installation prefix: + $ make install PREFIX=/path/to/prefix + + To specify a staging directory for packaging: + + $ make install DESTDIR=/path/to/directory + + Items will be installed to $(DESTDIR)$(PREFIX)/ + + To uninstall: + + $ make uninstall API documentation ----------------- - Currently, there is none. However, the code is well commented and the - public API may be found in the "include" directory. The "examples" - directory contains commented examples of how to use hubbub. - - Additionally, you can use doxygen to auto-generate API documentation, thus: + Use doxygen to auto-generate API documentation, thus: $ make docs - Then open the build/docs/html/index.html file in a web browser. + Then open build/docs/html/index.html in a web browser. + + The "examples" directory contains commented examples of how to use Hubbub. + The test driver code in test/ may also provide some useful pointers. A note on character set aliases ------------------------------- -- cgit v1.2.3