Update sphinx
[awesomized/libmemcached] / bootstrap.sh
index 65cbbc2a5910d9bc2007c5e28f8b7ee5b87abd7a..6a93c970553b2509bb62d47cae14e27017517fdc 100755 (executable)
@@ -234,6 +234,8 @@ function set_VENDOR_RELEASE ()
         VENDOR_RELEASE="precise"
       elif [[ "x$VENDOR_RELEASE" == 'x12.10' ]]; then
         VENDOR_RELEASE="quantal"
+      elif [[ "x$VENDOR_RELEASE" == 'x13.04' ]]; then
+        VENDOR_RELEASE="raring"
       fi
       ;;
     opensuse)
@@ -445,7 +447,7 @@ function setup_gdb_command () {
 function setup_valgrind_command () {
   VALGRIND_PROGRAM=`type -p valgrind`
   if [[ -n "$VALGRIND_PROGRAM" ]]; then
-    VALGRIND_COMMAND="$VALGRIND_PROGRAM --error-exitcode=1 --leak-check=yes --show-reachable=yes --malloc-fill=A5 --free-fill=DE --xml=yes --xml-file=\"valgrind-%p.xml\""
+    VALGRIND_COMMAND="$VALGRIND_PROGRAM --error-exitcode=1 --leak-check=yes --malloc-fill=A5 --free-fill=DE --xml=yes --xml-file=\"valgrind-%p.xml\""
   fi
 }
 
@@ -577,6 +579,7 @@ function make_valgrind ()
     TESTS_ENVIRONMENT="$VALGRIND_COMMAND"
   fi
 
+  make_target 'all'
   make_target 'check'
   ret=$?
 
@@ -642,22 +645,13 @@ 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'
@@ -666,8 +660,6 @@ function make_for_snapshot ()
   # 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 ()
@@ -836,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
@@ -876,7 +868,13 @@ 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
+
+    if [ -n "$BOOTSTRAP_SNAPSHOT_CHECK" ]; then
+      assert_file "$BOOTSTRAP_SNAPSHOT_CHECK" 'snapshot check failed'
+    fi
   else
     # If we didn't require a snapshot, then we should not have a configure
     assert_no_file 'configure'
@@ -900,34 +898,7 @@ function make_for_continuus_integration ()
         make_rpm
       elif [[ -d rpm ]]; then
         make_rpm
-      else
-        make_distcheck
       fi
-
-      assert_exec_file 'configure'
-      assert_file 'Makefile'
-
-      make_install_system
-      ;;
-    *-precise-*)
-      run_configure
-
-      assert_exec_file 'configure'
-      assert_file 'Makefile'
-
-      make_target 'all'
-
-      make_distcheck
-
-      assert_exec_file 'configure'
-      assert_file 'Makefile'
-
-      make_valgrind
-
-      assert_exec_file 'configure'
-      assert_file 'Makefile'
-
-      make_install_system
       ;;
     *)
       make_jenkins_default
@@ -1745,7 +1716,7 @@ function main ()
       fi
 
       if [ -z "$MAKE_TARGET" ]; then
-        MAKE_TARGET='check'
+        MAKE_TARGET='jenkins'
       fi
     fi
   fi