summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-04-21 01:00:37 (GMT)
committer John Mark Bell <jmb@netsurf-browser.org>2009-04-21 01:00:37 (GMT)
commit121b51dcc1df45725229aa7eed27822c0f455748 (patch)
tree2bcd70c13537309bc3b985f15ec7e6c1f84be4ca
parent1972582ddf410ee3345adc40539b3ce11e49a04d (diff)
downloadlibhubbub-121b51dcc1df45725229aa7eed27822c0f455748.tar.gz
libhubbub-121b51dcc1df45725229aa7eed27822c0f455748.tar.bz2
Expand documentation, bringing it into line with reality.
svn path=/trunk/hubbub/; revision=7141
-rw-r--r--README91
1 files changed, 67 insertions, 24 deletions
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=<target-platform>
+
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
-------------------------------