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


1483         case 't':                        /* Touch flag */
1484                 if (invert_this) {
1485                         touch = false;
1486                 } else {
1487                         touch = true;
1488                 }
1489                 return 0;
1490         case 'u':                        /* Unconditional flag */
1491                 if (invert_this) {
1492                         build_unconditional = false;
1493                 } else {
1494                         build_unconditional = true;
1495                 }
1496                 return 0;
1497         case 'V':                       /* SVR4 mode */
1498                 svr4 = true;
1499                 return 0;
1500         case 'v':                       /* Version flag */
1501                 if (invert_this) {
1502                 } else {
1503                         fprintf(stdout, "dmake: %s\n", verstring);
1504                         exit_status = 0;
1505                         exit(0);
1506                 }
1507                 return 0;
1508         case 'w':                        /* Unconditional flag */
1509                 if (invert_this) {
1510                         report_cwd = false;
1511                 } else {
1512                         report_cwd = true;
1513                 }
1514                 return 0;
1515 #if 0
1516         case 'X':                       /* Filter stdout */
1517                 if (invert_this) {
1518                         filter_stderr = false;
1519                 } else {
1520                         filter_stderr = true;
1521                 }
1522                 return 0;
1523 #endif


3170         int     make_level_val = 0;
3171 
3172         make_level_str = getenv("MAKELEVEL");
3173         if(make_level_str) {
3174                 make_level_val = atoi(make_level_str);
3175         }
3176         if(mlev == NULL) {
3177                 mlev = (char*) malloc(MAXPATHLEN);
3178         }
3179         if(entering) {
3180                 sprintf(mlev, "MAKELEVEL=%d", make_level_val + 1);
3181         } else {
3182                 make_level_val--;
3183                 sprintf(mlev, "MAKELEVEL=%d", make_level_val);
3184         }
3185         putenv(mlev);
3186 
3187         if(report_cwd) {
3188                 if(make_level_val <= 0) {
3189                         if(entering) {
3190                                 sprintf( rcwd
3191                                        , gettext("dmake: Entering directory `%s'\n")
3192                                        , get_current_path());
3193                         } else {
3194                                 sprintf( rcwd
3195                                        , gettext("dmake: Leaving directory `%s'\n")
3196                                        , get_current_path());


3197                         }
3198                 } else {
3199                         if(entering) {
3200                                 sprintf( rcwd
3201                                        , gettext("dmake[%d]: Entering directory `%s'\n")
3202                                        , make_level_val, get_current_path());
3203                         } else {
3204                                 sprintf( rcwd
3205                                        , gettext("dmake[%d]: Leaving directory `%s'\n")
3206                                        , make_level_val, get_current_path());


3207                         }
3208                 }
3209                 printf("%s", rcwd);
3210         }
3211 }


1483         case 't':                        /* Touch flag */
1484                 if (invert_this) {
1485                         touch = false;
1486                 } else {
1487                         touch = true;
1488                 }
1489                 return 0;
1490         case 'u':                        /* Unconditional flag */
1491                 if (invert_this) {
1492                         build_unconditional = false;
1493                 } else {
1494                         build_unconditional = true;
1495                 }
1496                 return 0;
1497         case 'V':                       /* SVR4 mode */
1498                 svr4 = true;
1499                 return 0;
1500         case 'v':                       /* Version flag */
1501                 if (invert_this) {
1502                 } else {
1503                         fprintf(stdout, "%s: %s\n", getprogname(), verstring);
1504                         exit_status = 0;
1505                         exit(0);
1506                 }
1507                 return 0;
1508         case 'w':                        /* Unconditional flag */
1509                 if (invert_this) {
1510                         report_cwd = false;
1511                 } else {
1512                         report_cwd = true;
1513                 }
1514                 return 0;
1515 #if 0
1516         case 'X':                       /* Filter stdout */
1517                 if (invert_this) {
1518                         filter_stderr = false;
1519                 } else {
1520                         filter_stderr = true;
1521                 }
1522                 return 0;
1523 #endif


3170         int     make_level_val = 0;
3171 
3172         make_level_str = getenv("MAKELEVEL");
3173         if(make_level_str) {
3174                 make_level_val = atoi(make_level_str);
3175         }
3176         if(mlev == NULL) {
3177                 mlev = (char*) malloc(MAXPATHLEN);
3178         }
3179         if(entering) {
3180                 sprintf(mlev, "MAKELEVEL=%d", make_level_val + 1);
3181         } else {
3182                 make_level_val--;
3183                 sprintf(mlev, "MAKELEVEL=%d", make_level_val);
3184         }
3185         putenv(mlev);
3186 
3187         if(report_cwd) {
3188                 if(make_level_val <= 0) {
3189                         if(entering) {
3190                                 sprintf(rcwd,
3191                                     gettext("%s: Entering directory `%s'\n"),
3192                                     getprogname(),
3193                                     get_current_path());
3194                         } else {
3195                                 sprintf(rcwd,
3196                                     gettext("%s: Leaving directory `%s'\n"),
3197                                     getprogname(),
3198                                     get_current_path());
3199                         }
3200                 } else {
3201                         if(entering) {
3202                                 sprintf(rcwd,
3203                                     gettext("%s[%d]: Entering directory `%s'\n"),
3204                                     getprogname(),
3205                                     make_level_val, get_current_path());
3206                         } else {
3207                                 sprintf(rcwd,
3208                                     gettext("%s[%d]: Leaving directory `%s'\n"),
3209                                     getprogname(),
3210                                     make_level_val, get_current_path());
3211                         }
3212                 }
3213                 printf("%s", rcwd);
3214         }
3215 }