5 Usage: gtkdoc-mkpdf [--path=SEARCH_PATH] [--imgdir=DIR] MODULE DRIVER_FILE [BACKEND_OPTIONS...]"
14 # parse options, ignore unknown options for future extensions
21 X--version
) echo "@VERSION@"; exit 0;;
22 X--help
) echo "$usage"; exit 0;;
23 X--uninstalled
) uninstalled
=yes; shift;;
24 X--path
=*) searchpath
=`echo $1 | sed s/.*=//`; shift;;
25 X--imgdir
=*) imgdirs
="$imgdirs -I `echo $1 | sed s/.*=//`"; shift;;
31 if test $# -lt 2; then
41 if test $uninstalled = yes; then
42 # this does not work from buiddir!=srcdir
44 # MAKE_SCRDIR=$(abs_srcdir) MAKE_BUILDDIR=$(abs_builddir) gtkdoc-mkpdf ...
45 gtkdocdir
=`dirname $0`
46 #echo "uninstalled, gtkdocdir=$gtkdocdir"
48 # the first two are needed to resolve datadir
50 datarootdir
=@datarootdir@
51 gtkdocdir
=@datadir@
/gtk-doc
/data
54 if head -n 1 $document |
grep "<?xml" > /dev
/null
; then
59 path_option
='--directory'
62 # we could do "$path_option $PWD "
63 # to avoid needing rewriting entities that are copied from the header
65 if test "X$searchpath" = "X"; then
68 path_arg
="$path_option $searchpath"
72 if test -n "@DBLATEX@"; then
73 # extra options to consider
75 # -V is useful for debugging
76 # -T db2latex : different style
77 # -d : keep transient files (for debugging)
78 # xsltproc is already called with --xinclude
79 # does not work: --xslt-opts "$path_arg --nonet $@"
80 #echo "calling: @DBLATEX@ -o $module.pdf $imgdirs $document"
81 @DBLATEX@
-o $module.pdf
$imgdirs $document
83 if test -n "@FOP@"; then
84 @XSLTPROC@
$path_arg --nonet --xinclude \
85 --stringparam gtkdoc.bookname
$module \
86 --stringparam gtkdoc.version
"@VERSION@" \
87 "$@" -o $module.fo
$gtkdocdir/gtk-doc-fo.xsl
$document || cleanexit $?
88 # fop dies too easily :(
89 # @FOP@ $module.fo $module.pdf
93 # not very good output
94 # also for xxx-docs.sgml it will produce xxx-docs.pdf
95 docbook2pdf
-e no-valid
$document
98 echo "timestamp" > pdf.stamp