[BACK]Return to bsd.buildinstall.mk CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / share / mk

File: [cvs.NetBSD.org] / src / share / mk / bsd.buildinstall.mk (download)

Revision 1.1, Thu Nov 15 23:51:53 2012 UTC (17 months ago) by joerg
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, agc-symver-base, agc-symver, HEAD
Branch point for: yamt-pagecache, tls-maxphys

Move the build_install logic from lib/Makefile into share/mk and re-use
it for tools. The existing logic broke for the LLVM build with the
recent .ORDER changes in make.

#	$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