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/main.cc
          +++ new/usr/src/cmd/make/bin/main.cc
↓ open down ↓ 1492 lines elided ↑ open up ↑
1493 1493                  } else {
1494 1494                          build_unconditional = true;
1495 1495                  }
1496 1496                  return 0;
1497 1497          case 'V':                       /* SVR4 mode */
1498 1498                  svr4 = true;
1499 1499                  return 0;
1500 1500          case 'v':                       /* Version flag */
1501 1501                  if (invert_this) {
1502 1502                  } else {
1503      -                        fprintf(stdout, "dmake: %s\n", verstring);
     1503 +                        fprintf(stdout, "%s: %s\n", getprogname(), verstring);
1504 1504                          exit_status = 0;
1505 1505                          exit(0);
1506 1506                  }
1507 1507                  return 0;
1508 1508          case 'w':                        /* Unconditional flag */
1509 1509                  if (invert_this) {
1510 1510                          report_cwd = false;
1511 1511                  } else {
1512 1512                          report_cwd = true;
1513 1513                  }
↓ open down ↓ 1666 lines elided ↑ open up ↑
3180 3180                  sprintf(mlev, "MAKELEVEL=%d", make_level_val + 1);
3181 3181          } else {
3182 3182                  make_level_val--;
3183 3183                  sprintf(mlev, "MAKELEVEL=%d", make_level_val);
3184 3184          }
3185 3185          putenv(mlev);
3186 3186  
3187 3187          if(report_cwd) {
3188 3188                  if(make_level_val <= 0) {
3189 3189                          if(entering) {
3190      -                                sprintf( rcwd
3191      -                                       , gettext("dmake: Entering directory `%s'\n")
3192      -                                       , get_current_path());
     3190 +                                sprintf(rcwd,
     3191 +                                    gettext("%s: Entering directory `%s'\n"),
     3192 +                                    getprogname(),
     3193 +                                    get_current_path());
3193 3194                          } else {
3194      -                                sprintf( rcwd
3195      -                                       , gettext("dmake: Leaving directory `%s'\n")
3196      -                                       , get_current_path());
     3195 +                                sprintf(rcwd,
     3196 +                                    gettext("%s: Leaving directory `%s'\n"),
     3197 +                                    getprogname(),
     3198 +                                    get_current_path());
3197 3199                          }
3198 3200                  } else {
3199 3201                          if(entering) {
3200      -                                sprintf( rcwd
3201      -                                       , gettext("dmake[%d]: Entering directory `%s'\n")
3202      -                                       , make_level_val, get_current_path());
     3202 +                                sprintf(rcwd,
     3203 +                                    gettext("%s[%d]: Entering directory `%s'\n"),
     3204 +                                    getprogname(),
     3205 +                                    make_level_val, get_current_path());
3203 3206                          } else {
3204      -                                sprintf( rcwd
3205      -                                       , gettext("dmake[%d]: Leaving directory `%s'\n")
3206      -                                       , make_level_val, get_current_path());
     3207 +                                sprintf(rcwd,
     3208 +                                    gettext("%s[%d]: Leaving directory `%s'\n"),
     3209 +                                    getprogname(),
     3210 +                                    make_level_val, get_current_path());
3207 3211                          }
3208 3212                  }
3209 3213                  printf("%s", rcwd);
3210 3214          }
3211 3215  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX