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