etc/protocols - sync with NetBSD-8
[minix.git] / share / mk / bsd.buildinstall.mk
blob87c65b3660cbeed4a788938f766c245032cb22cb
1 # $NetBSD: bsd.buildinstall.mk,v 1.1 2012/11/15 23:51:53 joerg Exp $
4 # build_install logic for src/Makefile
5 # Used by src/lib/Makefile and src/tools/Makefile.
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.
11 SUBDIR_GROUPS= 1
12 CUR_GROUP:= 1
13 .for dir in ${SUBDIR}
14 . if ${dir} == ".WAIT"
15 CUR_GROUP:= ${CUR_GROUP}1
16 SUBDIR_GROUPS:= ${SUBDIR_GROUPS} ${CUR_GROUP}
17 . else
18 SUBDIR_GROUP.${CUR_GROUP}+= ${dir}
19 .endif
21 .endfor
23 build_install:
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