]> jfr.im git - irc/weechat/weechat.git/blob - autogen.sh
core: add CVE id in ChangeLog
[irc/weechat/weechat.git] / autogen.sh
1 #!/bin/sh
2 #
3 # Copyright (C) 2003-2020 Sébastien Helleu <flashcode@flashtux.org>
4 # Copyright (C) 2005 Julien Louis <ptitlouis@sysif.net>
5 # Copyright (C) 2005-2006 Emmanuel Bouthenot <kolter@openics.org>
6 #
7 # This file is part of WeeChat, the extensible chat client.
8 #
9 # WeeChat is free software; you can redistribute it and/or modify
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 #
14 # WeeChat is distributed in the hope that it will be useful,
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
20 # along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
21 #
22
23 ###
24 ### common stuff
25 ###
26
27 DIR=$(cd "$(dirname "$0")" || exit 1; pwd)
28 cd "$DIR" || exit 1
29
30 AUTOGEN_LOG=autogen.log
31
32 err ()
33 {
34 echo "-------"
35 echo "Error :"
36 echo "---8<-----------------------------------"
37 cat $AUTOGEN_LOG
38 echo "----------------------------------->8---"
39 exit 1
40 }
41
42 run ()
43 {
44 printf "Running \"%s\"..." "$@"
45 if eval "$@" >$AUTOGEN_LOG 2>&1 ; then
46 echo " OK"
47 else
48 echo " FAILED"
49 err
50 fi
51 }
52
53 # remove autotools stuff
54 run "rm -f config.h.in"
55 run "rm -f aclocal.m4 configure config.log config.status"
56 run "rm -rf autom4te*.cache"
57
58 # remove libtool stuff
59 run "rm -f libtool"
60
61 # remove gettext stuff
62 run "rm -f ABOUT-NLS"
63 run "rm -rf intl"
64
65 # execute autoreconf cmds
66 run "autoreconf -vi"
67
68 # ending
69 rm -f $AUTOGEN_LOG