1 # $NetBSD: cond-func-exists.mk,v 1.6 2020/11/30 20:12:29 rillig Exp $
3 # Tests for the exists() function in .if conditions.
9 # The argument to the function must not be enclosed in quotes.
10 # Neither double quotes nor single quotes are allowed.
19 # The only way to escape characters that would otherwise influence the parser
20 # is to enclose them in a variable expression. For function arguments,
21 # neither the backslash nor the dollar sign act as escape character.
30 # The argument to the function can have several variable expressions.
31 # See cond-func.mk for the characters that cannot be used directly.
32 .if !exists(${.PARSEDIR}/${.PARSEFILE})
36 # Whitespace is trimmed on both sides of the function argument.
41 # The exists function does not really look up the file in the file system,
42 # instead it uses a cache that is preloaded very early, before parsing the
43 # first makefile. At that time, the file did not exist yet.
44 _!= > cond-func-exists.just-created
45 .if exists(cond-func-exists.just-created)
48 _!= rm cond-func-exists.just-created