summaryrefslogtreecommitdiff
path: root/x11/xcursor
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2009-03-20 19:23:50 +0000
committerjoerg <joerg@pkgsrc.org>2009-03-20 19:23:50 +0000
commit2d1ba244e90207d03eef397a99aa4091baeec5b3 (patch)
tree647e974495c5d41703d41ca2e71c9b6063b9153a /x11/xcursor
parent4bf0a20854ae9e07b7965977a713f2efee890976 (diff)
downloadpkgsrc-2d1ba244e90207d03eef397a99aa4091baeec5b3.tar.gz
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.
Diffstat (limited to 'x11/xcursor')
-rw-r--r--x11/xcursor/buildlink3.mk19
-rw-r--r--x11/xcursor/builtin.mk4
2 files changed, 7 insertions, 16 deletions
diff --git a/x11/xcursor/buildlink3.mk b/x11/xcursor/buildlink3.mk
index 3c621417abc..05df8befb68 100644
--- a/x11/xcursor/buildlink3.mk
+++ b/x11/xcursor/buildlink3.mk
@@ -1,25 +1,18 @@
-# $NetBSD: buildlink3.mk,v 1.23 2006/12/15 20:33:05 joerg Exp $
+# $NetBSD: buildlink3.mk,v 1.24 2009/03/20 19:25:52 joerg Exp $
.include "../../mk/bsd.fast.prefs.mk"
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
-XCURSOR_BUILDLINK3_MK:= ${XCURSOR_BUILDLINK3_MK}+
+BUILDLINK_TREE+= xcursor
-.if !empty(BUILDLINK_DEPTH:M+)
-BUILDLINK_DEPENDS+= xcursor
-.endif
+.if !defined(XCURSOR_BUILDLINK3_MK)
+XCURSOR_BUILDLINK3_MK:=
-BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nxcursor}
-BUILDLINK_PACKAGES+= xcursor
-BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}xcursor
-
-.if !empty(XCURSOR_BUILDLINK3_MK:M+)
BUILDLINK_API_DEPENDS.xcursor+= xcursor>=1.0
BUILDLINK_ABI_DEPENDS.xcursor+= xcursor>=1.1.2nb1
BUILDLINK_PKGSRCDIR.xcursor?= ../../x11/xcursor
-.endif # XCURSOR_BUILDLINK3_MK
.include "../../x11/libXfixes/buildlink3.mk"
.include "../../x11/libXrender/buildlink3.mk"
+.endif # XCURSOR_BUILDLINK3_MK
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
+BUILDLINK_TREE+= -xcursor
diff --git a/x11/xcursor/builtin.mk b/x11/xcursor/builtin.mk
index d7f190b458c..0e9077c2620 100644
--- a/x11/xcursor/builtin.mk
+++ b/x11/xcursor/builtin.mk
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.13 2008/10/05 21:36:34 cube Exp $
+# $NetBSD: builtin.mk,v 1.14 2009/03/20 19:25:52 joerg Exp $
BUILTIN_PKG:= xcursor
@@ -86,9 +86,7 @@ CHECK_BUILTIN.xcursor?= no
BUILDLINK_API_DEPENDS.xcursor+= xcursor>=1.1.1
BUILDLINK_API_DEPENDS.Xrender+= Xrender>=0.8
. for _mkfile_ in buildlink3.mk builtin.mk
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
. sinclude "../../x11/Xfixes/${_mkfile_}"
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
. endfor
. endif