-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathautogen.sh
More file actions
executable file
·74 lines (60 loc) · 2.45 KB
/
autogen.sh
File metadata and controls
executable file
·74 lines (60 loc) · 2.45 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
PKG_NAME="Gnumeric"
test -n "$srcdir" || srcdir=$(dirname "$0")
test -n "$srcdir" || srcdir=.
olddir=$(pwd)
(test -f $srcdir/configure.ac \
&& test -d $srcdir/src \
&& test -f $srcdir/src/gnumeric.h) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level gnumeric directory"
exit 1
}
cd $srcdir
aclocal --install || exit 1
glib-gettextize --force --copy || exit 1
gtkdocize --copy || exit 1
intltoolize --force --copy --automake || exit 1
autoreconf --verbose --force --install || exit 1
cd $olddir
# We have our own copy of Makefile.in.in generated October 2008.
# One of the reasons why we need a local copy is that
# we generate po-functions/Makefile.in.in from it, which is committed to
# SVN, so this file cannot depend on the versions of the tools which the
# developers have installed.
#
echo "Creating po/Makefile.in.in and po-functions/Makefile.in.in."
rm -f $srcdir/po/Makefile.in.in $srcdir/po-functions/Makefile.in.in
cp $srcdir/po/Makefile.in.in.own $srcdir/po/Makefile.in.in
sed '/^\(GETTEXT_PACKAGE\|subdir\) =/s/[ ]*$/-functions/
s|$(srcdir)/LINGUAS|$(top_srcdir)/po/LINGUAS|g
/^GETTEXT_PACKAGE =/a\
XGETTEXT_KEYWORDS = --keyword --keyword=F_
/^EXTRA_DISTFILES/s/ LINGUAS//
' $srcdir/po/Makefile.in.in >$srcdir/po-functions/Makefile.in.in
# Work around intltool bug
perl -pi -e 's/( \.intltool-merge-cache\b)/\1 .intltool-merge-cache.lock/ if /^\trm\b/;' $srcdir/po/Makefile.in.in
echo "Creating po-functions/POTFILES.{in,skip}."
rm -f $srcdir/po-functions/POTFILES.in $srcdir/po-functions/POTFILES.skip
# This regex matches names of XML files:
xml_file_name='^((schemas|templates)/.+|[^/]+)\.in$|\.(glade|xml)(\.in)?$'
( echo "# Generated by autogen.sh; do not edit."
grep -E -v "^#|$xml_file_name" $srcdir/po/POTFILES.in
) >$srcdir/po-functions/POTFILES.in
( echo "# Generated by autogen.sh; do not edit."
test -f $srcdir/po/POTFILES.skip && grep -v '^#' $srcdir/po/POTFILES.skip
grep -E "$xml_file_name" $srcdir/po/POTFILES.in
) >$srcdir/po-functions/POTFILES.skip
if grep '^YELP_HELP_INIT' $srcdir/configure >/dev/null; then
echo "It looks like yelp support is not available." 1>&2
exit 1
fi
if [ "$NOCONFIGURE" = "" ]; then
$srcdir/configure "$@" || exit 1
if [ "$1" = "--help" ]; then exit 0 else
echo "Now type 'make' to compile $PKG_NAME" || exit 1
fi
else
echo "Skipping configure process."
fi