diff options
author | jlam <jlam> | 2006-03-30 18:06:17 +0000 |
---|---|---|
committer | jlam <jlam> | 2006-03-30 18:06:17 +0000 |
commit | a35f9b4747edb8252e3b814ea5580fd22f62dc6b (patch) | |
tree | a4e8c404ab7153a9727f5d7f913a25bdd6b97971 /devel/readline | |
parent | a363c62fe6f0f041b9e87d700fa75aa44358a5d9 (diff) | |
download | pkgsrc-a35f9b4747edb8252e3b814ea5580fd22f62dc6b.tar.gz |
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 (limited to 'devel/readline')
-rw-r--r-- | devel/readline/builtin.mk | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/devel/readline/builtin.mk b/devel/readline/builtin.mk index 3308cff2603..d41ae59c8c1 100644 --- a/devel/readline/builtin.mk +++ b/devel/readline/builtin.mk @@ -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_LIBS:= edit readline 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 @@ BUILTIN_FIND_GREP.H_READLINE= \#define[ ]*RL_VERSION_MAJOR ### .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 @@ MAKEVARS+= IS_BUILTIN.readline ### .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 @@ USE_BUILTIN.readline!= \ # 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 # |