travis-build.sh 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. #!/bin/bash
  2. #
  3. # Midnight Commander - build and test common configurations
  4. #
  5. # Copyright (C) 2015
  6. # The Free Software Foundation, Inc.
  7. #
  8. # Written by:
  9. # Slava Zanko <slavazanko@gmail.com>, 2015
  10. # Yury V. Zaytsev <yury@shurup.com>, 2015
  11. #
  12. # This file is part of the Midnight Commander.
  13. #
  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.
  18. #
  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.
  23. #
  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/>.
  26. set -e
  27. set -x
  28. function do_build() {
  29. make
  30. make -k check || true
  31. make install
  32. }
  33. # Build distribution archive
  34. mkdir -p distrib && cd $_
  35. ../configure
  36. make dist-bzip2
  37. DISTFILE=$(ls mc-*.tar.bz2)
  38. DISTDIR=$(basename "$DISTFILE" .tar.bz2)
  39. tar -xjf $DISTFILE
  40. cd $DISTDIR
  41. # Build default configuration (S-Lang)
  42. mkdir -p build-default && pushd $_
  43. ../configure \
  44. --prefix="$(pwd)/INSTALL_ROOT" \
  45. --with-screen=slang \
  46. --enable-maintainer-mode \
  47. --enable-mclib \
  48. --enable-charset \
  49. --enable-aspell \
  50. --enable-tests \
  51. --enable-werror
  52. do_build
  53. popd
  54. # Build default configuration (ncurses)
  55. mkdir -p build-ncurses && pushd $_
  56. ../configure \
  57. --prefix="$(pwd)/INSTALL_ROOT" \
  58. --with-screen=ncurses \
  59. --enable-maintainer-mode \
  60. --enable-mclib \
  61. --enable-charset \
  62. --enable-aspell \
  63. --enable-tests \
  64. --enable-werror
  65. do_build
  66. popd
  67. # Build all disabled
  68. mkdir -p build-all-disabled && pushd $_
  69. ../configure \
  70. --prefix="$(pwd)/INSTALL_ROOT" \
  71. --disable-maintainer-mode \
  72. --disable-mclib \
  73. --disable-charset \
  74. --disable-aspell \
  75. --disable-largefile \
  76. --disable-nls \
  77. --disable-vfs \
  78. --disable-background \
  79. --without-mmap \
  80. --without-x \
  81. --without-gpm-mouse \
  82. --without-internal-edit \
  83. --without-diff-viewer \
  84. --without-subshell \
  85. --enable-tests \
  86. --enable-werror
  87. do_build
  88. popd