3 progname
=`echo "$0" | sed 's%^.*/%%'`
10 datarootdir
=@datarootdir@
21 usage: $progname [ --copy ] [ --docdir DIR ] [ --flavour {legacy|no-tmpl} ]"
23 while test $# -gt 0; do
29 echo "$PROGRAM ($PACKAGE) $VERSION"
39 docdir
=`expr "X$1" : '[^=]*=\(.*\)'`
46 flavour
=`expr "X$1" : '[^=]*=\(.*\)'`
49 echo "$progname: unrecognised option '$1'" 1>&2
53 echo "$progname: too many arguments" 1>&2
63 makefile
=gtk-doc.notmpl.
make
66 echo "$progname: invalid value for --flavour" 1>&2
71 if test -f configure.ac
; then
72 configure
=configure.ac
73 elif test -f configure.
in; then
74 configure
=configure.
in
76 echo "$progname: neither configure.ac nor configure.in exist" 1>&2
80 if grep '^GTK_DOC_CHECK' $configure >/dev
/null
2>&1; then
83 echo "$progname: GTK_DOC_CHECK not called in $configure" 1>&2
87 # If the AC_CONFIG_MACRO_DIR() macro is used, copy gtk-doc.m4 from our
88 # prefix to that directory. This makes sure that the M4 macro used
89 # matches the the automake fragment.
90 # If AC_CONFIG_MACRO_DIR is not used, the macro won't be copied, and
91 # the correct flags must be passed to aclocal for it to find the macro.
92 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`
93 if test -n "$m4dir"; then
94 rm -f $m4dir/gtk-doc.
m4
95 if test "$copy" = yes; then
96 cp -f $datadir/aclocal
/gtk-doc.
m4 $m4dir/ ||
99 ln -sf $datadir/aclocal
/gtk-doc.
m4 $m4dir/ ||
100 cp -f $datadir/aclocal
/gtk-doc.
m4 $m4dir/ ||
105 rm -f $docdir/gtk-doc.
make
106 if test "$copy" = yes; then
107 cp -f $datadir/gtk-doc
/data
/$makefile $docdir/gtk-doc.
make ||
110 ln -sf $datadir/gtk-doc
/data
/$makefile $docdir/gtk-doc.
make ||
111 cp -f $datadir/gtk-doc
/data
/$makefile $docdir/gtk-doc.
make ||