pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc Avoid extra stat() calls by not repeatedly checking wh...
details: https://anonhg.NetBSD.org/pkgsrc/rev/3876d6f9da58
branches: trunk
changeset: 510450:3876d6f9da58
user: jlam <jlam%pkgsrc.org@localhost>
date: Thu Mar 30 18:06:17 2006 +0000
description:
Avoid extra stat() calls by not repeatedly checking whether a file
exists on the disk -- we can just check whether a variable defined by
find-files.mk is "__nonexistent__" or not.
diffstat:
archivers/bzip2/builtin.mk | 4 ++--
converters/libiconv/builtin.mk | 6 +++---
devel/cdk/builtin.mk | 4 ++--
devel/dlcompat/builtin.mk | 4 ++--
devel/gettext-lib/builtin.mk | 19 ++++++++++---------
devel/libevent/builtin.mk | 4 ++--
devel/libgetopt/builtin.mk | 4 ++--
devel/ncurses/builtin.mk | 7 ++++---
devel/readline/builtin.mk | 13 ++++++++-----
devel/sysexits/builtin.mk | 4 ++--
devel/zlib/builtin.mk | 6 +++---
fonts/Xft2/builtin.mk | 6 +++---
fonts/fontconfig/builtin.mk | 6 +++---
graphics/MesaLib/builtin.mk | 6 +++---
graphics/freetype2/builtin.mk | 6 +++---
graphics/glu/builtin.mk | 6 +++---
graphics/xpm/builtin.mk | 6 +++---
mail/libmilter/builtin.mk | 5 +++--
mail/libmilter812/builtin.mk | 5 +++--
net/bind9/builtin.mk | 5 +++--
net/libpcap/builtin.mk | 6 +++---
net/netbsd-tap/builtin.mk | 5 +++--
security/PAM/builtin.mk | 4 ++--
security/heimdal/builtin.mk | 9 +++++----
security/libdes/builtin.mk | 4 ++--
security/openpam/builtin.mk | 6 +++---
security/openssl/builtin.mk | 12 +++++++-----
security/pflkm/builtin.mk | 6 +++---
security/skey/builtin.mk | 6 +++---
security/tcp_wrappers/builtin.mk | 6 +++---
sysutils/fam/builtin.mk | 4 ++--
sysutils/file/builtin.mk | 4 ++--
textproc/expat/builtin.mk | 6 +++---
x11/XFree86-libs/builtin.mk | 6 +++---
x11/Xcomposite/builtin.mk | 4 ++--
x11/Xfixes/builtin.mk | 4 ++--
x11/Xrandr-mixedcase/builtin.mk | 6 +++---
x11/Xrender/builtin.mk | 6 +++---
x11/compositeext/builtin.mk | 5 +++--
x11/fixesext/builtin.mk | 5 +++--
x11/randrext/builtin.mk | 6 +++---
x11/renderext/builtin.mk | 6 +++---
x11/xcursor/builtin.mk | 6 +++---
x11/xextensions/builtin.mk | 4 ++--
x11/xorg-libs/builtin.mk | 6 +++---
45 files changed, 141 insertions(+), 127 deletions(-)
diffs (truncated from 1119 to 300 lines):
diff -r 6fc5119283e2 -r 3876d6f9da58 archivers/bzip2/builtin.mk
--- a/archivers/bzip2/builtin.mk Thu Mar 30 17:41:00 2006 +0000
+++ b/archivers/bzip2/builtin.mk Thu Mar 30 18:06:17 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.4 2005/06/27 18:17:57 minskim Exp $
+# $NetBSD: builtin.mk,v 1.5 2006/03/30 18:06:17 jlam Exp $
BUILTIN_PKG:= bzip2
@@ -14,7 +14,7 @@
###
.if !defined(IS_BUILTIN.bzip2)
IS_BUILTIN.bzip2= no
-. if empty(H_BZIP2:M${LOCALBASE}/*) && exists(${H_BZIP2})
+. if empty(H_BZIP2:M__nonexistent__) && empty(H_BZIP2:M${LOCALBASE}/*)
IS_BUILTIN.bzip2= yes
. endif
.endif
diff -r 6fc5119283e2 -r 3876d6f9da58 converters/libiconv/builtin.mk
--- a/converters/libiconv/builtin.mk Thu Mar 30 17:41:00 2006 +0000
+++ b/converters/libiconv/builtin.mk Thu Mar 30 18:06:17 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.14 2005/06/06 01:30:56 jlam Exp $
+# $NetBSD: builtin.mk,v 1.15 2006/03/30 18:06:17 jlam Exp $
BUILTIN_PKG:= iconv
@@ -15,7 +15,7 @@
###
.if !defined(IS_BUILTIN.iconv)
IS_BUILTIN.iconv= no
-. if empty(H_ICONV:M${LOCALBASE}/*) && exists(${H_ICONV}) && \
+. if empty(H_ICONV:M__nonexistent__) && empty(H_ICONV:M${LOCALBASE}/*) && \
!empty(BUILTIN_LIB_FOUND.iconv:M[yY][eE][sS])
IS_BUILTIN.iconv= yes
. endif
@@ -28,7 +28,7 @@
###
.if !defined(BUILTIN_PKG.iconv) && \
!empty(IS_BUILTIN.iconv:M[yY][eE][sS]) && \
- exists(${H_ICONV})
+ empty(H_ICONV:M__nonexistent__)
BUILTIN_VERSION.iconv!= \
${AWK} 'BEGIN { hex="0123456789abcdef" } \
/\#define[ ]*_LIBICONV_VERSION[ ]/ { \
diff -r 6fc5119283e2 -r 3876d6f9da58 devel/cdk/builtin.mk
--- a/devel/cdk/builtin.mk Thu Mar 30 17:41:00 2006 +0000
+++ b/devel/cdk/builtin.mk Thu Mar 30 18:06:17 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.2 2005/06/01 18:02:43 jlam Exp $
+# $NetBSD: builtin.mk,v 1.3 2006/03/30 18:06:17 jlam Exp $
BUILTIN_PKG:= cdk
@@ -13,7 +13,7 @@
###
.if !defined(IS_BUILTIN.cdk)
IS_BUILTIN.cdk= no
-. if empty(H_CDK:M${LOCALBASE}/*) && exists(${H_CDK})
+. if empty(H_CDK:M__nonexistent__) && empty(H_CDK:M${LOCALBASE}/*)
IS_BUILTIN.cdk= yes
. endif
.endif
diff -r 6fc5119283e2 -r 3876d6f9da58 devel/dlcompat/builtin.mk
--- a/devel/dlcompat/builtin.mk Thu Mar 30 17:41:00 2006 +0000
+++ b/devel/dlcompat/builtin.mk Thu Mar 30 18:06:17 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.7 2005/06/01 20:35:41 jlam Exp $
+# $NetBSD: builtin.mk,v 1.8 2006/03/30 18:06:17 jlam Exp $
BUILTIN_PKG:= dlcompat
@@ -14,7 +14,7 @@
###
.if !defined(IS_BUILTIN.dlcompat)
IS_BUILTIN.dlcompat= no
-. if empty(H_DLFCN:M${LOCALBASE}/*) && exists(${H_DLFCN}) && \
+. if empty(H_DLFCN:M__nonexistent__) && empty(H_DLFCN:M${LOCALBASE}/*) && \
!empty(BUILTIN_LIB_FOUND.dl:M[yY][eE][sS])
IS_BUILTIN.dlcompat= yes
. endif
diff -r 6fc5119283e2 -r 3876d6f9da58 devel/gettext-lib/builtin.mk
--- a/devel/gettext-lib/builtin.mk Thu Mar 30 17:41:00 2006 +0000
+++ b/devel/gettext-lib/builtin.mk Thu Mar 30 18:06:17 2006 +0000
@@ -1,11 +1,12 @@
-# $NetBSD: builtin.mk,v 1.28 2006/02/28 23:43:38 joerg Exp $
+# $NetBSD: builtin.mk,v 1.29 2006/03/30 18:06:17 jlam Exp $
BUILTIN_PKG:= gettext
-BUILTIN_FIND_LIBS:= intl
-BUILTIN_FIND_FILES_VAR:= H_GETTEXT
-BUILTIN_FIND_FILES.H_GETTEXT= /usr/include/libintl.h
-BUILTIN_FIND_GREP.H_GETTEXT= \#define[ ]*__USE_GNU_GETTEXT
+BUILTIN_FIND_LIBS:= intl
+BUILTIN_FIND_FILES_VAR:= H_GETTEXT
+BUILTIN_FIND_FILES.H_GETTEXT= /usr/include/libintl.h
+BUILTIN_FIND_FILES._BLTN_H_GETTEXT= /usr/include/libintl.h
+BUILTIN_FIND_GREP.H_GETTEXT= \#define[ ]*__USE_GNU_GETTEXT
.include "../../mk/buildlink3/bsd.builtin.mk"
@@ -15,17 +16,17 @@
###
.if !defined(IS_BUILTIN.gettext)
IS_BUILTIN.gettext= no
-. if empty(H_GETTEXT:M${LOCALBASE}/*) && exists(${H_GETTEXT}) && \
+. if empty(H_GETTEXT:M__nonexistent__) && \
+ empty(H_GETTEXT:M${LOCALBASE}/*) && \
!empty(BUILTIN_LIB_FOUND.intl:M[yY][eE][sS])
IS_BUILTIN.gettext= yes
. endif
.endif
MAKEVARS+= IS_BUILTIN.gettext
-_BLTN_H_GETTEXT= /usr/include/libintl.h
.if !defined(BUILTIN_GETTEXT_NGETTEXT)
BUILTIN_GETTEXT_NGETTEXT= no
-. if exists(${_BLTN_H_GETTEXT})
+. if empty(_BLTN_H_GETTEXT:M__nonexistent__)
BUILTIN_GETTEXT_NGETTEXT!= \
if ${GREP} -q "char.*ngettext" ${_BLTN_H_GETTEXT:Q}; then \
${ECHO} yes; \
@@ -66,7 +67,7 @@
# XXX enough to replace GNU gettext if it is part of glibc (the GNU C
# XXX Library).
# XXX
-. if exists(${_BLTN_H_GETTEXT})
+. if empty(_BLTN_H_GETTEXT:M__nonexistent__)
_BLTN_REPLACE.gettext!= \
if ${GREP} -q "This file is part of the GNU C Library" ${_BLTN_H_GETTEXT:Q}; then \
${ECHO} yes; \
diff -r 6fc5119283e2 -r 3876d6f9da58 devel/libevent/builtin.mk
--- a/devel/libevent/builtin.mk Thu Mar 30 17:41:00 2006 +0000
+++ b/devel/libevent/builtin.mk Thu Mar 30 18:06:17 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.3 2005/06/01 18:02:44 jlam Exp $
+# $NetBSD: builtin.mk,v 1.4 2006/03/30 18:06:17 jlam Exp $
BUILTIN_PKG:= libevent
@@ -13,7 +13,7 @@
###
.if !defined(IS_BUILTIN.libevent)
IS_BUILTIN.libevent= no
-. if empty(H_LIBEVENT:M${LOCALBASE}/*) && exists(${H_LIBEVENT})
+. if empty(H_LIBEVENT:M__nonexistent__) && empty(H_LIBEVENT:M${LOCALBASE}/*)
IS_BUILTIN.libevent= yes
. endif
.endif # IS_BUILTIN.libevent
diff -r 6fc5119283e2 -r 3876d6f9da58 devel/libgetopt/builtin.mk
--- a/devel/libgetopt/builtin.mk Thu Mar 30 17:41:00 2006 +0000
+++ b/devel/libgetopt/builtin.mk Thu Mar 30 18:06:17 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.4 2005/06/05 09:25:37 jlam Exp $
+# $NetBSD: builtin.mk,v 1.5 2006/03/30 18:06:17 jlam Exp $
BUILTIN_PKG:= getopt
@@ -14,7 +14,7 @@
###
.if !defined(IS_BUILTIN.getopt)
IS_BUILTIN.getopt= no
-. if empty(H_GETOPT:M${LOCALBASE}/*) && exists(${H_GETOPT})
+. if empty(H_GETOPT:M__nonexistent__) && empty(H_GETOPT:M${LOCALBASE}/*)
IS_BUILTIN.getopt= yes
. endif
.endif # IS_BUILTIN.getopt
diff -r 6fc5119283e2 -r 3876d6f9da58 devel/ncurses/builtin.mk
--- a/devel/ncurses/builtin.mk Thu Mar 30 17:41:00 2006 +0000
+++ b/devel/ncurses/builtin.mk Thu Mar 30 18:06:17 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.8 2005/06/01 18:02:44 jlam Exp $
+# $NetBSD: builtin.mk,v 1.9 2006/03/30 18:06:17 jlam Exp $
BUILTIN_PKG:= ncurses
@@ -15,7 +15,8 @@
###
.if !defined(IS_BUILTIN.ncurses)
IS_BUILTIN.ncurses= no
-. if empty(H_NCURSES:M${LOCALBASE}/*) && exists(${H_NCURSES}) && \
+. if empty(H_NCURSES:M__nonexistent__) && \
+ empty(H_NCURSES:M${LOCALBASE}/*) && \
!empty(BUILTIN_LIB_FOUND.ncurses:M[yY][eE][sS])
IS_BUILTIN.ncurses= yes
. endif
@@ -28,7 +29,7 @@
###
.if !defined(BUILTIN_PKG.ncurses) && \
!empty(IS_BUILTIN.ncurses:M[yY][eE][sS]) && \
- exists(${H_NCURSES})
+ empty(H_NCURSES:M__nonexistent__)
BUILTIN_VERSION.ncurses!= \
${AWK} '/\#define[ ]*NCURSES_VERSION[ ]/ { \
vers = $$3; \
diff -r 6fc5119283e2 -r 3876d6f9da58 devel/readline/builtin.mk
--- a/devel/readline/builtin.mk Thu Mar 30 17:41:00 2006 +0000
+++ b/devel/readline/builtin.mk Thu Mar 30 18:06:17 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.11 2005/07/01 17:24:02 minskim Exp $
+# $NetBSD: builtin.mk,v 1.12 2006/03/30 18:06:17 jlam Exp $
BUILTIN_PKG:= readline
@@ -6,6 +6,9 @@
BUILTIN_FIND_FILES_VAR:= H_READLINE
BUILTIN_FIND_FILES.H_READLINE= /usr/include/readline/readline.h \
/usr/include/readline.h
+BUILTIN_FIND_FILES._BLTN_H_READLINE= \
+ /usr/include/readline/readline.h \
+ /usr/include/readline.h
BUILTIN_FIND_GREP.H_READLINE= \#define[ ]*RL_VERSION_MAJOR
.include "../../mk/buildlink3/bsd.builtin.mk"
@@ -16,7 +19,8 @@
###
.if !defined(IS_BUILTIN.readline)
IS_BUILTIN.readline= no
-. if empty(H_READLINE:M${LOCALBASE}/*) && exists(${H_READLINE}) && \
+. if empty(H_READLINE:M__nonexistent__) && \
+ empty(H_READLINE:M${LOCALBASE}/*) && \
!empty(BUILTIN_LIB_FOUND.readline:M[yY][eE][sS])
IS_BUILTIN.readline= yes
. endif
@@ -29,7 +33,7 @@
###
.if !defined(BUILTIN_PKG.readline) && \
!empty(IS_BUILTIN.readline:M[yY][eE][sS]) && \
- exists(${H_READLINE})
+ empty(H_READLINE:M__nonexistent__)
BUILTIN_VERSION.readline!= \
${AWK} '/\#define[ ]*RL_VERSION_MAJOR/ { M = $$3 } \
/\#define[ ]*RL_VERSION_MINOR/ { m = "."$$3 } \
@@ -69,8 +73,7 @@
# XXX
. if !empty(BUILTIN_LIB_FOUND.readline:M[nN][oO]) && \
!empty(BUILTIN_LIB_FOUND.edit:M[yY][eE][sS]) && \
- (exists(/usr/include/readline/readline.h) || \
- exists(/usr/include/readline.h))
+ empty(_BLTN_H_READLINE:M__nonexistent__)
USE_BUILTIN.readline= yes
. endif
#
diff -r 6fc5119283e2 -r 3876d6f9da58 devel/sysexits/builtin.mk
--- a/devel/sysexits/builtin.mk Thu Mar 30 17:41:00 2006 +0000
+++ b/devel/sysexits/builtin.mk Thu Mar 30 18:06:17 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.1.1.1 2005/10/31 15:53:19 tv Exp $
+# $NetBSD: builtin.mk,v 1.2 2006/03/30 18:06:17 jlam Exp $
BUILTIN_PKG:= sysexits
@@ -13,7 +13,7 @@
###
.if !defined(IS_BUILTIN.sysexits)
IS_BUILTIN.sysexits= no
-. if empty(H_SYSEXITS:M${LOCALBASE}/*) && exists(${H_SYSEXITS})
+. if empty(H_SYSEXITS:M__nonexistent__) && empty(H_SYSEXITS:M${LOCALBASE}/*)
IS_BUILTIN.sysexits= yes
. endif
.endif # IS_BUILTIN.sysexits
diff -r 6fc5119283e2 -r 3876d6f9da58 devel/zlib/builtin.mk
--- a/devel/zlib/builtin.mk Thu Mar 30 17:41:00 2006 +0000
+++ b/devel/zlib/builtin.mk Thu Mar 30 18:06:17 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.3 2005/06/01 18:02:45 jlam Exp $
+# $NetBSD: builtin.mk,v 1.4 2006/03/30 18:06:17 jlam Exp $
BUILTIN_PKG:= zlib
@@ -13,7 +13,7 @@
###
.if !defined(IS_BUILTIN.zlib)
IS_BUILTIN.zlib= no
-. if empty(H_ZLIB:M${LOCALBASE}/*) && exists(${H_ZLIB})
+. if empty(H_ZLIB:M__nonexistent__) && empty(H_ZLIB:M${LOCALBASE}/*)
IS_BUILTIN.zlib= yes
. endif
.endif
@@ -25,7 +25,7 @@
###
.if !defined(BUILTIN_PKG.zlib) && \
!empty(IS_BUILTIN.zlib:M[yY][eE][sS]) && \
- exists(${H_ZLIB})
+ empty(H_ZLIB:M__nonexistent__)
BUILTIN_VERSION.zlib!= \
${AWK} '/\#define[ ]*ZLIB_VERSION/ { \
vers = $$3; \
diff -r 6fc5119283e2 -r 3876d6f9da58 fonts/Xft2/builtin.mk
--- a/fonts/Xft2/builtin.mk Thu Mar 30 17:41:00 2006 +0000
+++ b/fonts/Xft2/builtin.mk Thu Mar 30 18:06:17 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.12 2005/06/03 19:13:35 jlam Exp $
+# $NetBSD: builtin.mk,v 1.13 2006/03/30 18:06:17 jlam Exp $
BUILTIN_PKG:= Xft2
@@ -13,7 +13,7 @@
###
Home |
Main Index |
Thread Index |
Old Index