mc/maint/utils/travis-build.sh
Yury V. Zaytsev 4d5c1b2ad8 maint: simplify dist extension stripping in Travis build script
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-03-05 12:22:27 +01:00

107 lines
2.3 KiB
Bash
Executable File

#!/bin/bash
#
# Midnight Commander - build and test common configurations
#
# Copyright (C) 2015
# The Free Software Foundation, Inc.
#
# Written by:
# Slava Zanko <slavazanko@gmail.com>, 2015
# Yury V. Zaytsev <yury@shurup.com>, 2015
#
# This file is part of the Midnight Commander.
#
# The Midnight Commander is free software: you can redistribute it
# and/or modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 3 of the License,
# or (at your option) any later version.
#
# The Midnight Commander is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
set -e
set -x
function do_build() {
make
make check || true
make install
}
# Build distribution archive
mkdir -p distrib && cd $_
../configure
make dist-bzip2
DISTFILE=$(ls mc-*.tar.bz2)
DISTDIR=$(basename "$DISTFILE" .tar.bz2)
tar -xjf $DISTFILE
cd $DISTDIR
# Build default configuration (S-Lang)
mkdir -p build-default && pushd $_
../configure \
--prefix="$(pwd)/INSTALL_ROOT" \
--with-screen=slang \
--enable-maintainer-mode \
--enable-mclib \
--enable-charset \
--enable-aspell \
--enable-tests \
--enable-werror
do_build
popd
# Build default configuration (ncurses)
mkdir -p build-ncurses && pushd $_
../configure \
--prefix="$(pwd)/INSTALL_ROOT" \
--with-screen=ncurses \
--enable-maintainer-mode \
--enable-mclib \
--enable-charset \
--enable-aspell \
--enable-tests \
--enable-werror
do_build
popd
# Build all disabled
mkdir -p build-all-disabled && pushd $_
../configure \
--prefix="$(pwd)/INSTALL_ROOT" \
--disable-maintainer-mode \
--disable-mclib \
--disable-charset \
--disable-aspell \
--disable-largefile \
--disable-nls \
--disable-vfs \
--disable-background \
--without-mmap \
--without-x \
--without-gpm-mouse \
--without-internal-edit \
--without-diff-viewer \
--without-subshell \
--enable-tests \
--enable-werror
do_build
popd