summaryrefslogtreecommitdiff
path: root/autogen.sh
blob: cfe40717ff4ea65331468777e88b6fe6f15b5c20 (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
#!/bin/sh -e

if [ "$1" == "--gettext-only" ]; then
        sh autoclean.sh
        for i in lib/libalpm/po src/pacman/po
        do
                cd $i
                mv Makevars Makevars.tmp
                package=`pwd|sed 's|.*/\(.*\)/.*|\1|'`
                intltool-update --pot --gettext-package=$package
                for j in *.po
                do
                        if msgmerge $j $package.pot -o $j.new; then
                                mv -f $j.new $j
                                echo -n "$i/$j"
                                msgfmt -c --statistics -o $j.gmo $j
                                rm -f $j.gmo
                        else
                                echo "msgmerge for $j failed!"
                                rm -f $j.new
                        fi
                done
                mv Makevars.tmp Makevars
                cd - >/dev/null
        done
        cd doc
        po4a -k 0 po4a.cfg
        cd po
        for i in *po
        do
                if msgmerge $i $package.pot -o $i.new; then
                        mv -f $i.new $i
                        echo -n "man/$i"
                        msgfmt -c --statistics -o $i.gmo $i
                        rm -f $i.gmo
                else
                        echo "msgmerge for $i failed!"
                        rm -f $i.new
                fi
        done
        exit 0
fi

libtoolize -f -c
aclocal --force
autoheader -f
autoconf -f
automake -a -c --gnu --foreign
cp -f $(dirname $(which automake))/../share/automake-*/mkinstalldirs ./
cp -f $(dirname $(which automake))/../share/gettext/config.rpath ./