3 # Author: Pekka Riikonen <priikone@silcnet.org>
5 # Copyright (C) GNU GPL 2001 Pekka Riikonen
7 # SILC Toolkit Reference Manual documentation script. This will automatically
8 # generate documentation from the source tree. This will require the
9 # robodoc compiled in util/robodoc and php utility installed in your system.
11 # This will tarverse the given directory and all subdirectories for the
12 # SILC style header files. All header files starting with prefix `silc'
13 # will be checked. For example, silcpkcs.h.
15 # Usage: ./sildoc <type> <source directory> <destination directory> <robodoc>
17 # The <source directory> is the directory where this starts checking for
18 # the headers and will traverse all subdirectories. The <destination
19 # directory> is the directory to where the documentation is generated.
23 if [ $# -lt "4" ]; then
24 echo "Usage: ./silcdoc <type> <source directory> <destination directory> <robodoc>"
25 echo "Supported types: HTML"
26 # echo "Supported types: HTML, ASCII, LATEX or RTF"
35 # Get all headers in the source directory
36 headers=`find $SRC -name "silc*.h"`
41 if [ "$TYPE" = "HTML" ]; then
42 mkdir /tmp/silcdoc.html
43 cp $headers /tmp/silcdoc.html
47 headers=`find . -name "silc*.h" |cut -d/ -f2 |cut -d. -f1`
51 $ROBO /tmp/silcdoc.html/$i.h $DST/$i.html $TYPE
53 # Generate the TOC file
54 sh gen.sh gen_toc.php $DST/$i.html $DST/$i.html
55 sh gen.sh index.php $DST/$i.html $DST/$i.html
57 # Generate the details and the layour
58 files=`find $DST -name "$i_*.html"`
61 sh gen.sh gen_detail.php $k $k
62 sh gen.sh index.php $k $k
65 rm -f $DST/$i_index.tmpl
68 rm -rf /tmp/silcdoc.html