]>
Commit | Line | Data |
---|---|---|
d2d14ffb | 1 | #!/bin/sh |
f1a39ce7 | 2 | # |
c44b79dc | 3 | # Copyright (C) 2003-2022 Sébastien Helleu <flashcode@flashtux.org> |
6562d676 SH |
4 | # Copyright (C) 2005 Julien Louis <ptitlouis@sysif.net> |
5 | # Copyright (C) 2005-2006 Emmanuel Bouthenot <kolter@openics.org> | |
f1a39ce7 | 6 | # |
6562d676 SH |
7 | # This file is part of WeeChat, the extensible chat client. |
8 | # | |
9 | # WeeChat is free software; you can redistribute it and/or modify | |
f1a39ce7 SH |
10 | # it under the terms of the GNU General Public License as published by |
11 | # the Free Software Foundation; either version 3 of the License, or | |
12 | # (at your option) any later version. | |
13 | # | |
6562d676 | 14 | # WeeChat is distributed in the hope that it will be useful, |
f1a39ce7 SH |
15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | # GNU General Public License for more details. | |
18 | # | |
19 | # You should have received a copy of the GNU General Public License | |
4712d0bb | 20 | # along with WeeChat. If not, see <https://www.gnu.org/licenses/>. |
f1a39ce7 | 21 | # |
dc836881 | 22 | |
9d96e3ad EB |
23 | ### |
24 | ### common stuff | |
25 | ### | |
9d96e3ad | 26 | |
45509c35 SH |
27 | DIR=$(cd "$(dirname "$0")" || exit 1; pwd) |
28 | cd "$DIR" || exit 1 | |
e5d62431 | 29 | |
9d96e3ad EB |
30 | AUTOGEN_LOG=autogen.log |
31 | ||
32 | err () | |
33 | { | |
34 | echo "-------" | |
35 | echo "Error :" | |
36 | echo "---8<-----------------------------------" | |
9d7cac23 | 37 | cat "$AUTOGEN_LOG" |
9d96e3ad EB |
38 | echo "----------------------------------->8---" |
39 | exit 1 | |
40 | } | |
41 | ||
42 | run () | |
43 | { | |
45509c35 | 44 | printf "Running \"%s\"..." "$@" |
9d7cac23 | 45 | if eval "$@" >"$AUTOGEN_LOG" 2>&1 ; then |
3c530122 | 46 | echo " OK" |
9d96e3ad | 47 | else |
3c530122 | 48 | echo " FAILED" |
eb56a98f | 49 | err |
9d96e3ad EB |
50 | fi |
51 | } | |
52 | ||
e13593dc | 53 | # remove autotools stuff |
9d96e3ad EB |
54 | run "rm -f config.h.in" |
55 | run "rm -f aclocal.m4 configure config.log config.status" | |
56 | run "rm -rf autom4te*.cache" | |
e13593dc | 57 | |
9d96e3ad EB |
58 | # remove libtool stuff |
59 | run "rm -f libtool" | |
e13593dc | 60 | |
9d96e3ad EB |
61 | # remove gettext stuff |
62 | run "rm -f ABOUT-NLS" | |
63 | run "rm -rf intl" | |
64 | ||
e13593dc | 65 | # execute autoreconf cmds |
ea4aad0b | 66 | run "autoreconf -vi" |
9d96e3ad EB |
67 | |
68 | # ending | |
9d7cac23 | 69 | rm -f "$AUTOGEN_LOG" |