X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=bootstrap.sh;h=d822e592a33963d39b25515592c52191bfe7dc97;hb=cc0fa630757d5942387b2c38209718dbaba11f4a;hp=00aed45aef2cb9c41157bdff096b005172cd9190;hpb=15f7739ec4b6991e1cb31bf8d227f79073b1b7ae;p=awesomized%2Flibmemcached diff --git a/bootstrap.sh b/bootstrap.sh index 00aed45a..d822e592 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -49,7 +49,7 @@ command_not_found_handle () exit 127 } -die () +function die () { echo "$BASH_SOURCE:$BASH_LINENO: $@" >&2 exit 1; @@ -492,6 +492,26 @@ function make_for_snapshot () snapshot_check } +function make_for_mingw32 () +{ + # Make sure it is clean + if [ -f Makefile -o -f configure ]; then + make_maintainer_clean + fi + assert_no_file 'Makefile' + + if command_exists mingw32-configure; then + run_autoreconf + + mingw32-configure || die 'mingw32-configure failed' + assert_file 'Makefile' + + if command_exists mingw32-make; then + mingw32-make || die 'mingw32-make failed' + fi + fi +} + # If we are locally testing, we should make sure the environment is setup correctly function check_for_jenkins () { @@ -508,6 +528,17 @@ function check_for_jenkins () fi } +function make_universe () +{ + make_for_snapshot + make_valgrind + make_gdb + make_rpm + make_for_mingw32 + make_distcheck + make_install_system +} + function make_for_continuus_integration () { # Setup the environment if we are local @@ -641,7 +672,7 @@ function make_target () run_configure fi - if test -n "$TESTS_ENVIRONMENT" -a $VERBOSE; then + if [ -n "$TESTS_ENVIRONMENT" -a $VERBOSE ]; then echo "TESTS_ENVIRONMENT=$TESTS_ENVIRONMENT" fi @@ -663,8 +694,10 @@ function make_distcheck () function make_rpm () { - run_configure_if_required - make_target 'rpm' + if [ -f 'rpm.am' -o -d 'rpm' ]; then + run_configure_if_required + make_target 'rpm' + fi } function make_maintainer_clean () @@ -817,8 +850,14 @@ autoreconf_setup () fi fi + if [ "$VCS_CHECKOUT" ]; then + if $DEBUG; then + MAKE="$MAKE --warn-undefined-variables" + fi + fi + if $DEBUG; then - MAKE="$MAKE --warn-undefined-variables" + MAKE="$MAKE -d" fi fi @@ -830,6 +869,10 @@ autoreconf_setup () GNU_BUILD_FLAGS="$GNU_BUILD_FLAGS --verbose" fi + if [ -z "$ACLOCAL_PATH" ]; then + ACLOCAL_PATH="/usr/local/share/aclocal $ACLOCAL_PATH" + fi + if [[ -z "$WARNINGS" ]]; then if [[ -n "$VCS_CHECKOUT" ]]; then WARNINGS="all,error" @@ -1008,6 +1051,10 @@ check_make_target() ;; 'snapshot') ;; + 'mingw') + ;; + 'universe') + ;; 'valgrind') ;; 'jenkins') @@ -1101,6 +1148,9 @@ function bootstrap () make run_configure ;; + 'mingw') + make_for_mingw32 + ;; 'snapshot') make_for_snapshot ;; @@ -1110,6 +1160,9 @@ function bootstrap () 'valgrind') make_valgrind ;; + 'universe') + make_universe + ;; 'jenkins') make_for_continuus_integration ;;