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

*** 39,59 **** #include <dm/Avo_DoJobMsg.h> #include <dm/Avo_MToolJobResultMsg.h> #endif #include <errno.h> /* errno */ #include <fcntl.h> - #include <avo/util.h> /* avo_get_user(), avo_hostname() */ #include <mk/defs.h> #include <mksh/dosys.h> /* redirect_io() */ #include <mksh/macro.h> /* expand_value() */ #include <mksh/misc.h> /* getmem() */ #include <sys/signal.h> #include <sys/stat.h> #include <sys/types.h> #include <sys/utsname.h> #include <sys/wait.h> #include <unistd.h> /* * Defined macros --- 39,59 ---- #include <dm/Avo_DoJobMsg.h> #include <dm/Avo_MToolJobResultMsg.h> #endif #include <errno.h> /* errno */ #include <fcntl.h> #include <mk/defs.h> #include <mksh/dosys.h> /* redirect_io() */ #include <mksh/macro.h> /* expand_value() */ #include <mksh/misc.h> /* getmem() */ #include <sys/signal.h> #include <sys/stat.h> #include <sys/types.h> #include <sys/utsname.h> #include <sys/wait.h> #include <unistd.h> + #include <netdb.h> /* * Defined macros
*** 143,157 **** Name target = line->body.line.target; Boolean wrote_state_file = false; if ((pmake_max_jobs == 0) && (dmake_mode_type == parallel_mode)) { - if (user_name[0] == '\0') { - avo_get_user(user_name, NULL); - } if (local_host[0] == '\0') { ! strcpy(local_host, avo_hostname()); } MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_MAX_JOBS")); dmake_name = GETNAME(wcs_buffer, FIND_LENGTH); if (((prop = get_prop(dmake_name->prop, macro_prop)) != NULL) && ((dmake_value = prop->body.macro.value) != NULL)) { --- 143,154 ---- Name target = line->body.line.target; Boolean wrote_state_file = false; if ((pmake_max_jobs == 0) && (dmake_mode_type == parallel_mode)) { if (local_host[0] == '\0') { ! (void) gethostname(local_host, MAXNAMELEN); } MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_MAX_JOBS")); dmake_name = GETNAME(wcs_buffer, FIND_LENGTH); if (((prop = get_prop(dmake_name->prop, macro_prop)) != NULL) && ((dmake_value = prop->body.macro.value) != NULL)) {
*** 667,677 **** /* warning message for the user */ warning(catgets(catd, 1, 339, "Encountered max jobs auto adjustment error - disabling auto adjustment.")); /* switch off job adjustment for the children */ ! putenv(NOCATGETS("DMAKE_ADJUST_MAX_JOBS=NO")); /* and for this dmake */ job_adjust_mode = ADJUST_NONE; } } --- 664,674 ---- /* warning message for the user */ warning(catgets(catd, 1, 339, "Encountered max jobs auto adjustment error - disabling auto adjustment.")); /* switch off job adjustment for the children */ ! putenv(strdup(NOCATGETS("DMAKE_ADJUST_MAX_JOBS=NO"))); /* and for this dmake */ job_adjust_mode = ADJUST_NONE; } }
*** 1734,1753 **** rp = new_running_struct(); rp->state = build_running; rp->target = target; rp->true_target = true_target; rp->command = command; - Property spro_val = get_prop(sunpro_dependencies->prop, macro_prop); - if(spro_val) { - rp->sprodep_value = spro_val->body.macro.value; - spro_val->body.macro.value = NULL; - spro_val = get_prop(sunpro_dependencies->prop, env_mem_prop); - if(spro_val) { - rp->sprodep_env = spro_val->body.env_mem.value; - spro_val->body.env_mem.value = NULL; - } - } rp->recursion_level = recursion_level; rp->do_get = do_get; rp->implicit = implicit; rp->auto_count = auto_count; if (auto_count > 0) { --- 1731,1740 ----