Print this page
make: prefix errors and such with the right command name

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/make/bin/misc.cc
          +++ new/usr/src/cmd/make/bin/misc.cc
↓ open down ↓ 128 lines elided ↑ open up ↑
 129  129   *              report_pwd      Should we report the current path?
 130  130   */
 131  131  /*VARARGS*/
 132  132  void
 133  133  fatal(const char *message, ...)
 134  134  {
 135  135          va_list args;
 136  136  
 137  137          va_start(args, message);
 138  138          (void) fflush(stdout);
 139      -        (void) fprintf(stderr, gettext("make: Fatal error: "));
      139 +        (void) fprintf(stderr, gettext("%s: Fatal error: "), getprogname());
 140  140          (void) vfprintf(stderr, message, args);
 141  141          (void) fprintf(stderr, "\n");
 142  142          va_end(args);
 143  143          if (report_pwd) {
 144  144                  (void) fprintf(stderr,
 145  145                                 gettext("Current working directory %s\n"),
 146  146                                 get_current_path());
 147  147          }
 148  148          (void) fflush(stderr);
 149  149          if (fatal_in_progress) {
↓ open down ↓ 36 lines elided ↑ open up ↑
 186  186   *              report_pwd      Should we report the current path?
 187  187   */
 188  188  /*VARARGS*/
 189  189  void
 190  190  warning(char * message, ...)
 191  191  {
 192  192          va_list args;
 193  193  
 194  194          va_start(args, message);
 195  195          (void) fflush(stdout);
 196      -        (void) fprintf(stderr, gettext("make: Warning: "));
      196 +        (void) fprintf(stderr, gettext("%s: Warning: "), getprogname());
 197  197          (void) vfprintf(stderr, message, args);
 198  198          (void) fprintf(stderr, "\n");
 199  199          va_end(args);
 200  200          if (report_pwd) {
 201  201                  (void) fprintf(stderr,
 202  202                                 gettext("Current working directory %s\n"),
 203  203                                 get_current_path());
 204  204          }
 205  205          (void) fflush(stderr);
 206  206  }
↓ open down ↓ 530 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX