# HG changeset patch # User Taylor R Campbell # Date 1756088673 0 # Mon Aug 25 02:24:33 2025 +0000 # Branch trunk # Node ID ecddce62b831d854077f81d9e88a7397e82183fa # Parent 2668cc8540ab96d3de7abe3ca3ba8584c98f9033 # EXP-Topic riastradh-20250824-buildlibparallelism bsd.buildinstall.mk: Count in decimal, not in unary. Let's make the error messages a liiiiiittle less cryptic with unary numbers everywhere, and leave unary numbers to the complexity theorists. diff -r 2668cc8540ab -r ecddce62b831 share/mk/bsd.buildinstall.mk --- a/share/mk/bsd.buildinstall.mk Mon Jul 21 21:21:34 2025 +0000 +++ b/share/mk/bsd.buildinstall.mk Mon Aug 25 02:24:33 2025 +0000 @@ -8,11 +8,11 @@ # Run "make dependall && make install" for all subdirectories in a group # concurrently, but wait after each group. # -SUBDIR_GROUPS= 1 -CUR_GROUP:= 1 +SUBDIR_GROUPS= 0 +CUR_GROUP:= 0 .for dir in ${SUBDIR} . if ${dir} == ".WAIT" -CUR_GROUP:= ${CUR_GROUP}1 +CUR_GROUP:= ${SUBDIR_GROUPS:[#]} SUBDIR_GROUPS:= ${SUBDIR_GROUPS} ${CUR_GROUP} . else SUBDIR_GROUP.${CUR_GROUP}+= ${dir} # HG changeset patch # User Taylor R Campbell # Date 1756089301 0 # Mon Aug 25 02:35:01 2025 +0000 # Branch trunk # Node ID 678d890bdf8754221adc953374aa1c6a77e05a6d # Parent ecddce62b831d854077f81d9e88a7397e82183fa # EXP-Topic riastradh-20250824-buildlibparallelism WIP: bsd.buildinstall.mk: Make a dependall/install target per group. Let's abuse ${MAKEDIRTARGET} less by passing it only a single target each time. Unfortunately, I don't have a theory for how this could improve parallelism. diff -r ecddce62b831 -r 678d890bdf87 share/mk/bsd.buildinstall.mk --- a/share/mk/bsd.buildinstall.mk Mon Aug 25 02:24:33 2025 +0000 +++ b/share/mk/bsd.buildinstall.mk Mon Aug 25 02:35:01 2025 +0000 @@ -12,18 +12,22 @@ SUBDIR_GROUPS= 0 CUR_GROUP:= 0 .for dir in ${SUBDIR} . if ${dir} == ".WAIT" +group${CUR_GROUP}-dependall: ${SUBDIR_GROUP.${CUR_GROUP}:C/^/dependall-/} +group${CUR_GROUP}-install: ${SUBDIR_GROUP.${CUR_GROUP}:C/^/install-/} CUR_GROUP:= ${SUBDIR_GROUPS:[#]} SUBDIR_GROUPS:= ${SUBDIR_GROUPS} ${CUR_GROUP} . else SUBDIR_GROUP.${CUR_GROUP}+= ${dir} .endif +group${CUR_GROUP}-dependall: ${SUBDIR_GROUP.${CUR_GROUP}:C/^/dependall-/} +group${CUR_GROUP}-install: ${SUBDIR_GROUP.${CUR_GROUP}:C/^/install-/} .endfor build_install: .MAKE .for group in ${SUBDIR_GROUPS} . if !empty(SUBDIR_GROUP.${group}) - ${MAKEDIRTARGET} . ${SUBDIR_GROUP.${group}:C/^/dependall-/} - ${MAKEDIRTARGET} . ${SUBDIR_GROUP.${group}:C/^/install-/} + ${MAKEDIRTARGET} . group${group}-dependall + ${MAKEDIRTARGET} . group${group}-install . endif .endfor