Skip to contentSkip to conversation

engine.pl: Fix a recent breakage of the buildsystem generator

PATCH In review Ramsay Jones 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/4 engine.pl: Fix a recent breakage of the buildsystem generator

Commit ade2ca0c (Do not try to remove directories when removing old links, 27-10-2009) added an expression to a 'test' using an '-o' or connective. This resulted in the buildsystem generator mistaking a conditional 'rm' for a linker command. In order to fix the breakage, we filter out all 'test' commands before then attempting to identify the commands of interest.

---

Changes from v1, in response to comments from Pete Harlan and Sebastian Schuberth:

- remove second (useless) regex from condition in filter code
- remove the commented out version of the original filter code
- re-worded commit message to reflect the above changes

ATB,
Ramsay Jones

 contrib/buildsystems/engine.pl |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
contrib/buildsystems/engine.pl +5 -3
index d506717..8f890fb 100644
@@ -135,6 +135,11 @@ sub parseMakeOutput
             }
         } while($ate_next);
 
+        if ($text =~ /^test /) {
+            # options to test (eg -o) may be mistaken for linker options
+            next;
+        }
+
         if($text =~ / -c /) {
             # compilation
             handleCompileLine($text, $line);
@@ -180,9 +185,6 @@ sub parseMakeOutput
 #        } elsif ($text =~ /generate-cmdlist\.sh/) {
 #            # command for generating list of commands
 #
-#        } elsif ($text =~ /^test / && $text =~ /|| rm -f /) {
-#            # commands removing executables, if they exist
-#
 #        } elsif ($text =~ /new locations or Tcl/) {
 #            # command for detecting Tcl/Tk changes
 #
Signature · 1 line
1.6.6
Acked-by on v2 1/4
#1 lore raw
Quoted 8 lines · Ramsay Jones

Commit ade2ca0c (Do not try to remove directories when removing old links, 27-10-2009) added an expression to a 'test' using an '-o' or connective. This resulted in the buildsystem generator mistaking a conditional 'rm' for a linker command. In order to fix the breakage, we filter out all 'test' commands before then attempting to identify the commands of interest.

Quoted 8 lines

---

Changes from v1, in response to comments from Pete Harlan and Sebastian Schuberth:

- remove second (useless) regex from condition in filter code
- remove the commented out version of the original filter code
- re-worded commit message to reflect the above changes

Thanks again!

Signature · 1 line
Sebastian Schuberth