cdoc is distributed as a set of separately downloadable archives:
| cdoc.jar | the compiled classes, ready to run. It was compiled using the Sun J2SE 1.4 development kit. |
| cdoc_docs.zip | documentation for cdoc generated by javadoc. The user manual is part of this set of web pages, as the cdoc class description. You do not need this if you intend to compile cdoc and have javadoc installed. |
| cdoc_srce.zip | source files for cdoc. |
| cdoc_tests.zip | a set of C programs containing test cases. You can build and use cdoc without installing this archive but you need it if you want to run regression tests or modify cdoc. It also contains test data for use by the Java test harnesses. |
My environ.jar and the coco.jar package files must be in the class path and readable. cdoc will not run and cannot be compiled without environ.jar.
environ.jar is supplied in the envj_bin.zip archive. This should be downloaded at the same time as you download cdoc. Unpack it and move the JAR files it contains into a directory on your CLASSPATH. If you want documentation and/or source for this package, download the envj_srce.zip archive and unzip it. This will create the envj directory and unpack the source tree into it. Build instructions are in doc/README.
coco.jar is the Coco/R compiler generator, used to generate the Parser and Scanner classes from the definition in ConditionalExpression.atg. It is only needed if you intend to compile cdoc. You can obtain Coco/R from: www.ssw.uni-linz.ac.at/Research/Projects/Coco/
Unzip the sources, change your reference point into the resulting directory and run
$ make all docs
which should run Coco/R to generate the Scanner and Parser sources, compile all classes and generate cdoc documentation as a set of web pages.
If you want to test the result you must have also unzipped cdoc_tests.zip. The command:
$ make tests
check compiles the set of C test sources and a set of Java test harnesses used to exercise cdoc's parser classes. With this archive installed you can test cdoc by running the command:
$ java cdoc *.h
which will document all the C test sources, leaving the result in the main directory as a set of HTML files.
Install cdoc by running:
$ make install
as root. cdoc documentation can be made generally available by moving all the files and directories in docs to a suitable place where it is available to your web browser or your web server. Access the documentation by pointing the browser or web server at index.html
Tidy up by running:
$ make clean
which removes all compiler output and generated documentation.
The contents of docs/cdoc.html fully describes the use of cdoc.
cdoc can be run from a makefile after it has been installed. Adding the following to the project makefile will do the job:
CDOCS = docs
CDOCIDX = $(CDOCS)/index.html
(CDOCIDX): *.[ch]
cd $(CDOCS); java cdoc -DLINUX ../*.h