1 # $NetBSD: bsd.buildinstall.mk,v 1.3 2025/08/25 02:44:31 riastradh Exp $ 2 3 # 4 # build_install logic for src/Makefile 5 # Used by src/lib/Makefile and src/tools/Makefile. 6 # 7 # Compute a list of subdirectories delimited by .WAIT. 8 # Run "make dependall && make install" for all subdirectories in a group 9 # concurrently, but wait after each group. 10 # 11 SUBDIR_GROUPS= 0 12 CUR_GROUP:= 0 13 .for dir in ${SUBDIR} 14 . if ${dir} == ".WAIT" 15 CUR_GROUP:= ${SUBDIR_GROUPS:[#]} 16 SUBDIR_GROUPS:= ${SUBDIR_GROUPS} ${CUR_GROUP} 17 . else 18 SUBDIR_GROUP.${CUR_GROUP}+= ${dir} 19 .endif 20 21 .endfor 22 23 build_install: .MAKE 24 .for group in ${SUBDIR_GROUPS} 25 . if !empty(SUBDIR_GROUP.${group}) 26 ${MAKEDIRTARGET} . ${SUBDIR_GROUP.${group}:C/^/dependall-/} 27 ${MAKEDIRTARGET} . ${SUBDIR_GROUP.${group}:C/^/install-/} 28 . endif 29 .endfor 30