2d1ba244e9
This changes the buildlink3.mk files to use an include guard for the recursive include. The use of BUILDLINK_DEPTH, BUILDLINK_DEPENDS, BUILDLINK_PACKAGES and BUILDLINK_ORDER is handled by a single new variable BUILDLINK_TREE. Each buildlink3.mk file adds a pair of enter/exit marker, which can be used to reconstruct the tree and to determine first level includes. Avoiding := for large variables (BUILDLINK_ORDER) speeds up parse time as += has linear complexity. The include guard reduces system time by avoiding reading files over and over again. For complex packages this reduces both %user and %sys time to half of the former time.
39 lines
1.1 KiB
Makefile
39 lines
1.1 KiB
Makefile
# $NetBSD: buildlink3.mk,v 1.8 2009/03/20 19:24:09 joerg Exp $
|
|
|
|
BUILDLINK_TREE+= apr-util
|
|
|
|
.if !defined(APR_UTIL_BUILDLINK3_MK)
|
|
APR_UTIL_BUILDLINK3_MK:=
|
|
|
|
BUILDLINK_API_DEPENDS.apr-util+= apr-util>=1.2.8
|
|
BUILDLINK_ABI_DEPENDS.apr-util?= apr-util>=1.3.4
|
|
BUILDLINK_PKGSRCDIR.apr-util?= ../../devel/apr-util
|
|
|
|
BUILDLINK_FILES.apr-util+= bin/apu-1-config
|
|
BUILDLINK_FILES.apr-util+= lib/aprutil.exp
|
|
|
|
${BUILDLINK_DIR}/bin/apu-config: buildlink-directories
|
|
${MKDIR} ${BUILDLINK_DIR}/bin && ${LN} -fs apu-1-config ${BUILDLINK_DIR}/bin/apu-config
|
|
|
|
buildlink-apr-util-cookie: ${BUILDLINK_DIR}/bin/apu-config
|
|
|
|
.include "../../mk/bsd.fast.prefs.mk"
|
|
|
|
pkgbase := apr-util
|
|
.include "../../mk/pkg-build-options.mk"
|
|
|
|
.if !empty(PKG_BUILD_OPTIONS.apr-util:Mdb4)
|
|
. include "../../databases/db4/buildlink3.mk"
|
|
.endif
|
|
|
|
.if !empty(PKG_BUILD_OPTIONS.apr-util:Mldap)
|
|
. include "../../databases/openldap-client/buildlink3.mk"
|
|
.endif
|
|
|
|
.include "../../converters/libiconv/buildlink3.mk"
|
|
.include "../../devel/apr/buildlink3.mk"
|
|
.include "../../textproc/expat/buildlink3.mk"
|
|
.include "../../mk/dlopen.buildlink3.mk"
|
|
.endif # APR_UTIL_BUILDLINK3_MK
|
|
|
|
BUILDLINK_TREE+= -apr-util
|