From: Stefano Lattarini Date: Fri, 25 May 2012 15:52:35 +0000 (+0200) Subject: [ng] check: fix incompatibility with Solaris nawk X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92d305960d83749239dae4579bfb46fb08ae6c23;p=thirdparty%2Fautomake.git [ng] check: fix incompatibility with Solaris nawk On Solaris 10, the parallel testsuite harness could fail with errors like this when /usr/bin/nawk was the selected awk program. nawk: next is illegal inside a function at source line 1 in \ function input_error; context is: function input_error(file) { ... close_current(); next; >>> } <<< * lib/am/parallel-tests.am (am__create_global_log): In the awk script defined by this function, avoid use of the 'next' directive inside a function. Signed-off-by: Stefano Lattarini --- diff --git a/lib/am/parallel-tests.am b/lib/am/parallel-tests.am index 0c3e9ff52..819b4e2c0 100644 --- a/lib/am/parallel-tests.am +++ b/lib/am/parallel-tests.am @@ -189,7 +189,6 @@ function input_error(file) \ { \ error("awk" ": cannot read \"" file "\""); \ close_current(); \ - next; \ } \ function rst_section(header) \ { \ @@ -209,7 +208,10 @@ BEGIN { exit_status = 0; } \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ - input_error($$0 ".trs"); \ + { \ + input_error($$0 ".trs"); \ + next; \ + } \ if (line ~ /$(am__global_test_result_rx)/) \ { \ sub("$(am__global_test_result_rx)", "", line); \ @@ -225,7 +227,10 @@ BEGIN { exit_status = 0; } \ while ((rc = (getline line < ($$0 ".log"))) != 0) \ { \ if (rc < 0) \ - input_error($$0 ".log"); \ + { \ + input_error($$0 ".log"); \ + next; \ + } \ print line; \ }; \ printf "\n"; \