From 022c4606fcc3bd0780b781561db11a457e1b2757 Mon Sep 17 00:00:00 2001 From: joerg Date: Fri, 20 Mar 2009 19:23:50 +0000 Subject: Simply and speed up buildlink3.mk files and processing. 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. --- wm/xfce4-wm/buildlink3.mk | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'wm/xfce4-wm') diff --git a/wm/xfce4-wm/buildlink3.mk b/wm/xfce4-wm/buildlink3.mk index 12e3012314a..a38027dfeb0 100644 --- a/wm/xfce4-wm/buildlink3.mk +++ b/wm/xfce4-wm/buildlink3.mk @@ -1,20 +1,12 @@ -# $NetBSD: buildlink3.mk,v 1.24 2008/12/18 16:46:29 hira Exp $ +# $NetBSD: buildlink3.mk,v 1.25 2009/03/20 19:25:35 joerg Exp $ -BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ -XFCE4_WM_BUILDLINK3_MK:= ${XFCE4_WM_BUILDLINK3_MK}+ +BUILDLINK_TREE+= xfce4-wm -.if ${BUILDLINK_DEPTH} == "+" -BUILDLINK_DEPENDS+= xfce4-wm -.endif +.if !defined(XFCE4_WM_BUILDLINK3_MK) +XFCE4_WM_BUILDLINK3_MK:= -BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nxfce4-wm} -BUILDLINK_PACKAGES+= xfce4-wm -BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}xfce4-wm - -.if ${XFCE4_WM_BUILDLINK3_MK} == "+" BUILDLINK_API_DEPENDS.xfce4-wm+= xfce4-wm>=4.4.3nb1 BUILDLINK_PKGSRCDIR.xfce4-wm?= ../../wm/xfce4-wm -.endif # XFCE4_WM_BUILDLINK3_MK .include "../../graphics/hicolor-icon-theme/buildlink3.mk" .include "../../x11/libXpm/buildlink3.mk" @@ -22,5 +14,6 @@ BUILDLINK_PKGSRCDIR.xfce4-wm?= ../../wm/xfce4-wm .include "../../x11/startup-notification/buildlink3.mk" .include "../../devel/xfce4-dev-tools/buildlink3.mk" .include "../../devel/glib2/buildlink3.mk" +.endif # XFCE4_WM_BUILDLINK3_MK -BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} +BUILDLINK_TREE+= -xfce4-wm -- cgit v1.2.3