Update to allow rpm to be legal jenkins target.
authorBrian Aker <brian@tangent.org>
Fri, 19 Oct 2012 07:32:14 +0000 (03:32 -0400)
committerBrian Aker <brian@tangent.org>
Fri, 19 Oct 2012 07:32:14 +0000 (03:32 -0400)
bootstrap.sh

index 1d114b28e53794c16ecfcfc8d8d9f3bc248ad9e4..40b2829989f5d8de55f7f64d1194c0828168a612 100755 (executable)
@@ -604,7 +604,7 @@ make_gdb ()
 
 # $1 target to compile
 # $2 to die, or not to die, based on contents
-function make_target ()
+make_target ()
 {
   if [[ -z "$1" ]]; then
     die "Programmer error, no target provided for make"
@@ -637,6 +637,7 @@ make_distcheck ()
 
 make_rpm ()
 {
+  run_configure_if_required
   make_target 'rpm'
 }
 
@@ -693,7 +694,7 @@ function run ()
     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
         ;;