summaryrefslogtreecommitdiffstats
path: root/autogen.sh
blob: d5cec1b613eed1a044a4eb6f4de70cc1184f2bfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/sh

###############################################################################
#
# Author: Lasse Collin
#
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
###############################################################################

set -e -x

# The following six lines are almost identical to "autoreconf -fi" but faster.
${AUTOPOINT:-autopoint} -f
${LIBTOOLIZE:-libtoolize} -c -f || glibtoolize -c -f
${ACLOCAL:-aclocal} -I m4
${AUTOCONF:-autoconf}
${AUTOHEADER:-autoheader}
${AUTOMAKE:-automake} -acf --foreign

# Generate the translated man pages and the doxygen documentation if the
# "po4a" and "doxygen" tools are available.
# This is *NOT* done by "autoreconf -fi" or when "make" is run.
# Pass --no-po4a or --no-doxygen to this script to skip these steps.
# It can be useful when you know that po4a or doxygen aren't available and
# don't want autogen.sh to exit with non-zero exit status.
generate_po4a="y"
generate_doxygen="y"

for arg in "$@"
do
	case $arg in
		"--no-po4a")
			generate_po4a="n"
			;;

		"--no-doxygen")
			generate_doxygen="n"
			;;
	esac
done

if test "$generate_po4a" != "n"; then
	cd po4a
	sh update-po
	cd ..
fi

if test "$generate_doxygen" != "n"; then
	cd doxygen
	sh update-doxygen
	cd ..
fi

exit 0