Appended is a temporary fix for the multiline problem.
diff --git a/job.c b/job.c
index e4a40ac..da6a877 100644
--- a/job.c
+++ b/job.c
@@ -1214,6 +1214,25 @@ start_job_command (struct child *child)
     char *end = 0;
 #ifdef VMS
     argv = p;
+    /* Multiline fix.
+       This (quick) fix is incompatible with the definition of ECHO as
+       'write sys$$output "', defined in default.c. In my opinion that was
+       a hack, anyway, and supporting multilines breaks it: obviously, the hack
+       relied on VMS/DCL to tolerate a missing, matching '"' at the end of the
+       line and now with multilines and ECHO the end of the line is within a string! */
+    {
+        char *s = p;
+        int instring=0;
+        while (*s) {
+            if (*s=='"')
+                instring = !instring;
+            else if (*s=='\n' && !instring) {
+                end=s;
+                break;
+            }
+            ++s;
+        }
+    }
 #else
     argv = construct_command_argv (p, &end, child->file,
                                    child->file->cmds->lines_flags[child->command_line - 1],
_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to