🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by J.T. Conklin Wed, 26 Aug 1992 07:15
Re: `canned' command sequences no longer work in gmake-3.62
#641
Author: J.T. Conklin
Date: Wed, 26 Aug 1992 07:15
75 lines
2433 bytes
Earlier today, I sent a bug report about `canned' command sequences
(defined with "define ... endef") not working with gmake-3.62.

I copied the code from gmake-3.60, into the appropriate place in
construct_command_line_internal() and everything works as before.

Patch follows:

*** ../make-3.62/job.c	Thu Oct 24 14:58:33 1991
--- job.c	Wed Aug 26 13:52:43 1992
***************
*** 586,593 ****
      /* Still executing the last line we started.  */
      recursive = child->file->cmds->lines_recurse[child->command_line - 1];

-   /* Find the end of this line.  Backslash-newlines don't mean the end.  */
-
    p = child->command_ptr;
    child->noerror = 0;
    while (*p != '\0')
--- 586,591 ----
***************
*** 1041,1046 ****
--- 1039,1045 ----
    register char *ap;
    char *end;
    int instring;
+   int backslash;
    char **new_argv = 0;

    /* See if it is safe to parse commands internally.  */
***************
*** 1165,1170 ****
--- 1164,1204 ----
        /* Free the old argument list we were working on.  */
        free (new_argv[0]);
        free (new_argv);
+     }
+
+   /* Find the end of this line.  Backslash-newlines don't mean the end. */
+   end = line;
+   while (*end != '\0')
+     {
+       p = index (end, '\n');
+       if (p == 0)
+ 	{
+ 	  end += strlen (end);
+ 	  break;
+ 	}
+
+       end = p;
+       backslash = 0;
+       while (*--p == '\\')
+ 	backslash = !backslash;
+
+       if (backslash)
+ 	{
+           ++end;
+           /* If there is a tab after a backslash-newline,
+              remove it, since it was most likely used to line
+              up the continued line with the previous one.  */
+           if (*end == '\t')
+             strcpy (end, end + 1);
+         }
+       else
+         break;
+     }
+
+   if (*end != '\0')
+     {
+       *end = '\0';
+       *restp = end;
      }

    if (shell == 0 || !strcmp (shell, default_shell))
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads