[Libreoffice-commits] buildbot.git: tb/tb_internals.sh tb/tb_phases.sh

Norbert Thiebaud nthiebaud at gmail.com
Wed Jan 14 06:04:31 PST 2015


 tb/tb_internals.sh |    9 +++++++++
 tb/tb_phases.sh    |    8 ++++----
 2 files changed, 13 insertions(+), 4 deletions(-)

New commits:
commit 186e577630b649999fc20f8a856b1dfa1f118684
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Wed Jan 14 08:03:56 2015 -0600

    detect Make 4.0 and use -O on make invocation if it is the case

diff --git a/tb/tb_internals.sh b/tb/tb_internals.sh
index 028e99a..11aef67 100644
--- a/tb/tb_internals.sh
+++ b/tb/tb_internals.sh
@@ -201,6 +201,10 @@ determine_make()
     if [ -n "$MAKE" ] ; then
         $MAKE --version 2> /dev/null | grep -q GNU
         if test $? -eq 0;  then
+            $MAKE --version 2> /dev/null | grep -q GNU | grep -q '4\.'
+            if test $? -eq 0; then
+                tb_MAKE_EXTRA_OPT="-O"
+            fi
             return
         else
             MAKE=
@@ -216,6 +220,11 @@ determine_make()
     done
     if [ -z "$MAKE" ] ; then
         die "Could not find a Gnu Make"
+    else
+        $MAKE --version 2> /dev/null | grep -q GNU | grep -q '4\.'
+        if test $? -eq 0; then
+            tb_MAKE_EXTRA_OPT="-O"
+        fi
     fi
 }
 
diff --git a/tb/tb_phases.sh b/tb/tb_phases.sh
index 20e4409..e224ad5 100644
--- a/tb/tb_phases.sh
+++ b/tb/tb_phases.sh
@@ -71,7 +71,7 @@ pre_clean()
 canonical_do_clean()
 {
     if [ "${R}" = "0" ] ; then
-        if ! ${TB_NICE} ${TB_WATCHDOG} ${MAKE?} MAKE_RESTARTS=1 -sr clean > "tb_${P?}_clean.log" 2>&1 ; then
+        if ! ${TB_NICE} ${TB_WATCHDOG} ${MAKE?} MAKE_RESTARTS=1 -sr $tb_MAKE_EXTRA_OPT clean > "tb_${P?}_clean.log" 2>&1 ; then
             tb_REPORT_LOG="tb_${P?}_clean.log"
             tb_REPORT_MSGS="cleaning up failed - error is:"
             R=1
@@ -97,7 +97,7 @@ local optdir=""
     if [ "${R}" = "0" ] ; then
         # we for MAKE_RESTARTS=1 because 1/ we know thta Makefile is up to date
         # and 2/ the 'restart' mechanism in make is messed-up by the fact that we trap SIGINT
-        if ! ${TB_NICE} ${TB_WATCHDOG} ${MAKE?} MAKE_RESTARTS=1  -sr > "tb_${P?}_build.log" 2>&1 ; then
+        if ! ${TB_NICE} ${TB_WATCHDOG} ${MAKE?} MAKE_RESTARTS=1  -sr $tb_MAKE_EXTRA_OPT > "tb_${P?}_build.log" 2>&1 ; then
             tb_REPORT_LOG="tb_${P?}_build.log"
             tb_REPORT_MSGS="build failed - error is:"
             [ $V ] && echo "make failed :"
@@ -106,7 +106,7 @@ local optdir=""
         else
             # if we want to populate bibisect we need to 'install'
             if [ "${TB_TYPE?}" = "tb" -a ${TB_BIBISECT} != "0" ] ; then
-                if ! ${TB_NICE} ${TB_WATCHDOG}  ${MAKE?} MAKE_RESTARTS=1 -sr install-tb >>"tb_${P?}_build.log" 2>&1 ; then
+                if ! ${TB_NICE} ${TB_WATCHDOG}  ${MAKE?} MAKE_RESTARTS=1 -sr $tb_MAKE_EXTRA_OPT install-tb >>"tb_${P?}_build.log" 2>&1 ; then
                     tb_REPORT_LOG="tb_${P}_build.log"
                     tb_REPORT_MSGS="build failed - error is:"
                     R=1
@@ -153,7 +153,7 @@ canonical_do_test()
 {
     if [ "${R}" = "0" ] ; then
         if [ "${TB_DO_TESTS}" = "1" ] ; then
-            if ! ${TB_NICE} ${TB_WATCHDOG}  ${MAKE?} MAKE_RESTARTS=1 -sr check > "tb_${P?}_tests.log" 2>&1 ; then
+            if ! ${TB_NICE} ${TB_WATCHDOG}  ${MAKE?} MAKE_RESTARTS=1 -sr $tb_MAKE_EXTRA_OPT check > "tb_${P?}_tests.log" 2>&1 ; then
                 tb_REPORT_LOG="tb_${P?}_tests.log"
                 tb_REPORT_MSGS="check failed - error is:"
                 R=1


More information about the Libreoffice-commits mailing list