Print this page
fixup! make: be serial if 'make', parallel if 'dmake', and parallel if '-j' is specified either way
fixup! make: translate using gettext, rather than the unmaintainable catgets
fixup! make: unifdef for two bugfixes conditioned for unknown reasons (defined)
*** 57,69 ****
#include <vroot/report.h> /* report_dependency(), get_report_file() */
// From read2.cc
extern Name normalize_name(register wchar_t *name_string, register int length);
- // From parallel.cc
- #define MAXJOBS_ADJUST_RFE4694000
-
extern void job_adjust_fini();
/*
* Defined macros
--- 57,66 ----
*** 396,423 ****
/*
* Find the dmake_mode: parallel, or serial.
*/
if ((!pmake_cap_r_specified) &&
(!pmake_machinesfile_specified)) {
! char *s = strdup(argv[0]);
MBSTOWCS(wcs_buffer, "DMAKE_MODE");
dmake_name2 = GETNAME(wcs_buffer, FIND_LENGTH);
prop2 = get_prop(dmake_name2->prop, macro_prop);
// If we're invoked as 'make' run serially, regardless of DMAKE_MODE
// If we're invoked as 'make' but passed -j, run parallel
// If we're invoked as 'dmake', without DMAKE_MODE, default parallel
// If we're invoked as 'dmake' and DMAKE_MODE is set, honour it.
! if ((strcmp(basename(s), "make") == 0) &&
!dmake_max_jobs_specified) {
dmake_mode_type = serial_mode;
no_parallel = true;
} else if (prop2 == NULL) {
/* DMAKE_MODE not defined, default based on our name */
! char *s = strdup(argv[0]);
!
! if (strcmp(basename(s), "dmake") == 0) {
dmake_mode_type = parallel_mode;
no_parallel = false;
}
} else {
dmake_value2 = prop2->body.macro.value;
--- 393,423 ----
/*
* Find the dmake_mode: parallel, or serial.
*/
if ((!pmake_cap_r_specified) &&
(!pmake_machinesfile_specified)) {
! char *s, *b;
!
! if ((s = strdup(argv[0])) == NULL)
! fatal(gettext("Out of memory"));
!
! b = basename(s);
MBSTOWCS(wcs_buffer, "DMAKE_MODE");
dmake_name2 = GETNAME(wcs_buffer, FIND_LENGTH);
prop2 = get_prop(dmake_name2->prop, macro_prop);
// If we're invoked as 'make' run serially, regardless of DMAKE_MODE
// If we're invoked as 'make' but passed -j, run parallel
// If we're invoked as 'dmake', without DMAKE_MODE, default parallel
// If we're invoked as 'dmake' and DMAKE_MODE is set, honour it.
! if ((strcmp(b, "make") == 0) &&
!dmake_max_jobs_specified) {
dmake_mode_type = serial_mode;
no_parallel = true;
} else if (prop2 == NULL) {
/* DMAKE_MODE not defined, default based on our name */
! if (strcmp(b, "dmake") == 0) {
dmake_mode_type = parallel_mode;
no_parallel = false;
}
} else {
dmake_value2 = prop2->body.macro.value;