5 Usage: gtkdoc-mkman [--path=SEARCH_PATH] MODULE DRIVER_FILE"
7 # parse options, ignore unknown options for future extensions
13 X--version
) echo "@VERSION@"; exit 0;;
14 X--help
) echo "$usage"; exit 0;;
15 X--uninstalled
) uninstalled
=yes; shift;;
16 X--path
=*) searchpath
=`echo $1 | sed s/.*=//`; shift;;
22 if test $# -ne 2; then
32 if test $uninstalled = yes; then
33 # this does not work from buiddir!=srcdir
34 gtkdocdir
=`dirname $0`
35 #echo "uninstalled, gtkdocdir=$gtkdocdir"
37 # the first two are needed to resolve datadir
39 datarootdir
=@datarootdir@
40 gtkdocdir
=@datadir@
/gtk-doc
/data
43 if head -n 1 $document |
grep "<?xml" > /dev
/null
; then
48 path_option
='--directory'
51 # we could do "$path_option $PWD "
52 # to avoid needing rewriting entities that are copied from the header
54 if test "X$searchpath" = "X"; then
57 path_arg
="$path_option $searchpath"
60 # would it make sens to create man pages only for certain refentries
63 # see http://bugzilla.gnome.org/show_bug.cgi?id=467488
64 @XSLTPROC@
$path_arg --nonet --xinclude \
65 --stringparam gtkdoc.bookname
$module \
66 --stringparam gtkdoc.version
"@VERSION@" \
67 manpages
/docbook.xsl
$document ||
exit $?
69 for i
in `cd sgml;ls *.sgml`; do
70 j
=`echo $i | sed 's/.sgml/.man/'`
71 echo ": converting " $i $j
72 docbook-to-man sgml
/$i > man
/$j 2> man
/$j.log