NetBSD/compat/compatsubdir.mk
joerg 933525b99b Implement build_install in src/lib/Makefile, which traverses the
subdirectories and invokes dependall/install. Do this in groups
delimited by .WAIT to ensure that depending libraries can use the
installed versions and don't need to know the locations in the source
tree.

Use this new target in src/Makefile to replace most of the adhoc library
logic with two special cases, src/lib and src/compat. Adjust
sys/Makefile to include the module directory when building them. Add
some necessary .WAITs in src/lib/Makefile to reflect the dependencies
from src/Makefile and also add the rump libraries here.
2012-08-17 16:22:27 +00:00

34 lines
709 B
Makefile

# $NetBSD: compatsubdir.mk,v 1.8 2012/08/17 16:22:27 joerg Exp $
# Build netbsd libraries.
.include <bsd.own.mk>
TARGETS+= build_install
.if ${MKCOMPAT} != "no"
.if !make(includes)
# make sure we get an objdir built early enough
.include <bsd.prog.mk>
MAKEDIRTARGETENV=
.if defined(MAKEOBJDIRPREFIX)
MAKEDIRTARGETENV+= unset MAKEOBJDIRPREFIX &&
.endif
MAKEDIRTARGETENV+= MAKEOBJDIR='$${.CURDIR:C,^${NETBSDSRCDIR},${.OBJDIR},}'
MAKEDIRTARGETENV+= MKOBJDIRS=yes MKSHARE=no
MAKEDIRTARGETENV+= BSD_MK_COMPAT_FILE=${BSD_MK_COMPAT_FILE}
.if defined(BOOTSTRAP_SUBDIRS)
SUBDIR= ${BOOTSTRAP_SUBDIRS}
.else
SUBDIR= ../../../lib .WAIT \
../../../libexec/ld.elf_so
.endif
.include <bsd.subdir.mk>
.endif
.endif