source: trunk/third/gtk-doc/gtkdocize.in @ 20745

Revision 20745, 1.3 KB checked in by ghudson, 20 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r20744, which included commits to RCS files with non-trunk default branches.
Line 
1#!/bin/sh
2
3progname=`echo "$0" | sed 's%^.*/%%'`
4
5PROGRAM=gtkdocize
6PACKAGE=@PACKAGE@
7VERSION=@VERSION@
8
9prefix=@prefix@
10datadir=@datadir@
11
12# options
13docdir=.
14copy=no
15
16while test $# -gt 0; do
17  case "$1" in
18  --help)
19    echo "usage: $progname [ --copy ] [ --docdir DIR ]" 1>&2
20    exit 1 ;;
21  --version)
22    echo "$PROGRAM ($PACKAGE) $VERSION"
23    exit 0 ;;
24  --copy)
25    copy=yes
26    shift ;;
27  --docdir)
28    shift
29    docdir="$1"
30    shift ;;
31  -*)
32    echo "$progname: unrecognised option '$1'" 1>&2
33    echo "usage: $progname [ --copy ] [ --docdir DIR ]" 1>&2
34    exit 1 ;;
35  *)
36    echo "$progname: too many arguments" 1>&2
37    echo "usage: $progname [ --copy ] [ --docdir DIR ]" 1>&2
38    exit 1 ;;
39  esac
40done
41
42if test -f configure.ac; then
43  configure=configure.ac
44elif test -f configure.in; then
45  configure=configure.in
46else
47  echo "$progname: neither configure.ac nor configure.in exist" 1>&2
48  exit 1
49fi
50
51if grep '^GTK_DOC_CHECK' $configure >/dev/null 2>&1; then
52  :
53else
54  echo "$progname: GTK_DOC_CHECK not called in $configure" 1>&2
55  exit 1
56fi
57
58rm -f $docdir/gtk-doc.make
59if test "$copy" = yes; then
60  cp -f $datadir/gtk-doc/data/gtk-doc.make $docdir/ ||
61    exit 1
62else
63  ln -sf $datadir/gtk-doc/data/gtk-doc.make $docdir/ ||
64    cp -f $datadir/gtk-doc/data/gtk-doc.make $docdir/ ||
65    exit 1
66fi
Note: See TracBrowser for help on using the repository browser.