Print this page
make: ship the Joyent patch to enable parallel make (originally from rm)


 120  *
 121  *      Error message handling
 122  */
 123 
 124 /*
 125  *      fatal(format, args...)
 126  *
 127  *      Print a message and die
 128  *
 129  *      Parameters:
 130  *              format          printf type format string
 131  *              args            Arguments to match the format
 132  *
 133  *      Global variables used:
 134  *              fatal_in_progress Indicates if this is a recursive call
 135  *              parallel_process_cnt Do we need to wait for anything?
 136  *              report_pwd      Should we report the current path?
 137  */
 138 /*VARARGS*/
 139 void
 140 fatal(char * message, ...)
 141 {
 142         va_list args;
 143 
 144         va_start(args, message);
 145         (void) fflush(stdout);
 146 #ifdef DISTRIBUTED
 147         (void) fprintf(stderr, catgets(catd, 1, 262, "dmake: Fatal error: "));
 148 #else
 149         (void) fprintf(stderr, catgets(catd, 1, 263, "make: Fatal error: "));
 150 #endif
 151         (void) vfprintf(stderr, message, args);
 152         (void) fprintf(stderr, "\n");
 153         va_end(args);
 154         if (report_pwd) {
 155                 (void) fprintf(stderr,
 156                                catgets(catd, 1, 156, "Current working directory %s\n"),
 157                                get_current_path());
 158         }
 159         (void) fflush(stderr);
 160         if (fatal_in_progress) {




 120  *
 121  *      Error message handling
 122  */
 123 
 124 /*
 125  *      fatal(format, args...)
 126  *
 127  *      Print a message and die
 128  *
 129  *      Parameters:
 130  *              format          printf type format string
 131  *              args            Arguments to match the format
 132  *
 133  *      Global variables used:
 134  *              fatal_in_progress Indicates if this is a recursive call
 135  *              parallel_process_cnt Do we need to wait for anything?
 136  *              report_pwd      Should we report the current path?
 137  */
 138 /*VARARGS*/
 139 void
 140 fatal(const char *message, ...)
 141 {
 142         va_list args;
 143 
 144         va_start(args, message);
 145         (void) fflush(stdout);
 146 #ifdef DISTRIBUTED
 147         (void) fprintf(stderr, catgets(catd, 1, 262, "dmake: Fatal error: "));
 148 #else
 149         (void) fprintf(stderr, catgets(catd, 1, 263, "make: Fatal error: "));
 150 #endif
 151         (void) vfprintf(stderr, message, args);
 152         (void) fprintf(stderr, "\n");
 153         va_end(args);
 154         if (report_pwd) {
 155                 (void) fprintf(stderr,
 156                                catgets(catd, 1, 156, "Current working directory %s\n"),
 157                                get_current_path());
 158         }
 159         (void) fflush(stderr);
 160         if (fatal_in_progress) {