diff options
author | joerg <joerg> | 2009-03-20 19:23:50 +0000 |
---|---|---|
committer | joerg <joerg> | 2009-03-20 19:23:50 +0000 |
commit | 405c61d80251d8e80401aed2264d4bede218cb22 (patch) | |
tree | 647e974495c5d41703d41ca2e71c9b6063b9153a /archivers | |
parent | f0f715d4dd4a290c5c6ae716c774f59caf5aa61c (diff) | |
download | pkgsrc-405c61d80251d8e80401aed2264d4bede218cb22.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 'archivers')
-rw-r--r-- | archivers/bzip2/buildlink3.mk | 19 | ||||
-rw-r--r-- | archivers/libarchive/buildlink3.mk | 19 | ||||
-rw-r--r-- | archivers/libcomprex/buildlink3.mk | 19 | ||||
-rw-r--r-- | archivers/liblzo/buildlink3.mk | 19 | ||||
-rw-r--r-- | archivers/libzip/buildlink3.mk | 19 | ||||
-rw-r--r-- | archivers/lzmalib/buildlink3.mk | 19 | ||||
-rw-r--r-- | archivers/lzo/buildlink3.mk | 19 | ||||
-rw-r--r-- | archivers/szip/buildlink3.mk | 19 | ||||
-rw-r--r-- | archivers/zziplib/buildlink3.mk | 19 |
9 files changed, 54 insertions, 117 deletions
diff --git a/archivers/bzip2/buildlink3.mk b/archivers/bzip2/buildlink3.mk index 97fa3bc487b..f8dc3551445 100644 --- a/archivers/bzip2/buildlink3.mk +++ b/archivers/bzip2/buildlink3.mk @@ -1,20 +1,13 @@ -# $NetBSD: buildlink3.mk,v 1.20 2006/07/08 23:10:35 jlam Exp $ +# $NetBSD: buildlink3.mk,v 1.21 2009/03/20 19:23:50 joerg Exp $ -BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ -BZIP2_BUILDLINK3_MK:= ${BZIP2_BUILDLINK3_MK}+ +BUILDLINK_TREE+= bzip2 -.if !empty(BUILDLINK_DEPTH:M+) -BUILDLINK_DEPENDS+= bzip2 -.endif +.if !defined(BZIP2_BUILDLINK3_MK) +BZIP2_BUILDLINK3_MK:= -BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nbzip2} -BUILDLINK_PACKAGES+= bzip2 -BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}bzip2 - -.if !empty(BZIP2_BUILDLINK3_MK:M+) BUILDLINK_API_DEPENDS.bzip2+= bzip2>=1.0.1 BUILDLINK_PKGSRCDIR.bzip2?= ../../archivers/bzip2 BUILDLINK_ABI_DEPENDS.bzip2+= bzip2>=1.0.3 -.endif # BZIP2_BUILDLINK3_MK +.endif # BZIP2_BUILDLINK3_MK -BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} +BUILDLINK_TREE+= -bzip2 diff --git a/archivers/libarchive/buildlink3.mk b/archivers/libarchive/buildlink3.mk index 466e109659c..548aaa46d05 100644 --- a/archivers/libarchive/buildlink3.mk +++ b/archivers/libarchive/buildlink3.mk @@ -1,22 +1,15 @@ -# $NetBSD: buildlink3.mk,v 1.2 2007/07/29 17:35:14 joerg Exp $ +# $NetBSD: buildlink3.mk,v 1.3 2009/03/20 19:23:50 joerg Exp $ -BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ -LIBARCHIVE_BUILDLINK3_MK:= ${LIBARCHIVE_BUILDLINK3_MK}+ +BUILDLINK_TREE+= libarchive -.if ${BUILDLINK_DEPTH} == "+" -BUILDLINK_DEPENDS+= libarchive -.endif +.if !defined(LIBARCHIVE_BUILDLINK3_MK) +LIBARCHIVE_BUILDLINK3_MK:= -BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nlibarchive} -BUILDLINK_PACKAGES+= libarchive -BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}libarchive - -.if ${LIBARCHIVE_BUILDLINK3_MK} == "+" BUILDLINK_API_DEPENDS.libarchive+= libarchive>=2.2 BUILDLINK_PKGSRCDIR.libarchive?= ../../archivers/libarchive -.endif # LIBARCHIVE_BUILDLINK3_MK .include "../../archivers/bzip2/buildlink3.mk" .include "../../devel/zlib/buildlink3.mk" +.endif # LIBARCHIVE_BUILDLINK3_MK -BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} +BUILDLINK_TREE+= -libarchive diff --git a/archivers/libcomprex/buildlink3.mk b/archivers/libcomprex/buildlink3.mk index ffb2ef335f2..0846062e2d8 100644 --- a/archivers/libcomprex/buildlink3.mk +++ b/archivers/libcomprex/buildlink3.mk @@ -1,22 +1,15 @@ -# $NetBSD: buildlink3.mk,v 1.12 2008/01/18 05:06:19 tnn Exp $ +# $NetBSD: buildlink3.mk,v 1.13 2009/03/20 19:23:51 joerg Exp $ -BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ -LIBCOMPREX_BUILDLINK3_MK:= ${LIBCOMPREX_BUILDLINK3_MK}+ +BUILDLINK_TREE+= libcomprex -.if !empty(BUILDLINK_DEPTH:M+) -BUILDLINK_DEPENDS+= libcomprex -.endif +.if !defined(LIBCOMPREX_BUILDLINK3_MK) +LIBCOMPREX_BUILDLINK3_MK:= -BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nlibcomprex} -BUILDLINK_PACKAGES+= libcomprex -BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}libcomprex - -.if !empty(LIBCOMPREX_BUILDLINK3_MK:M+) BUILDLINK_API_DEPENDS.libcomprex+= libcomprex>=0.3.2 BUILDLINK_ABI_DEPENDS.libcomprex+= libcomprex>=0.3.3nb3 BUILDLINK_PKGSRCDIR.libcomprex?= ../../archivers/libcomprex -.endif # LIBCOMPREX_BUILDLINK3_MK .include "../../www/curl/buildlink3.mk" +.endif # LIBCOMPREX_BUILDLINK3_MK -BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} +BUILDLINK_TREE+= -libcomprex diff --git a/archivers/liblzo/buildlink3.mk b/archivers/liblzo/buildlink3.mk index 2c8bcefdb39..15ff35f489a 100644 --- a/archivers/liblzo/buildlink3.mk +++ b/archivers/liblzo/buildlink3.mk @@ -1,20 +1,13 @@ -# $NetBSD: buildlink3.mk,v 1.8 2006/07/08 23:10:35 jlam Exp $ +# $NetBSD: buildlink3.mk,v 1.9 2009/03/20 19:23:51 joerg Exp $ -BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ -LIBLZO_BUILDLINK3_MK:= ${LIBLZO_BUILDLINK3_MK}+ +BUILDLINK_TREE+= liblzo -.if !empty(BUILDLINK_DEPTH:M+) -BUILDLINK_DEPENDS+= liblzo -.endif +.if !defined(LIBLZO_BUILDLINK3_MK) +LIBLZO_BUILDLINK3_MK:= -BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nliblzo} -BUILDLINK_PACKAGES+= liblzo -BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}liblzo - -.if !empty(LIBLZO_BUILDLINK3_MK:M+) BUILDLINK_API_DEPENDS.liblzo+= liblzo>=1.08 BUILDLINK_PKGSRCDIR.liblzo?= ../../archivers/liblzo BUILDLINK_ABI_DEPENDS.liblzo+= liblzo>=1.08nb1 -.endif # LIBLZO_BUILDLINK3_MK +.endif # LIBLZO_BUILDLINK3_MK -BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} +BUILDLINK_TREE+= -liblzo diff --git a/archivers/libzip/buildlink3.mk b/archivers/libzip/buildlink3.mk index b7ec38bf827..6969888783d 100644 --- a/archivers/libzip/buildlink3.mk +++ b/archivers/libzip/buildlink3.mk @@ -1,21 +1,14 @@ -# $NetBSD: buildlink3.mk,v 1.7 2006/07/08 23:10:35 jlam Exp $ +# $NetBSD: buildlink3.mk,v 1.8 2009/03/20 19:23:51 joerg Exp $ -BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ -LIBZIP_BUILDLINK3_MK:= ${LIBZIP_BUILDLINK3_MK}+ +BUILDLINK_TREE+= libzip -.if !empty(BUILDLINK_DEPTH:M+) -BUILDLINK_DEPENDS+= libzip -.endif +.if !defined(LIBZIP_BUILDLINK3_MK) +LIBZIP_BUILDLINK3_MK:= -BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nlibzip} -BUILDLINK_PACKAGES+= libzip -BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}libzip - -.if !empty(LIBZIP_BUILDLINK3_MK:M+) BUILDLINK_API_DEPENDS.libzip+= libzip>=0.7.1 BUILDLINK_PKGSRCDIR.libzip?= ../../archivers/libzip -.endif # LIBZIP_BUILDLINK3_MK .include "../../devel/zlib/buildlink3.mk" +.endif # LIBZIP_BUILDLINK3_MK -BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} +BUILDLINK_TREE+= -libzip diff --git a/archivers/lzmalib/buildlink3.mk b/archivers/lzmalib/buildlink3.mk index 0c74842625d..39634ad85cf 100644 --- a/archivers/lzmalib/buildlink3.mk +++ b/archivers/lzmalib/buildlink3.mk @@ -1,19 +1,12 @@ -# $NetBSD: buildlink3.mk,v 1.1.1.1 2008/09/04 12:07:15 obache Exp $ +# $NetBSD: buildlink3.mk,v 1.2 2009/03/20 19:23:51 joerg Exp $ -BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ -LZMALIB_BUILDLINK3_MK:= ${LZMALIB_BUILDLINK3_MK}+ +BUILDLINK_TREE+= lzmalib -.if ${BUILDLINK_DEPTH} == "+" -BUILDLINK_DEPENDS+= lzmalib -.endif +.if !defined(LZMALIB_BUILDLINK3_MK) +LZMALIB_BUILDLINK3_MK:= -BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nlzmalib} -BUILDLINK_PACKAGES+= lzmalib -BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}lzmalib - -.if ${LZMALIB_BUILDLINK3_MK} == "+" BUILDLINK_API_DEPENDS.lzmalib+= lzmalib>=0.0.1 BUILDLINK_PKGSRCDIR.lzmalib?= ../../archivers/lzmalib -.endif # LZMALIB_BUILDLINK3_MK +.endif # LZMALIB_BUILDLINK3_MK -BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} +BUILDLINK_TREE+= -lzmalib diff --git a/archivers/lzo/buildlink3.mk b/archivers/lzo/buildlink3.mk index 747f6f2af17..eb81f85533f 100644 --- a/archivers/lzo/buildlink3.mk +++ b/archivers/lzo/buildlink3.mk @@ -1,19 +1,12 @@ -# $NetBSD: buildlink3.mk,v 1.6 2006/07/08 23:10:35 jlam Exp $ +# $NetBSD: buildlink3.mk,v 1.7 2009/03/20 19:23:51 joerg Exp $ -BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ -LZO_BUILDLINK3_MK:= ${LZO_BUILDLINK3_MK}+ +BUILDLINK_TREE+= lzo -.if !empty(BUILDLINK_DEPTH:M+) -BUILDLINK_DEPENDS+= lzo -.endif +.if !defined(LZO_BUILDLINK3_MK) +LZO_BUILDLINK3_MK:= -BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nlzo} -BUILDLINK_PACKAGES+= lzo -BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}lzo - -.if !empty(LZO_BUILDLINK3_MK:M+) BUILDLINK_API_DEPENDS.lzo+= lzo>=2.01 BUILDLINK_PKGSRCDIR.lzo?= ../../archivers/lzo -.endif # LZO_BUILDLINK3_MK +.endif # LZO_BUILDLINK3_MK -BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} +BUILDLINK_TREE+= -lzo diff --git a/archivers/szip/buildlink3.mk b/archivers/szip/buildlink3.mk index 959aef2b06c..2639c082b0b 100644 --- a/archivers/szip/buildlink3.mk +++ b/archivers/szip/buildlink3.mk @@ -1,19 +1,12 @@ -# $NetBSD: buildlink3.mk,v 1.6 2006/07/08 23:10:35 jlam Exp $ +# $NetBSD: buildlink3.mk,v 1.7 2009/03/20 19:23:51 joerg Exp $ -BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ -SZIP_BUILDLINK3_MK:= ${SZIP_BUILDLINK3_MK}+ +BUILDLINK_TREE+= szip -.if !empty(BUILDLINK_DEPTH:M+) -BUILDLINK_DEPENDS+= szip -.endif +.if !defined(SZIP_BUILDLINK3_MK) +SZIP_BUILDLINK3_MK:= -BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nszip} -BUILDLINK_PACKAGES+= szip -BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}szip - -.if !empty(SZIP_BUILDLINK3_MK:M+) BUILDLINK_API_DEPENDS.szip+= szip>=2.0 BUILDLINK_PKGSRCDIR.szip?= ../../archivers/szip -.endif # SZIP_BUILDLINK3_MK +.endif # SZIP_BUILDLINK3_MK -BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} +BUILDLINK_TREE+= -szip diff --git a/archivers/zziplib/buildlink3.mk b/archivers/zziplib/buildlink3.mk index 32de5c7122a..02abc95b112 100644 --- a/archivers/zziplib/buildlink3.mk +++ b/archivers/zziplib/buildlink3.mk @@ -1,21 +1,14 @@ -# $NetBSD: buildlink3.mk,v 1.6 2006/07/08 23:10:35 jlam Exp $ +# $NetBSD: buildlink3.mk,v 1.7 2009/03/20 19:23:51 joerg Exp $ -BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ -ZZIPLIB_BUILDLINK3_MK:= ${ZZIPLIB_BUILDLINK3_MK}+ +BUILDLINK_TREE+= zziplib -.if !empty(BUILDLINK_DEPTH:M+) -BUILDLINK_DEPENDS+= zziplib -.endif +.if !defined(ZZIPLIB_BUILDLINK3_MK) +ZZIPLIB_BUILDLINK3_MK:= -BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nzziplib} -BUILDLINK_PACKAGES+= zziplib -BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}zziplib - -.if !empty(ZZIPLIB_BUILDLINK3_MK:M+) BUILDLINK_API_DEPENDS.zziplib+= zziplib>=0.10.82 BUILDLINK_PKGSRCDIR.zziplib?= ../../archivers/zziplib -.endif # ZZIPLIB_BUILDLINK3_MK .include "../../devel/zlib/buildlink3.mk" +.endif # ZZIPLIB_BUILDLINK3_MK -BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} +BUILDLINK_TREE+= -zziplib |