From d71a98aa8eb185cc8c26f46f2502a25cb3135389 Mon Sep 17 00:00:00 2001 From: jlam Date: Thu, 30 Mar 2006 18:06:17 +0000 Subject: 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. --- net/libpcap/builtin.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'net/libpcap') diff --git a/net/libpcap/builtin.mk b/net/libpcap/builtin.mk index a4ad5f43a81..cc808181ce0 100644 --- a/net/libpcap/builtin.mk +++ b/net/libpcap/builtin.mk @@ -1,4 +1,4 @@ -# $NetBSD: builtin.mk,v 1.12 2006/02/27 14:20:47 drochner Exp $ +# $NetBSD: builtin.mk,v 1.13 2006/03/30 18:06:18 jlam Exp $ BUILTIN_PKG:= libpcap @@ -13,7 +13,7 @@ BUILTIN_FIND_FILES.H_LIBPCAP= /usr/include/pcap.h ### .if !defined(IS_BUILTIN.libpcap) IS_BUILTIN.libpcap= no -. if empty(H_LIBPCAP:M${LOCALBASE}/*) && exists(${H_LIBPCAP}) +. if empty(H_LIBPCAP:M__nonexistent__) && empty(H_LIBPCAP:M${LOCALBASE}/*) IS_BUILTIN.libpcap= yes . endif .endif @@ -25,7 +25,7 @@ MAKEVARS+= IS_BUILTIN.libpcap ### .if !defined(BUILTIN_PKG.libpcap) && \ !empty(IS_BUILTIN.libpcap:M[yY][eE][sS]) && \ - exists(${H_LIBPCAP}) + empty(H_LIBPCAP:M__nonexistent__) # libpcap>=0.9.3: pcap_setdirection added (don't use pcap_inject, this # was hacked into the NetBSD version of 0.8.3) _BLTN_PCAP_093!= \ -- cgit v1.2.3