Merge lp:~tangent-org/libmemcached/1.0-build Build: jenkins-Libmemcached-1.0-87
[awesomized/libmemcached] / bootstrap.sh
index c46f1eaf524ad0c517f19e7109c8290a9b2a3551..40b2829989f5d8de55f7f64d1194c0828168a612 100755 (executable)
@@ -637,6 +637,7 @@ make_distcheck ()
 
 make_rpm ()
 {
+  run_configure_if_required
   make_target 'rpm'
 }
 
@@ -687,13 +688,13 @@ run_autoreconf ()
   eval 'bash -n configure' || die "autoreconf generated a malformed configure"
 }
 
-run ()
+function run ()
 {
   if $VERBOSE; then
     echo "\`$@' $ARGS"
   fi
 
-  ($@ $ARGS)
+  eval $@ $ARGS
 } 
 
 parse_command_line_options ()
@@ -769,10 +770,14 @@ autoreconf_setup ()
   if [[ -z "$MAKE" ]]; then 
     if command_exists gmake; then
       MAKE=`type -p gmake`
+    else
+      if command_exists make; then
+        MAKE=`type -p make`
+      fi
     fi
-
-    if command_exists make; then
-      MAKE=`type -p make`
+    
+    if $DEBUG; then
+      MAKE="$MAKE --warn-undefined-variables"
     fi
   fi
 
@@ -954,6 +959,8 @@ check_make_target()
       ;;
     'configure')
       ;;
+    'rpm')
+      ;;
     'snapshot')
       ;;
     'valgrind')
@@ -1036,6 +1043,9 @@ bootstrap ()
       'snapshot')
         make_for_snapshot
         ;;
+      'rpm')
+        make_rpm
+        ;;
       'valgrind')
         make_valgrind
         ;;