Changeset 591 for trunk/src


Ignore:
Timestamp:
Nov 24, 2006, 9:22:49 PM (19 years ago)
Author:
bird
Message:

Added --pretty-command-printing for simplifying makefile debugging.

Location:
trunk/src/gmake
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gmake/Makefile.kmk

    r586 r591  
    2828        CONFIG_NO_DEFAULT_VARIABLES \
    2929        CONFIG_WITH_EXTENDED_NOTPARALLEL \
    30     CONFIG_WITH_INCLUDEDEP \
     30        CONFIG_WITH_INCLUDEDEP \
    3131        CONFIG_WITH_TOUPPER_TOLOWER \
     32        CONFIG_PRETTY_COMMAND_PRINTING \
    3233        KMK \
    3334        \
  • trunk/src/gmake/job.c

    r535 r591  
    11341134     can log the working directory before the command's own error messages
    11351135     appear.  */
    1136 
    1137   message (0, (just_print_flag || (!(flags & COMMANDS_SILENT) && !silent_flag))
    1138            ? "%s" : (char *) 0, p);
     1136#ifdef CONFIG_PRETTY_COMMAND_PRINTING
     1137  if (   pretty_command_printing
     1138      && (just_print_flag || (!(flags & COMMANDS_SILENT) && !silent_flag))
     1139      && argv[0][0] != '\0')
     1140    {
     1141      unsigned i;
     1142      for (i = 0; argv[i]; i++)
     1143        message (0, "%s'%s'%s", i ? "\t" : "> ", argv[i], argv[i + 1] ? " \\" : "");
     1144    }
     1145  else
     1146#endif /* CONFIG_PRETTY_COMMAND_PRINTING */
     1147    message (0, (just_print_flag || (!(flags & COMMANDS_SILENT) && !silent_flag))
     1148             ? "%s" : (char *) 0, p);
    11391149
    11401150  /* Tell update_goal_chain that a command has been started on behalf of
  • trunk/src/gmake/main.c

    r578 r591  
    151151
    152152int just_print_flag;
     153
     154#ifdef CONFIG_PRETTY_COMMAND_PRINTING
     155/* Nonzero means to print commands argument for argument skipping blanks. */
     156
     157int pretty_command_printing;
     158#endif
    153159
    154160/* Print debugging info (--debug).  */
     
    413419    { 'p', flag, (char *) &print_data_base_flag, 1, 1, 0, 0, 0,
    414420      "print-data-base" },
     421#ifdef CONFIG_PRETTY_COMMAND_PRINTING
     422    { CHAR_MAX+6, flag, (char *) &pretty_command_printing, 1, 1, 1, 0, 0,
     423       "pretty-command-printing" },
     424#endif
    415425#ifdef KMK
    416426    { CHAR_MAX+5, positive_int, (char *) &process_priority, 1, 1, 0,
  • trunk/src/gmake/make.h

    r549 r591  
    513513extern int warn_undefined_variables_flag, posix_pedantic, not_parallel;
    514514extern int second_expansion, clock_skew_detected, rebuilding_makefiles;
     515#ifdef CONFIG_PRETTY_COMMAND_PRINTING
     516extern int pretty_command_printing;
     517#endif
    515518
    516519/* can we run commands via 'sh -c xxx' or must we use batch files? */
Note: See TracChangeset for help on using the changeset viewer.