[Libreoffice-commits] .: 2 commits - dmake/dmake.h dmake/quit.c solenv/bin

Caolán McNamara caolan at kemper.freedesktop.org
Wed Jan 19 12:34:06 PST 2011


 dmake/dmake.h       |    3 ++-
 dmake/quit.c        |    6 ++++--
 solenv/bin/build.pl |    5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

New commits:
commit 430a49257e1db18171e457c734de5b412c6ffb02
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jan 19 20:33:49 2011 +0000

    use new differentiated dmake return value to decide if regenerate dependencies

diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl
index 47257c9..833edee 100755
--- a/solenv/bin/build.pl
+++ b/solenv/bin/build.pl
@@ -785,8 +785,9 @@ sub dmake_dir {
         $error_code = run_job($dmake, $job_name);
 
         #if dmake fails, have a go at regenerating the dependencies
-        #and try again
-        if ($error_code && ($ENV{nodep} eq '') && ($ENV{depend} eq '')) {
+        #and try again. dmakes normal failure is 255, while death on signal is 254
+        my $real_exit_code = $error_code >> 8;
+        if (($real_exit_code == 255) && ($ENV{nodep} eq '') && ($ENV{depend} eq '')) {
             print "Forcing regeneration of dependency info\n";
             $ENV{depend} = 't';
             run_job($dmake, $job_name);
commit 8c3028d5a3681a03b59e715b9aba3174ba1a8953
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jan 19 20:32:02 2011 +0000

    distinguish between failure exit due to dmake failure vs signal aborted

diff --git a/dmake/dmake.h b/dmake/dmake.h
index dbff847..53184d9 100644
--- a/dmake/dmake.h
+++ b/dmake/dmake.h
@@ -28,7 +28,8 @@
 
 #define MAX_INC_DEPTH     10     /* max of ten nested include files      */
 #define MAX_COND_DEPTH    20     /* max nesting level of conditionals    */
-#define ERROR_EXIT_VALUE  255    /* return code of aborted make          */
+#define ERROR_ABORT_VALUE 254    /* return code of aborted make          */
+#define ERROR_EXIT_VALUE  255    /* return code of failed  make          */
 #define CONTINUATION_CHAR '\\'   /* line continuation \<nl>              */
 #define DEF_ESCAPE_CHAR   '\\'   /* escape char for used chars           */
 #define ESCAPE_CHAR       *Escape_char
diff --git a/dmake/quit.c b/dmake/quit.c
index c3b3d57..1c9d8dd 100644
--- a/dmake/quit.c
+++ b/dmake/quit.c
@@ -37,6 +37,8 @@ Quit( sig )/*
 ======== Error or quit */
 int sig;
 {
+   int ret = ERROR_ABORT_VALUE;
+
    if( sig == SIGINT )
       fprintf(stderr, "Caught SIGINT. Trying to quit ...\n");
    else
@@ -48,7 +50,7 @@ int sig;
 #endif
    if( sig == 0 )
       /* Don't be verbose during regular program termination. */
-      ;
+      ret = ERROR_EXIT_VALUE;
    else
       fprintf(stderr, "Caught signal %d. Trying to quit ...\n", sig);
 
@@ -78,7 +80,7 @@ int sig;
    if( _quitting == 0 ) _handle_quit( ".ERROR" );
 
    Set_dir( Makedir );		/* No Error message if we can't do it */
-   Epilog( ERROR_EXIT_VALUE );
+   Epilog( ret );
 }
 
 


More information about the Libreoffice-commits mailing list