X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=bootstrap.sh;h=606d63d660ad01574b207c4d6729ed203f87d08c;hb=820fcf318e11426bdb72345948c56738b5e12da4;hp=4bc2148a84f7ad57e5e78fc0905048c52e27f7d0;hpb=f439c23594f05b0119fa0847070d688238fd891c;p=m6w6%2Flibmemcached diff --git a/bootstrap.sh b/bootstrap.sh index 4bc2148a..606d63d6 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -579,6 +579,7 @@ function make_valgrind () TESTS_ENVIRONMENT="$VALGRIND_COMMAND" fi + make_target 'all' make_target 'check' ret=$? @@ -644,32 +645,21 @@ function make_darwin_malloc () MallocScribble=$old_MallocScribble } -function snapshot_check () -{ - if [ ! -f "$BOOTSTRAP_SNAPSHOT_CHECK" ]; then - make_for_snapshot - fi - - if [ -n "$BOOTSTRAP_SNAPSHOT_CHECK" ]; then - assert_file "$BOOTSTRAP_SNAPSHOT_CHECK" 'snapshot check failed' - fi -} - # This will reset our environment, and make sure built files are available. function make_for_snapshot () { - # Make sure it is clean - make_maintainer_clean + # Lets make sure we have a clean environment + assert_no_file 'Makefile' + assert_no_file 'configure' + assert_no_directory 'autom4te.cache' run_configure - make_target 'dist' + make_target 'all' make_target 'distclean' # We should have a configure, but no Makefile at the end of this exercise assert_no_file 'Makefile' assert_exec_file 'configure' - - snapshot_check } function check_mingw () @@ -838,7 +828,7 @@ function make_for_clang_analyzer () function check_for_jenkins () { if ! $jenkins_build_environment; then - echo "Not inside of jenkins" + echo "Not inside of jenkins, simulating environment" if [ -f 'configure' ]; then make_maintainer_clean @@ -867,6 +857,13 @@ function make_universe () make_install_system } +function check_snapshot () +{ + if [ -n "$BOOTSTRAP_SNAPSHOT_CHECK" ]; then + assert_file "$BOOTSTRAP_SNAPSHOT_CHECK" 'snapshot check failed' + fi +} + function make_for_continuus_integration () { # Setup the environment if we are local @@ -878,7 +875,11 @@ function make_for_continuus_integration () # Platforms which require bootstrap should have some setup done before we hit this stage. # If we are building locally, skip this step, unless we are just testing locally. if $BOOTSTRAP_SNAPSHOT; then - snapshot_check + if $BOOTSTRAP_SNAPSHOT; then + assert_file 'configure' + fi + + check_snapshot else # If we didn't require a snapshot, then we should not have a configure assert_no_file 'configure' @@ -895,41 +896,15 @@ function make_for_continuus_integration () assert_exec_file 'configure' assert_file 'Makefile' + make_target 'all' + # make rpm includes "make distcheck" if [[ -f rpm.am ]]; then - make_target 'all' make_rpm elif [[ -d rpm ]]; then - make_target 'all' make_rpm - else - make_distcheck fi ;; - *-precise-*) - run_configure - - assert_exec_file 'configure' - assert_file 'Makefile' - - make_distcheck - ;; - *-quantal-*) - run_configure - - assert_exec_file 'configure' - assert_file 'Makefile' - - make_distcheck - ;; - *-raring-*) - run_configure - - assert_exec_file 'configure' - assert_file 'Makefile' - - make_distcheck - ;; *) make_jenkins_default ;; @@ -1641,6 +1616,7 @@ function bootstrap () 'snapshot') make_for_snapshot snapshot_run=true + check_snapshot ;; 'rpm') make_rpm @@ -1738,10 +1714,10 @@ function main () # We don't want Jenkins overriding other variables, so we NULL them. if [ -z "$MAKE_TARGET" ]; then if $jenkins_build_environment; then - if [[ -n "$label" ]]; then - check_make_target $label + if [[ -n "$LABEL" ]]; then + check_make_target $LABEL if [ $? -eq 0 ]; then - MAKE_TARGET="$label" + MAKE_TARGET="$LABEL" fi fi