Merge branch '3698_etags_codejump'
[midnight-commander.git] / maint / utils / travis-build.sh
blob58f1ba04383faa9b1facc82943e72069226ba881
1 #!/bin/bash
3 # Midnight Commander - build and test common configurations
5 # Copyright (C) 2015
6 # The Free Software Foundation, Inc.
8 # Written by:
9 # Slava Zanko <slavazanko@gmail.com>, 2015
10 # Yury V. Zaytsev <yury@shurup.com>, 2015
12 # This file is part of the Midnight Commander.
14 # The Midnight Commander is free software: you can redistribute it
15 # and/or modify it under the terms of the GNU General Public License as
16 # published by the Free Software Foundation, either version 3 of the License,
17 # or (at your option) any later version.
19 # The Midnight Commander is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU General Public License for more details.
24 # You should have received a copy of the GNU General Public License
25 # along with this program. If not, see <http://www.gnu.org/licenses/>.
27 set -e
28 set -x
30 function do_build() {
31 make
32 make check || true
33 make install
36 # Build distribution archive
37 mkdir -p distrib && cd $_
39 ../configure
40 make dist-bzip2
42 DISTFILE=$(ls mc-*.tar.bz2)
43 DISTDIR=$(basename "$DISTFILE" .tar.bz2)
45 tar -xjf $DISTFILE
46 cd $DISTDIR
48 # Build default configuration (S-Lang)
49 mkdir -p build-default && pushd $_
51 ../configure \
52 --prefix="$(pwd)/INSTALL_ROOT" \
53 --with-screen=slang \
54 --enable-maintainer-mode \
55 --enable-mclib \
56 --enable-charset \
57 --enable-aspell \
58 --enable-tests \
59 --enable-werror
61 do_build
63 popd
65 # Build default configuration (ncurses)
66 mkdir -p build-ncurses && pushd $_
68 ../configure \
69 --prefix="$(pwd)/INSTALL_ROOT" \
70 --with-screen=ncurses \
71 --enable-maintainer-mode \
72 --enable-mclib \
73 --enable-charset \
74 --enable-aspell \
75 --enable-tests \
76 --enable-werror
78 do_build
80 popd
82 # Build all disabled
83 mkdir -p build-all-disabled && pushd $_
85 ../configure \
86 --prefix="$(pwd)/INSTALL_ROOT" \
87 --disable-maintainer-mode \
88 --disable-mclib \
89 --disable-charset \
90 --disable-aspell \
91 --disable-largefile \
92 --disable-nls \
93 --disable-vfs \
94 --disable-background \
95 --without-mmap \
96 --without-x \
97 --without-gpm-mouse \
98 --without-internal-edit \
99 --without-diff-viewer \
100 --without-subshell \
101 --enable-tests \
102 --enable-werror
104 do_build
106 popd