3 progname
=`echo "$0" | sed 's%^.*/%%'`
10 datarootdir
=@datarootdir@
17 while test $# -gt 0; do
20 echo "usage: $progname [ --copy ] [ --docdir DIR ]" 1>&2
23 echo "$PROGRAM ($PACKAGE) $VERSION"
33 echo "$progname: unrecognised option '$1'" 1>&2
34 echo "usage: $progname [ --copy ] [ --docdir DIR ]" 1>&2
37 echo "$progname: too many arguments" 1>&2
38 echo "usage: $progname [ --copy ] [ --docdir DIR ]" 1>&2
43 if test -f configure.ac
; then
44 configure
=configure.ac
45 elif test -f configure.
in; then
46 configure
=configure.
in
48 echo "$progname: neither configure.ac nor configure.in exist" 1>&2
52 if grep '^GTK_DOC_CHECK' $configure >/dev
/null
2>&1; then
55 echo "$progname: GTK_DOC_CHECK not called in $configure" 1>&2
59 # If the AC_CONFIG_MACRO_DIR() macro is used, copy gtk-doc.m4 from our
60 # prefix to that directory. This makes sure that the M4 macro used
61 # matches the the automake fragment.
62 # If AC_CONFIG_MACRO_DIR is not used, the macro won't be copied, and
63 # the correct flags must be passed to aclocal for it to find the macro.
64 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`
65 if test -n "$m4dir"; then
66 rm -f $m4dir/gtk-doc.
m4
67 if test "$copy" = yes; then
68 cp -f $datadir/aclocal
/gtk-doc.
m4 $m4dir/ ||
71 ln -sf $datadir/aclocal
/gtk-doc.
m4 $m4dir/ ||
72 cp -f $datadir/aclocal
/gtk-doc.
m4 $m4dir/ ||
77 rm -f $docdir/gtk-doc.
make
78 if test "$copy" = yes; then
79 cp -f $datadir/gtk-doc
/data
/gtk-doc.
make $docdir/ ||
82 ln -sf $datadir/gtk-doc
/data
/gtk-doc.
make $docdir/ ||
83 cp -f $datadir/gtk-doc
/data
/gtk-doc.
make $docdir/ ||