3 progname
=`echo "$0" | sed 's%^.*/%%'`
10 datarootdir
=@datarootdir@
20 usage: $progname [ --copy ] [ --docdir DIR ] [ --flavour {legacy|no-tmpl} ]"
22 while test $# -gt 0; do
28 echo "$PROGRAM ($PACKAGE) $VERSION"
44 makefile
=gtk-doc.notmpl.
make
47 echo "$progname: invalid value for --flavour" 1>&2
53 echo "$progname: unrecognised option '$1'" 1>&2
57 echo "$progname: too many arguments" 1>&2
63 if test -f configure.ac
; then
64 configure
=configure.ac
65 elif test -f configure.
in; then
66 configure
=configure.
in
68 echo "$progname: neither configure.ac nor configure.in exist" 1>&2
72 if grep '^GTK_DOC_CHECK' $configure >/dev
/null
2>&1; then
75 echo "$progname: GTK_DOC_CHECK not called in $configure" 1>&2
79 # If the AC_CONFIG_MACRO_DIR() macro is used, copy gtk-doc.m4 from our
80 # prefix to that directory. This makes sure that the M4 macro used
81 # matches the the automake fragment.
82 # If AC_CONFIG_MACRO_DIR is not used, the macro won't be copied, and
83 # the correct flags must be passed to aclocal for it to find the macro.
84 m4dir
=`cat "$configure" | grep '^AC_CONFIG_MACRO_DIR' | sed -n -e 's/AC_CONFIG_MACRO_DIR(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q`
85 if test -n "$m4dir"; then
86 rm -f $m4dir/gtk-doc.
m4
87 if test "$copy" = yes; then
88 cp -f $datadir/aclocal
/gtk-doc.
m4 $m4dir/ ||
91 ln -sf $datadir/aclocal
/gtk-doc.
m4 $m4dir/ ||
92 cp -f $datadir/aclocal
/gtk-doc.
m4 $m4dir/ ||
97 rm -f $docdir/gtk-doc.
make
98 if test "$copy" = yes; then
99 cp -f $datadir/gtk-doc
/data
/$makefile $docdir/gtk-doc.
make ||
102 ln -sf $datadir/gtk-doc
/data
/$makefile $docdir/gtk-doc.
make ||
103 cp -f $datadir/gtk-doc
/data
/$makefile $docdir/gtk-doc.
make ||