Print this page
make: unifdef for TEAMWARE_MAKE_CMN (defined)


  30  *              getname
  31  *              Memory allocation
  32  *              String handling
  33  *              Property handling
  34  *              Error message handling
  35  *              Make internal state dumping
  36  *              main routine support
  37  */
  38 
  39 /*
  40  * Included files
  41  */
  42 #include <errno.h>
  43 #include <mk/defs.h>
  44 #include <mksh/macro.h>           /* SETVAR() */
  45 #include <mksh/misc.h>            /* enable_interrupt() */
  46 #include <stdarg.h>               /* va_list, va_start(), va_end() */
  47 #include <vroot/report.h> /* SUNPRO_DEPENDENCIES */
  48 
  49 
  50 #ifdef TEAMWARE_MAKE_CMN
  51 #define MAXJOBS_ADJUST_RFE4694000
  52 
  53 #ifdef MAXJOBS_ADJUST_RFE4694000
  54 extern void job_adjust_fini();
  55 #endif /* MAXJOBS_ADJUST_RFE4694000 */
  56 #endif /* TEAMWARE_MAKE_CMN */
  57 
  58 
  59 /*
  60  * Defined macros
  61  */
  62 
  63 /*
  64  * typedefs & structs
  65  */
  66 
  67 /*
  68  * Static variables
  69  */
  70 
  71 /*
  72  * File table of contents
  73  */
  74 static  void            print_rule(register Name target);
  75 static  void            print_target_n_deps(register Name target);
  76 


 141 {
 142         va_list args;
 143 
 144         va_start(args, message);
 145         (void) fflush(stdout);
 146         (void) fprintf(stderr, catgets(catd, 1, 263, "make: Fatal error: "));
 147         (void) vfprintf(stderr, message, args);
 148         (void) fprintf(stderr, "\n");
 149         va_end(args);
 150         if (report_pwd) {
 151                 (void) fprintf(stderr,
 152                                catgets(catd, 1, 156, "Current working directory %s\n"),
 153                                get_current_path());
 154         }
 155         (void) fflush(stderr);
 156         if (fatal_in_progress) {
 157                 exit_status = 1;
 158                 exit(1);
 159         }
 160         fatal_in_progress = true;
 161 #ifdef TEAMWARE_MAKE_CMN
 162         /* Let all parallel children finish */
 163         if ((dmake_mode_type == parallel_mode) &&
 164             (parallel_process_cnt > 0)) {
 165                 (void) fprintf(stderr,
 166                                catgets(catd, 1, 157, "Waiting for %d %s to finish\n"),
 167                                parallel_process_cnt,
 168                                parallel_process_cnt == 1 ?
 169                                catgets(catd, 1, 158, "job") : catgets(catd, 1, 159, "jobs"));
 170                 (void) fflush(stderr);
 171         }
 172 
 173         while (parallel_process_cnt > 0) {
 174                 await_parallel(true);
 175                 finish_children(false);
 176         }
 177 #endif
 178 
 179 #if defined (TEAMWARE_MAKE_CMN) && defined (MAXJOBS_ADJUST_RFE4694000)
 180         job_adjust_fini();
 181 #endif
 182 
 183         exit_status = 1;
 184         exit(1);
 185 }
 186 
 187 /*
 188  *      warning(format, args...)
 189  *
 190  *      Print a message and continue.
 191  *
 192  *      Parameters:
 193  *              format          printf type format string
 194  *              args            Arguments to match the format
 195  *
 196  *      Global variables used:
 197  *              report_pwd      Should we report the current path?




  30  *              getname
  31  *              Memory allocation
  32  *              String handling
  33  *              Property handling
  34  *              Error message handling
  35  *              Make internal state dumping
  36  *              main routine support
  37  */
  38 
  39 /*
  40  * Included files
  41  */
  42 #include <errno.h>
  43 #include <mk/defs.h>
  44 #include <mksh/macro.h>           /* SETVAR() */
  45 #include <mksh/misc.h>            /* enable_interrupt() */
  46 #include <stdarg.h>               /* va_list, va_start(), va_end() */
  47 #include <vroot/report.h> /* SUNPRO_DEPENDENCIES */
  48 
  49 

  50 #define MAXJOBS_ADJUST_RFE4694000
  51 
  52 #ifdef MAXJOBS_ADJUST_RFE4694000
  53 extern void job_adjust_fini();
  54 #endif /* MAXJOBS_ADJUST_RFE4694000 */

  55 
  56 
  57 /*
  58  * Defined macros
  59  */
  60 
  61 /*
  62  * typedefs & structs
  63  */
  64 
  65 /*
  66  * Static variables
  67  */
  68 
  69 /*
  70  * File table of contents
  71  */
  72 static  void            print_rule(register Name target);
  73 static  void            print_target_n_deps(register Name target);
  74 


 139 {
 140         va_list args;
 141 
 142         va_start(args, message);
 143         (void) fflush(stdout);
 144         (void) fprintf(stderr, catgets(catd, 1, 263, "make: Fatal error: "));
 145         (void) vfprintf(stderr, message, args);
 146         (void) fprintf(stderr, "\n");
 147         va_end(args);
 148         if (report_pwd) {
 149                 (void) fprintf(stderr,
 150                                catgets(catd, 1, 156, "Current working directory %s\n"),
 151                                get_current_path());
 152         }
 153         (void) fflush(stderr);
 154         if (fatal_in_progress) {
 155                 exit_status = 1;
 156                 exit(1);
 157         }
 158         fatal_in_progress = true;

 159         /* Let all parallel children finish */
 160         if ((dmake_mode_type == parallel_mode) &&
 161             (parallel_process_cnt > 0)) {
 162                 (void) fprintf(stderr,
 163                                catgets(catd, 1, 157, "Waiting for %d %s to finish\n"),
 164                                parallel_process_cnt,
 165                                parallel_process_cnt == 1 ?
 166                                catgets(catd, 1, 158, "job") : catgets(catd, 1, 159, "jobs"));
 167                 (void) fflush(stderr);
 168         }
 169 
 170         while (parallel_process_cnt > 0) {
 171                 await_parallel(true);
 172                 finish_children(false);
 173         }

 174 
 175 #if defined (TEAMWARE_MAKE_CMN) && defined (MAXJOBS_ADJUST_RFE4694000)
 176         job_adjust_fini();
 177 #endif
 178 
 179         exit_status = 1;
 180         exit(1);
 181 }
 182 
 183 /*
 184  *      warning(format, args...)
 185  *
 186  *      Print a message and continue.
 187  *
 188  *      Parameters:
 189  *              format          printf type format string
 190  *              args            Arguments to match the format
 191  *
 192  *      Global variables used:
 193  *              report_pwd      Should we report the current path?