From 2d1ba244e90207d03eef397a99aa4091baeec5b3 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. --- multimedia/gstreamer0.10/buildlink3.mk | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'multimedia/gstreamer0.10/buildlink3.mk') diff --git a/multimedia/gstreamer0.10/buildlink3.mk b/multimedia/gstreamer0.10/buildlink3.mk index e9a9d36eb3e..daa241bac45 100644 --- a/multimedia/gstreamer0.10/buildlink3.mk +++ b/multimedia/gstreamer0.10/buildlink3.mk @@ -1,24 +1,16 @@ -# $NetBSD: buildlink3.mk,v 1.9 2007/05/31 08:34:52 rillig Exp $ +# $NetBSD: buildlink3.mk,v 1.10 2009/03/20 19:25:03 joerg Exp $ -BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ -GSTREAMER0.10_BUILDLINK3_MK:= ${GSTREAMER0.10_BUILDLINK3_MK}+ +BUILDLINK_TREE+= gstreamer0.10 -.if !empty(BUILDLINK_DEPTH:M+) -BUILDLINK_DEPENDS+= gstreamer0.10 -.endif - -BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Ngstreamer0.10} -BUILDLINK_PACKAGES+= gstreamer0.10 -BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}gstreamer0.10 +.if !defined(GSTREAMER0.10_BUILDLINK3_MK) +GSTREAMER0.10_BUILDLINK3_MK:= -.if !empty(GSTREAMER0.10_BUILDLINK3_MK:M+) BUILDLINK_API_DEPENDS.gstreamer0.10+= gstreamer0.10>=0.10.1 BUILDLINK_ABI_DEPENDS.gstreamer0.10?= gstreamer0.10>=0.10.2nb1 BUILDLINK_PKGSRCDIR.gstreamer0.10?= ../../multimedia/gstreamer0.10 PRINT_PLIST_AWK+= /^@dirrm (include|lib)\/gstreamer-0.10(\/gst)?$$/ \ { print "@comment in gstreamer0.10: " $$0; next; } -.endif # GSTREAMER0.10_BUILDLINK3_MK pkgbase := gstreamer0.10 .include "../../mk/pkg-build-options.mk" @@ -29,5 +21,6 @@ pkgbase := gstreamer0.10 .include "../../devel/glib2/buildlink3.mk" .include "../../textproc/libxml2/buildlink3.mk" +.endif # GSTREAMER0.10_BUILDLINK3_MK -BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} +BUILDLINK_TREE+= -gstreamer0.10 -- cgit v1.2.3