6 gtkdoc-mkpdf version @VERSION@ - generate documentation in pdf format
8 --verbose Print extra output while processing
9 --path=SEARCH_PATH Extra source directories
10 --imgdir=DIR Extra image directories
11 MODULE Name of the doc module being parsed
12 DRIVER_FILE File containing the toplevel DocBook file.
13 --version Print the version of this program
14 --help Print this help
25 # parse options, ignore unknown options for future extensions
33 X--version
) echo "@VERSION@"; exit 0;;
34 X--help
) usage
; exit 0;;
35 X--uninstalled
) uninstalled
=yes; shift;;
36 X--verbose
) verbose
="1"; shift;;
37 X--path
=*) searchpath
=`echo $1 | sed s/.*=//`; shift;;
38 X--imgdir
=*) imgdirs
="$imgdirs -I `echo $1 | sed s/.*=//`"; shift;;
44 if test $# -lt 2; then
55 if test $verbose = "1"; then
59 if test $uninstalled = yes; then
60 # this does not work from buiddir!=srcdir
62 # MAKE_SCRDIR=$(abs_srcdir) MAKE_BUILDDIR=$(abs_builddir) gtkdoc-mkpdf ...
63 gtkdocdir
=`dirname $0`
64 #echo "uninstalled, gtkdocdir=$gtkdocdir"
66 # the first two are needed to resolve datadir
68 datarootdir
=@datarootdir@
69 gtkdocdir
=@datadir@
/gtk-doc
/data
72 if head -n 1 $document |
grep "<?xml" > /dev
/null
; then
77 path_option
='--directory'
80 # we could do "$path_option $PWD "
81 # to avoid needing rewriting entities that are copied from the header
83 if test "X$searchpath" = "X"; then
86 path_arg
="$path_option $searchpath"
90 if test -n "@DBLATEX@"; then
91 # extra options to consider
93 # -V is useful for debugging
94 # -T db2latex : different style
95 # -d : keep transient files (for debugging)
96 # -P abc.def=$quiet : once the stylesheets have a quiet mode
97 # xsltproc is already called with --xinclude
98 # does not work: --xslt-opts "$path_arg --nonet $@"
99 dblatex_options
="-o $module.pdf $imgdirs $document"
100 #echo "calling: @DBLATEX@ $dblatex_options"
101 if test $verbose = "0"; then
102 @DBLATEX@
2>&1 --help |
grep >/dev
/null
"\-\-quiet"
103 if test "$?" = "0"; then
104 dblatex_options
="--quiet $dblatex_options";
106 @DBLATEX@
2>&1 >/dev
/null
$dblatex_options |
grep -v 'programlisting or screen'
108 { @DBLATEX@
2>&1 >&3 $dblatex_options |
grep -v 'programlisting or screen' >&2; } 3>&1
111 if test -n "@FOP@"; then
112 @XSLTPROC@
$path_arg --nonet --xinclude \
113 --stringparam gtkdoc.bookname
$module \
114 --stringparam gtkdoc.version
"@VERSION@" \
115 --stringparam chunk.quietly
$quiet \
116 --stringparam chunker.output.quiet
$quiet \
117 "$@" -o $module.fo
$gtkdocdir/gtk-doc-fo.xsl
$document || cleanexit $?
118 # fop dies too easily :(
119 # @FOP@ $module.fo $module.pdf
121 echo "dblatex or fop must be installed to use gtkdoc-mkpdf." >&2
126 # not very good output
127 # also for xxx-docs.sgml it will produce xxx-docs.pdf
128 docbook2pdf
-e no-valid
$document
131 echo "timestamp" > pdf.stamp