🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Chip Salzenberg Wed, 11 Oct 1989 15:56
GNU Make 3.56: Feature: command prefix
#492
Author: Chip Salzenberg
Date: Wed, 11 Oct 1989 15:56
85 lines
2357 bytes
[FEATURE]

Support a command prefix, printed before each command to be executed.
    As I've coded it, the default is "\t" unless -n flag specified.
    However, you may want to default it to "", the current behavior.

Index: make.h
***************
*** 151,154 ****
--- 146,150 ----
  
  extern char *program;
+ extern char *command_prefix;
  
  extern unsigned int makelevel;

Index: main.c
***************
*** 247,250 ****
--- 247,254 ----
  char *program;
  
+ /* The string to print before each command. */
+ 
+ char *command_prefix = "\t";
+ 
  /* Value of the MAKELEVEL variable at startup (or 0).  */
  
***************
*** 376,379 ****
--- 392,400 ----
      print_version ();
  
+   /* If we're just printing commands, then we omit the prefix. */
+ 
+   if (just_print_flag)
+     command_prefix = "";
+ 
    /* Construct the list of include directories to search.  */
  
Index: file.c
***************
*** 225,228 ****
--- 225,229 ----
  	      else if (!silent_flag && !just_print_flag)
  		{
+ 		  fputs (command_prefix, stdout);
  		  if (!doneany)
  		    {

Index: job.c
***************
*** 489,493 ****
  
    if (just_print_flag || (!noprint && !silent_flag))
!     puts (p);
  
    /* If -n was given, recurse to get the next line in the sequence.  */
--- 489,496 ----
  
    if (just_print_flag || (!noprint && !silent_flag))
!     {
!       fputs (command_prefix, stdout);
!       puts (p);
!     }
  
    /* If -n was given, recurse to get the next line in the sequence.  */

Index: remake.c
***************
*** 578,582 ****
    if (!silent_flag)
      {
!       printf ("touch %s\n", file->name);
        fflush (stdout);
      }
--- 578,585 ----
    if (!silent_flag)
      {
!       fputs (command_prefix, stdout);
!       fputs ("touch ", stdout);
!       fputs (file->name, stdout);
!       fputc ('\n', stdout);
        fflush (stdout);
      }
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