5 Usage: gtkdoc-mkpdf [--path=SEARCH_PATH] MODULE DRIVER_FILE [BACKEND_OPTIONS...]"
9 # parse options, ignore unknown options for future extensions
15 X--version
) echo "@VERSION@"; exit 0;;
16 X--help
) echo "$usage"; exit 0;;
17 X--uninstalled
) uninstalled
=yes; shift;;
18 X--path
=*) searchpath
=`echo $1 | sed s/.*=//`; shift;;
24 if test $# -lt 2; then
34 if test $uninstalled = yes; then
35 # this does not work from buiddir!=srcdir
37 # MAKE_SCRDIR=$(abs_srcdir) MAKE_BUILDDIR=$(abs_builddir) gtkdoc-mkpdf ...
38 gtkdocdir
=`dirname $0`
39 #echo "uninstalled, gtkdocdir=$gtkdocdir"
41 # the first two are needed to resolve datadir
43 datarootdir
=@datarootdir@
44 gtkdocdir
=@datadir@
/gtk-doc
/data
47 if head -n 1 $document |
grep "<?xml" > /dev
/null
; then
52 path_option
='--directory'
55 # we could do "$path_option $PWD "
56 # to avoid needing rewriting entities that are copied from the header
58 if test "X$searchpath" = "X"; then
61 path_arg
="$path_option $searchpath"
65 @XSLTPROC@
$path_arg --nonet --xinclude \
66 --stringparam gtkdoc.bookname
$module \
67 --stringparam gtkdoc.version
"@VERSION@" \
68 "$@" -o $module.fo
$gtkdocdir/gtk-doc-fo.xsl
$document ||
exit $?
69 # fop dies too easily :(
70 # @FOP@ $module.fo $module.pdf
73 # not very good output
74 # also for xxx-docs.sgml it will produce xxx-docs.pdf
75 docbook2pdf
-e no-valid
$document
78 echo "timestamp" > pdf.stamp