diff options
author | joerg <joerg@pkgsrc.org> | 2009-03-20 19:23:50 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2009-03-20 19:23:50 +0000 |
commit | 022c4606fcc3bd0780b781561db11a457e1b2757 (patch) | |
tree | 647e974495c5d41703d41ca2e71c9b6063b9153a /sysutils/strigi/buildlink3.mk | |
parent | df774e13d463dae87662491d7021d1153d110ece (diff) | |
download | pkgsrc-022c4606fcc3bd0780b781561db11a457e1b2757.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 'sysutils/strigi/buildlink3.mk')
-rw-r--r-- | sysutils/strigi/buildlink3.mk | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/sysutils/strigi/buildlink3.mk b/sysutils/strigi/buildlink3.mk index 8deadba9d22..048f45e7a40 100644 --- a/sysutils/strigi/buildlink3.mk +++ b/sysutils/strigi/buildlink3.mk @@ -1,23 +1,15 @@ -# $NetBSD: buildlink3.mk,v 1.2 2009/01/09 22:28:02 markd Exp $ +# $NetBSD: buildlink3.mk,v 1.3 2009/03/20 19:25:26 joerg Exp $ -BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ -STRIGI_BUILDLINK3_MK:= ${STRIGI_BUILDLINK3_MK}+ +BUILDLINK_TREE+= strigi -.if ${BUILDLINK_DEPTH} == "+" -BUILDLINK_DEPENDS+= strigi -.endif +.if !defined(STRIGI_BUILDLINK3_MK) +STRIGI_BUILDLINK3_MK:= -BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nstrigi} -BUILDLINK_PACKAGES+= strigi -BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}strigi - -.if ${STRIGI_BUILDLINK3_MK} == "+" BUILDLINK_API_DEPENDS.strigi+= strigi>=0.6.2 BUILDLINK_PKGSRCDIR.strigi?= ../../sysutils/strigi PRINT_PLIST_AWK+= /^@dirrm lib\/strigi$$/ \ { print "@comment in strigi: " $$0; next; } -.endif # STRIGI_BUILDLINK3_MK .include "../../archivers/bzip2/buildlink3.mk" .include "../../converters/libiconv/buildlink3.mk" @@ -25,5 +17,6 @@ PRINT_PLIST_AWK+= /^@dirrm lib\/strigi$$/ \ .include "../../textproc/libclucene/buildlink3.mk" .include "../../textproc/libxml2/buildlink3.mk" .include "../../sysutils/dbus/buildlink3.mk" +.endif # STRIGI_BUILDLINK3_MK -BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} +BUILDLINK_TREE+= -strigi |