Print this page
make: unifdef for TEAMWARE_MAKE_CMN (defined)

*** 65,81 **** // From read2.cc extern Name normalize_name(register wchar_t *name_string, register int length); // From parallel.cc - #if defined(TEAMWARE_MAKE_CMN) #define MAXJOBS_ADJUST_RFE4694000 #ifdef MAXJOBS_ADJUST_RFE4694000 extern void job_adjust_fini(); #endif /* MAXJOBS_ADJUST_RFE4694000 */ - #endif /* TEAMWARE_MAKE_CMN */ /* * Defined macros */ --- 65,79 ----
*** 119,145 **** #ifdef DMAKE_STATISTICS static Boolean getname_stat = false; #endif - #if defined(TEAMWARE_MAKE_CMN) static time_t start_time; static int g_argc; static char **g_argv; - #endif /* * File table of contents */ extern "C" void cleanup_after_exit(void); - #ifdef TEAMWARE_MAKE_CMN extern "C" { extern void dmake_exit_callback(void); extern void dmake_message_callback(char *); } - #endif extern Name normalize_name(register wchar_t *name_string, register int length); extern int main(int, char * []); --- 117,139 ----
*** 158,170 **** static void setup_makeflags_argv(void); static void report_dir_enter_leave(Boolean entering); extern void expand_value(Name, register String , Boolean); ! #ifdef TEAMWARE_MAKE_CMN ! static const char verstring[] = "illumos make"; ! #endif jmp_buf jmpbuffer; extern nl_catd catd; /* --- 152,162 ---- static void setup_makeflags_argv(void); static void report_dir_enter_leave(Boolean entering); extern void expand_value(Name, register String , Boolean); ! static const char verstring[] = "illumos make"; jmp_buf jmpbuffer; extern nl_catd catd; /*
*** 202,220 **** Boolean parallel_flag = false; char *prognameptr; char *slash_ptr; mode_t um; int i; - #ifdef TEAMWARE_MAKE_CMN struct itimerval value; char def_dmakerc_path[MAXPATHLEN]; Name dmake_name, dmake_name2; Name dmake_value, dmake_value2; Property prop, prop2; struct stat statbuf; int statval; - #endif struct stat out_stat, err_stat; hostid = gethostid(); bsd_signals(); --- 194,210 ----
*** 225,262 **** if (getenv(NOCATGETS("DMAKE_STATISTICS"))) { getname_stat = true; } #endif - #if defined(TEAMWARE_MAKE_CMN) catd = catopen(AVO_DOMAIN_DMAKE, NL_CAT_LOCALE); - #endif // ---> fprintf(stderr, catgets(catd, 15, 666, "--- SUN make ---\n")); - #if defined(TEAMWARE_MAKE_CMN) /* * I put libmksdmsi18n_init() under #ifdef because it requires avo_i18n_init() * from avo_util library. */ libmksdmsi18n_init(); - #endif - #ifndef TEAMWARE_MAKE_CMN textdomain(NOCATGETS("SUNW_SPRO_MAKE")); - #endif /* TEAMWARE_MAKE_CMN */ - #ifdef TEAMWARE_MAKE_CMN g_argc = argc; g_argv = (char **) malloc((g_argc + 1) * sizeof(char *)); for (i = 0; i < argc; i++) { g_argv[i] = argv[i]; } g_argv[i] = NULL; - #endif /* TEAMWARE_MAKE_CMN */ /* * Set argv_zero_string to some form of argv[0] for * recursive MAKE builds. */ --- 215,244 ----
*** 401,411 **** setup_interrupt(handle_interrupt); read_files_and_state(argc, argv); - #ifdef TEAMWARE_MAKE_CMN /* * Find the dmake_output_mode: TXT1, TXT2 or HTML1. */ MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_OUTPUT_MODE")); dmake_name2 = GETNAME(wcs_buffer, FIND_LENGTH); --- 383,392 ----
*** 469,481 **** dmake_mode_type = parallel_mode; no_parallel = false; } } } - #endif - #ifdef TEAMWARE_MAKE_CMN parallel_flag = true; putenv(strdup(NOCATGETS("DMAKE_CHILD=TRUE"))); // // If dmake is running with -t option, set dmake_mode_type to serial. --- 450,460 ----
*** 484,498 **** // if(touch) { dmake_mode_type = serial_mode; no_parallel = true; } - #else - parallel_flag = false; - #endif - #if defined (TEAMWARE_MAKE_CMN) /* * Check whether stdout and stderr are physically same. * This is in order to decide whether we need to redirect * stderr separately from stdout. * This check is performed only if __DMAKE_SEPARATE_STDERR --- 463,473 ----
*** 512,522 **** { out_err_same = false; } } } - #endif /* * Enable interrupt handler for alarms */ --- 487,496 ----
*** 689,715 **** Name failed_name; MBSTOWCS(wcs_buffer, NOCATGETS(".FAILED")); failed_name = GETNAME(wcs_buffer, FIND_LENGTH); if ((exit_status != 0) && (failed_name->prop != NULL)) { - #ifdef TEAMWARE_MAKE_CMN /* * [tolik] switch DMake to serial mode */ dmake_mode_type = serial_mode; no_parallel = true; - #endif (void) doname(failed_name, false, true); } else { if (!trace_status) { - #ifdef TEAMWARE_MAKE_CMN /* * Switch DMake to serial mode */ dmake_mode_type = serial_mode; no_parallel = true; - #endif (void) doname(done, false, true); } } } } --- 663,685 ----
*** 808,821 **** } if (getpid() == getpgrp()) { bsd_signal(SIGTERM, SIG_IGN); kill (-getpid(), SIGTERM); } - #ifdef TEAMWARE_MAKE_CMN /* Clean up all parallel/distributed children already finished */ finish_children(false); - #endif /* Make sure the processes running under us terminate first */ while (wait((int *) NULL) != -1); /* Delete the current targets unless they are precious */ --- 778,789 ----
*** 963,977 **** extern char *optarg; extern int optind, opterr, optopt; #define SUNPRO_CMD_OPTS "-~Bbc:Ddef:g:ij:K:kM:m:NnO:o:PpqRrSsTtuVvwx:" - #ifdef TEAMWARE_MAKE_CMN # define SVR4_CMD_OPTS "-c:ef:g:ij:km:nO:o:pqrsTtVv" - #else - # define SVR4_CMD_OPTS "-ef:iknpqrstV" - #endif /* * Added V in SVR4_CMD_OPTS also, which is going to be a hidden * option, just to make sure that the getopt doesn't fail when some * users leave their USE_SVR4_MAKE set and try to use the makefiles --- 931,941 ----
*** 1044,1085 **** } } if (ch == '?') { if (svr4) { - #ifdef TEAMWARE_MAKE_CMN fprintf(stderr, catgets(catd, 1, 267, "Usage : dmake [ -f makefile ][ -c dmake_rcfile ][ -g dmake_group ]\n")); fprintf(stderr, catgets(catd, 1, 268, " [ -j dmake_max_jobs ][ -m dmake_mode ][ -o dmake_odir ]...\n")); fprintf(stderr, catgets(catd, 1, 269, " [ -e ][ -i ][ -k ][ -n ][ -p ][ -q ][ -r ][ -s ][ -t ][ -v ]\n")); - #else - fprintf(stderr, - catgets(catd, 1, 270, "Usage : make [ -f makefile ]... [ -e ][ -i ][ -k ][ -n ][ -p ][ -q ][ -r ]\n")); - fprintf(stderr, - catgets(catd, 1, 271, " [ -s ][ -t ]\n")); - #endif tptr = strchr(SVR4_CMD_OPTS, optopt); } else { - #ifdef TEAMWARE_MAKE_CMN fprintf(stderr, catgets(catd, 1, 272, "Usage : dmake [ -f makefile ][ -c dmake_rcfile ][ -g dmake_group ]\n")); fprintf(stderr, catgets(catd, 1, 273, " [ -j dmake_max_jobs ][ -K statefile ][ -m dmake_mode ][ -x MODE_NAME=VALUE ][ -o dmake_odir ]...\n")); fprintf(stderr, catgets(catd, 1, 274, " [ -d ][ -dd ][ -D ][ -DD ][ -e ][ -i ][ -k ][ -n ][ -p ][ -P ][ -u ][ -w ]\n")); fprintf(stderr, catgets(catd, 1, 275, " [ -q ][ -r ][ -s ][ -S ][ -t ][ -v ][ -V ][ target... ][ macro=value... ][ \"macro +=value\"... ]\n")); - #else - fprintf(stderr, - catgets(catd, 1, 276, "Usage : make [ -f makefile ][ -K statefile ]... [ -d ][ -dd ][ -D ][ -DD ]\n")); - fprintf(stderr, - catgets(catd, 1, 277, " [ -e ][ -i ][ -k ][ -n ][ -p ][ -P ][ -q ][ -r ][ -s ][ -S ][ -t ]\n")); - fprintf(stderr, - catgets(catd, 1, 278, " [ -u ][ -w ][ -V ][ target... ][ macro=value... ][ \"macro +=value\"... ]\n")); - #endif tptr = strchr(SUNPRO_CMD_OPTS, optopt); } if (!tptr) { fatal(catgets(catd, 1, 279, "Unknown option `-%c'"), optopt); } else { --- 1008,1033 ----
*** 1112,1166 **** case 1: /* -f seen */ argv[i] = (char *)NOCATGETS("-f"); break; case 2: /* -c seen */ argv[i] = (char *)NOCATGETS("-c"); - #ifndef TEAMWARE_MAKE_CMN - warning(catgets(catd, 1, 281, "Ignoring DistributedMake -c option")); - #endif break; case 4: /* -g seen */ argv[i] = (char *)NOCATGETS("-g"); - #ifndef TEAMWARE_MAKE_CMN - warning(catgets(catd, 1, 282, "Ignoring DistributedMake -g option")); - #endif break; case 8: /* -j seen */ argv[i] = (char *)NOCATGETS("-j"); - #ifndef TEAMWARE_MAKE_CMN - warning(catgets(catd, 1, 283, "Ignoring DistributedMake -j option")); - #endif break; case 16: /* -M seen */ argv[i] = (char *)NOCATGETS("-M"); - #ifndef TEAMWARE_MAKE_CMN - warning(catgets(catd, 1, 284, "Ignoring ParallelMake -M option")); - #endif break; case 32: /* -m seen */ argv[i] = (char *)NOCATGETS("-m"); - #ifndef TEAMWARE_MAKE_CMN - warning(catgets(catd, 1, 285, "Ignoring DistributedMake -m option")); - #endif break; case 128: /* -O seen */ argv[i] = (char *)NOCATGETS("-O"); break; case 256: /* -K seen */ argv[i] = (char *)NOCATGETS("-K"); break; case 512: /* -o seen */ argv[i] = (char *)NOCATGETS("-o"); - #ifndef TEAMWARE_MAKE_CMN - warning(catgets(catd, 1, 311, "Ignoring DistributedMake -o option")); - #endif break; case 1024: /* -x seen */ argv[i] = (char *)NOCATGETS("-x"); - #ifndef TEAMWARE_MAKE_CMN - warning(catgets(catd, 1, 353, "Ignoring DistributedMake -x option")); - #endif break; default: /* > 1 of -c, f, g, j, K, M, m, O, o, x seen */ fatal(catgets(catd, 1, 286, "Illegal command line. More than one option requiring\nan argument given in the same argument group")); } --- 1060,1093 ----
*** 1539,1560 **** } else { quest = true; } return 0; case 'R': /* Don't run in parallel */ - #ifdef TEAMWARE_MAKE_CMN if (invert_this) { pmake_cap_r_specified = false; no_parallel = false; } else { pmake_cap_r_specified = true; dmake_mode_type = serial_mode; no_parallel = true; } - #else - warning(catgets(catd, 1, 182, "Ignoring ParallelMake -R option")); - #endif return 0; case 'r': /* Turn off internal rules */ if (invert_this) { ignore_default_mk = false; } else { --- 1466,1483 ----
*** 1603,1619 **** svr4 = true; return 0; case 'v': /* Version flag */ if (invert_this) { } else { - #ifdef TEAMWARE_MAKE_CMN fprintf(stdout, NOCATGETS("dmake: %s\n"), verstring); exit_status = 0; exit(0); - #else - warning(catgets(catd, 1, 324, "Ignoring DistributedMake -v option")); - #endif } return 0; case 'w': /* Unconditional flag */ if (invert_this) { report_cwd = false; --- 1526,1538 ----
*** 2874,2884 **** recursion_level = 1; parallel = parallel_flag; /* * make remaining args */ - #ifdef TEAMWARE_MAKE_CMN /* if ((report_dependencies_level == 0) && parallel) { */ if (parallel) { /* --- 2793,2802 ----
*** 2955,2965 **** /* Now wait for all of the targets to finish running */ finish_running(); // setjmp(jmpbuffer); } - #endif for (i = 1; i < argc; i++) { if ((cp = argv[i]) != NULL) { target_to_make_found = true; if ((cp[0] == (int) period_char) && (cp[1] == (int) slash_char)) { --- 2873,2882 ----
*** 3047,3062 **** (void) printf(NOCATGETS("::(%s)\n"), default_target_to_build->string_mb); } - #ifdef TEAMWARE_MAKE_CMN result = doname_parallel(default_target_to_build, true, false); - #else - result = doname_check(default_target_to_build, true, - false, false); - #endif gather_recursive_deps(); if (build_failed_seen) { build_failed_ever_seen = true; warning(catgets(catd, 1, 203, "Target `%s' not remade because of errors"), default_target_to_build->string_mb); --- 2964,2974 ----
*** 3320,3370 **** putenv(mlev); if(report_cwd) { if(make_level_val <= 0) { if(entering) { - #ifdef TEAMWARE_MAKE_CMN sprintf( rcwd , catgets(catd, 1, 329, "dmake: Entering directory `%s'\n") , get_current_path()); - #else - sprintf( rcwd - , catgets(catd, 1, 330, "make: Entering directory `%s'\n") - , get_current_path()); - #endif } else { - #ifdef TEAMWARE_MAKE_CMN sprintf( rcwd , catgets(catd, 1, 331, "dmake: Leaving directory `%s'\n") , get_current_path()); - #else - sprintf( rcwd - , catgets(catd, 1, 332, "make: Leaving directory `%s'\n") - , get_current_path()); - #endif } } else { if(entering) { - #ifdef TEAMWARE_MAKE_CMN sprintf( rcwd , catgets(catd, 1, 333, "dmake[%d]: Entering directory `%s'\n") , make_level_val, get_current_path()); - #else - sprintf( rcwd - , catgets(catd, 1, 334, "make[%d]: Entering directory `%s'\n") - , make_level_val, get_current_path()); - #endif } else { - #ifdef TEAMWARE_MAKE_CMN sprintf( rcwd , catgets(catd, 1, 335, "dmake[%d]: Leaving directory `%s'\n") , make_level_val, get_current_path()); - #else - sprintf( rcwd - , catgets(catd, 1, 336, "make[%d]: Leaving directory `%s'\n") - , make_level_val, get_current_path()); - #endif } } printf(NOCATGETS("%s"), rcwd); } } --- 3232,3258 ----