~ubuntu-branches/ubuntu/utopic/gtk-doc/utopic

« back to all changes in this revision

Viewing changes to gtkdocize.in

  • Committer: Package Import Robot
  • Author(s): Jackson Doak
  • Date: 2014-02-19 10:06:14 UTC
  • mfrom: (1.2.16) (4.1.14 sid)
  • Revision ID: package-import@ubuntu.com-20140219100614-6nl7giysk333qsi5
Tags: 1.20-1ubuntu1
* Merge from debian. Remaining changes:
  - debian/control.in: Drop optional highlight dependency, which is in
    universe.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
datadir=@datadir@
12
12
 
13
13
# options
14
 
docdir=.
15
14
copy=no
16
15
makefile=gtk-doc.make
17
16
flavour=legacy
18
17
 
19
18
# mini help
20
19
usage="\
21
 
usage: $progname [ --copy ] [ --docdir DIR ] [ --flavour {legacy|legacy-flat|no-tmpl|no-tmpl-flat} ]"
 
20
usage: $progname [ --copy ] [ --docdir DIR ] [ --flavour {legacy|legacy-flat|no-tmpl|no-tmpl-flat} ] [ --srcdir DIR ]"
 
21
 
 
22
# Find the srcdir early (and ignore a srcdir set in configure).
 
23
# https://bugzilla.gnome.org/show_bug.cgi?id=707426
 
24
args="$*"
 
25
while test $# -gt 0; do
 
26
  case "$1" in
 
27
  --srcdir)
 
28
    shift
 
29
    srcdir="$1"
 
30
    shift ;;
 
31
  --srcdir=*)
 
32
    srcdir=`expr "X$1" : '[^=]*=\(.*\)'`
 
33
    shift ;;
 
34
  *)
 
35
    shift ;;
 
36
  esac
 
37
done
 
38
set - $args
 
39
 
 
40
# assume working directory if srcdir is not set
 
41
test "$srcdir" || srcdir=.
 
42
test "$docdir" || docdir="$srcdir"
22
43
 
23
44
# detect configure script
24
45
no_configure_found=0
25
 
if test -f configure.ac; then
26
 
  configure=configure.ac
27
 
elif test -f configure.in; then
28
 
  configure=configure.in
 
46
if test -f "$srcdir"/configure.ac; then
 
47
  configure="$srcdir"/configure.ac
 
48
elif test -f "$srcdir"/configure.in; then
 
49
  configure="$srcdir"/configure.in
29
50
else
30
51
  no_configure_found=1
31
52
fi
75
96
  --flavour=*)
76
97
    flavour=`expr "X$1" : '[^=]*=\(.*\)'`
77
98
    shift ;;
 
99
  --srcdir)
 
100
    shift
 
101
    # srcdir was set earlier.
 
102
    shift ;;
 
103
  --srcdir=*)
 
104
    # srcdir was set earlier.
 
105
    shift ;;
78
106
  -*)
79
107
    echo "$progname: unrecognised option '$1'" 1>&2
80
108
    echo "$usage" 1>&2
118
146
# matches the the automake fragment.
119
147
# If AC_CONFIG_MACRO_DIR is not used, the macro won't be copied, and
120
148
# the correct flags must be passed to aclocal for it to find the macro.
121
 
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`
 
149
m4dir="$srcdir/`cat "$configure" | grep '^AC_CONFIG_MACRO_DIR' | sed -n -e 's/AC_CONFIG_MACRO_DIR(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q`"
122
150
if test -n "$m4dir"; then
123
151
  rm -f $m4dir/gtk-doc.m4
124
152
  if test "$copy" = yes; then