Print this page
make: unifdef for SGE (undefined)


 491          * Find the dmake_mode: distributed, parallel, or serial.
 492          */
 493     if ((!pmake_cap_r_specified) &&
 494         (!pmake_machinesfile_specified)) {
 495         MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_MODE"));
 496         dmake_name2 = GETNAME(wcs_buffer, FIND_LENGTH);
 497         prop2 = get_prop(dmake_name2->prop, macro_prop);
 498         if (prop2 == NULL) {
 499                 /* DMAKE_MODE not defined, default to distributed mode */
 500                 dmake_mode_type = distributed_mode;
 501                 no_parallel = false;
 502         } else {
 503                 dmake_value2 = prop2->body.macro.value;
 504                 if ((dmake_value2 == NULL) ||
 505                     (IS_EQUAL(dmake_value2->string_mb, NOCATGETS("distributed")))) {
 506                         dmake_mode_type = distributed_mode;
 507                         no_parallel = false;
 508                 } else if (IS_EQUAL(dmake_value2->string_mb, NOCATGETS("parallel"))) {
 509                         dmake_mode_type = parallel_mode;
 510                         no_parallel = false;
 511 #ifdef SGE_SUPPORT
 512                         grid = false;
 513                 } else if (IS_EQUAL(dmake_value2->string_mb, NOCATGETS("grid"))) {
 514                         dmake_mode_type = parallel_mode;
 515                         no_parallel = false;
 516                         grid = true;
 517 #endif
 518                 } else if (IS_EQUAL(dmake_value2->string_mb, NOCATGETS("serial"))) {
 519                         dmake_mode_type = serial_mode;
 520                         no_parallel = true;
 521                 } else {
 522                         fatal(catgets(catd, 1, 307, "Unknown dmake mode argument `%s' after -m flag"), dmake_value2->string_mb);
 523                 }
 524         }
 525 
 526         if ((!list_all_targets) &&
 527             (report_dependencies_level == 0)) {
 528                 /*
 529                  * Check to see if either DMAKE_RCFILE or DMAKE_MODE is defined.
 530                  * They could be defined in the env, in the makefile, or on the
 531                  * command line.
 532                  * If neither is defined, and $(HOME)/.dmakerc does not exists,
 533                  * then print a message, and default to parallel mode.
 534                  */
 535 #ifdef DISTRIBUTED
 536                 MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_RCFILE"));
 537                 dmake_name = GETNAME(wcs_buffer, FIND_LENGTH);


1072                                                "\n*** %s ",
1073                                                rp->target->string_mb);
1074                                 if (rp->target->stat.is_dir) {
1075                                         (void) fprintf(stderr,
1076                                                        catgets(catd, 1, 171, "not removed.\n"),
1077                                                        rp->target->string_mb);
1078                                 } else if (unlink(rp->target->string_mb) == 0) {
1079                                         (void) fprintf(stderr,
1080                                                        catgets(catd, 1, 172, "removed.\n"),
1081                                                        rp->target->string_mb);
1082                                 } else {
1083                                         (void) fprintf(stderr,
1084                                                        catgets(catd, 1, 173, "could not be removed: %s.\n"),
1085                                                        rp->target->string_mb,
1086                                                        errmsg(errno));
1087                                 }
1088                         }
1089                 }
1090         }
1091 
1092 #ifdef SGE_SUPPORT
1093         /* Remove SGE script file */
1094         if (grid) {
1095                 unlink(script_file);
1096         }
1097 #endif
1098 
1099         /* Have we locked .make.state or .nse_depinfo? */
1100         if ((make_state_lockfile != NULL) && (make_state_locked)) {
1101                 unlink(make_state_lockfile);
1102                 make_state_lockfile = NULL;
1103                 make_state_locked = false;
1104         }
1105         /*
1106          * Re-read .make.state file (it might be changed by recursive make)
1107          */
1108         check_state(NULL);
1109 
1110         report_dir_enter_leave(false);
1111 
1112         exit_status = 2;
1113         exit(2);
1114 }
1115 
1116 /*
1117  *      doalarm(sig, ...)




 491          * Find the dmake_mode: distributed, parallel, or serial.
 492          */
 493     if ((!pmake_cap_r_specified) &&
 494         (!pmake_machinesfile_specified)) {
 495         MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_MODE"));
 496         dmake_name2 = GETNAME(wcs_buffer, FIND_LENGTH);
 497         prop2 = get_prop(dmake_name2->prop, macro_prop);
 498         if (prop2 == NULL) {
 499                 /* DMAKE_MODE not defined, default to distributed mode */
 500                 dmake_mode_type = distributed_mode;
 501                 no_parallel = false;
 502         } else {
 503                 dmake_value2 = prop2->body.macro.value;
 504                 if ((dmake_value2 == NULL) ||
 505                     (IS_EQUAL(dmake_value2->string_mb, NOCATGETS("distributed")))) {
 506                         dmake_mode_type = distributed_mode;
 507                         no_parallel = false;
 508                 } else if (IS_EQUAL(dmake_value2->string_mb, NOCATGETS("parallel"))) {
 509                         dmake_mode_type = parallel_mode;
 510                         no_parallel = false;







 511                 } else if (IS_EQUAL(dmake_value2->string_mb, NOCATGETS("serial"))) {
 512                         dmake_mode_type = serial_mode;
 513                         no_parallel = true;
 514                 } else {
 515                         fatal(catgets(catd, 1, 307, "Unknown dmake mode argument `%s' after -m flag"), dmake_value2->string_mb);
 516                 }
 517         }
 518 
 519         if ((!list_all_targets) &&
 520             (report_dependencies_level == 0)) {
 521                 /*
 522                  * Check to see if either DMAKE_RCFILE or DMAKE_MODE is defined.
 523                  * They could be defined in the env, in the makefile, or on the
 524                  * command line.
 525                  * If neither is defined, and $(HOME)/.dmakerc does not exists,
 526                  * then print a message, and default to parallel mode.
 527                  */
 528 #ifdef DISTRIBUTED
 529                 MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_RCFILE"));
 530                 dmake_name = GETNAME(wcs_buffer, FIND_LENGTH);


1065                                                "\n*** %s ",
1066                                                rp->target->string_mb);
1067                                 if (rp->target->stat.is_dir) {
1068                                         (void) fprintf(stderr,
1069                                                        catgets(catd, 1, 171, "not removed.\n"),
1070                                                        rp->target->string_mb);
1071                                 } else if (unlink(rp->target->string_mb) == 0) {
1072                                         (void) fprintf(stderr,
1073                                                        catgets(catd, 1, 172, "removed.\n"),
1074                                                        rp->target->string_mb);
1075                                 } else {
1076                                         (void) fprintf(stderr,
1077                                                        catgets(catd, 1, 173, "could not be removed: %s.\n"),
1078                                                        rp->target->string_mb,
1079                                                        errmsg(errno));
1080                                 }
1081                         }
1082                 }
1083         }
1084 






1085 
1086         /* Have we locked .make.state or .nse_depinfo? */
1087         if ((make_state_lockfile != NULL) && (make_state_locked)) {
1088                 unlink(make_state_lockfile);
1089                 make_state_lockfile = NULL;
1090                 make_state_locked = false;
1091         }
1092         /*
1093          * Re-read .make.state file (it might be changed by recursive make)
1094          */
1095         check_state(NULL);
1096 
1097         report_dir_enter_leave(false);
1098 
1099         exit_status = 2;
1100         exit(2);
1101 }
1102 
1103 /*
1104  *      doalarm(sig, ...)