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


 119  *
 120  *      Print a message and die
 121  *
 122  *      Parameters:
 123  *              format          printf type format string
 124  *              args            Arguments to match the format
 125  *
 126  *      Global variables used:
 127  *              fatal_in_progress Indicates if this is a recursive call
 128  *              parallel_process_cnt Do we need to wait for anything?
 129  *              report_pwd      Should we report the current path?
 130  */
 131 /*VARARGS*/
 132 void
 133 fatal(const char *message, ...)
 134 {
 135         va_list args;
 136 
 137         va_start(args, message);
 138         (void) fflush(stdout);
 139         (void) fprintf(stderr, gettext("make: Fatal error: "));
 140         (void) vfprintf(stderr, message, args);
 141         (void) fprintf(stderr, "\n");
 142         va_end(args);
 143         if (report_pwd) {
 144                 (void) fprintf(stderr,
 145                                gettext("Current working directory %s\n"),
 146                                get_current_path());
 147         }
 148         (void) fflush(stderr);
 149         if (fatal_in_progress) {
 150                 exit_status = 1;
 151                 exit(1);
 152         }
 153         fatal_in_progress = true;
 154         /* Let all parallel children finish */
 155         if ((dmake_mode_type == parallel_mode) &&
 156             (parallel_process_cnt > 0)) {
 157                 (void) fprintf(stderr,
 158                                gettext("Waiting for %d %s to finish\n"),
 159                                parallel_process_cnt,


 176 /*
 177  *      warning(format, args...)
 178  *
 179  *      Print a message and continue.
 180  *
 181  *      Parameters:
 182  *              format          printf type format string
 183  *              args            Arguments to match the format
 184  *
 185  *      Global variables used:
 186  *              report_pwd      Should we report the current path?
 187  */
 188 /*VARARGS*/
 189 void
 190 warning(char * message, ...)
 191 {
 192         va_list args;
 193 
 194         va_start(args, message);
 195         (void) fflush(stdout);
 196         (void) fprintf(stderr, gettext("make: Warning: "));
 197         (void) vfprintf(stderr, message, args);
 198         (void) fprintf(stderr, "\n");
 199         va_end(args);
 200         if (report_pwd) {
 201                 (void) fprintf(stderr,
 202                                gettext("Current working directory %s\n"),
 203                                get_current_path());
 204         }
 205         (void) fflush(stderr);
 206 }
 207 
 208 /*
 209  *      time_to_string(time)
 210  *
 211  *      Take a numeric time value and produce
 212  *      a proper string representation.
 213  *
 214  *      Return value:
 215  *                              The string representation of the time
 216  *




 119  *
 120  *      Print a message and die
 121  *
 122  *      Parameters:
 123  *              format          printf type format string
 124  *              args            Arguments to match the format
 125  *
 126  *      Global variables used:
 127  *              fatal_in_progress Indicates if this is a recursive call
 128  *              parallel_process_cnt Do we need to wait for anything?
 129  *              report_pwd      Should we report the current path?
 130  */
 131 /*VARARGS*/
 132 void
 133 fatal(const char *message, ...)
 134 {
 135         va_list args;
 136 
 137         va_start(args, message);
 138         (void) fflush(stdout);
 139         (void) fprintf(stderr, gettext("%s: Fatal error: "), getprogname());
 140         (void) vfprintf(stderr, message, args);
 141         (void) fprintf(stderr, "\n");
 142         va_end(args);
 143         if (report_pwd) {
 144                 (void) fprintf(stderr,
 145                                gettext("Current working directory %s\n"),
 146                                get_current_path());
 147         }
 148         (void) fflush(stderr);
 149         if (fatal_in_progress) {
 150                 exit_status = 1;
 151                 exit(1);
 152         }
 153         fatal_in_progress = true;
 154         /* Let all parallel children finish */
 155         if ((dmake_mode_type == parallel_mode) &&
 156             (parallel_process_cnt > 0)) {
 157                 (void) fprintf(stderr,
 158                                gettext("Waiting for %d %s to finish\n"),
 159                                parallel_process_cnt,


 176 /*
 177  *      warning(format, args...)
 178  *
 179  *      Print a message and continue.
 180  *
 181  *      Parameters:
 182  *              format          printf type format string
 183  *              args            Arguments to match the format
 184  *
 185  *      Global variables used:
 186  *              report_pwd      Should we report the current path?
 187  */
 188 /*VARARGS*/
 189 void
 190 warning(char * message, ...)
 191 {
 192         va_list args;
 193 
 194         va_start(args, message);
 195         (void) fflush(stdout);
 196         (void) fprintf(stderr, gettext("%s: Warning: "), getprogname());
 197         (void) vfprintf(stderr, message, args);
 198         (void) fprintf(stderr, "\n");
 199         va_end(args);
 200         if (report_pwd) {
 201                 (void) fprintf(stderr,
 202                                gettext("Current working directory %s\n"),
 203                                get_current_path());
 204         }
 205         (void) fflush(stderr);
 206 }
 207 
 208 /*
 209  *      time_to_string(time)
 210  *
 211  *      Take a numeric time value and produce
 212  *      a proper string representation.
 213  *
 214  *      Return value:
 215  *                              The string representation of the time
 216  *