opnsense-src/contrib/bmake/unit-tests/cond-func-make.mk
Simon J. Gerraty 148ee84570 Merge bmake-20230622
Merge commit '3e39ce563b9ba25883e5aa37d9799eda9e57c1e0'
2023-06-27 13:57:58 -07:00

29 lines
619 B
Makefile

# $NetBSD: cond-func-make.mk,v 1.5 2023/06/23 04:56:54 rillig Exp $
#
# Tests for the make() function in .if conditions, which tests whether
# the argument has been passed as a target via the command line or later
# via the .MAKEFLAGS special dependency target.
.if !make(via-cmdline)
. error
.endif
.if make(via-dot-makeflags)
. error
.endif
.MAKEFLAGS: via-dot-makeflags
.if !make(via-cmdline)
. error
.endif
.if !make(via-dot-makeflags)
. error
.endif
# expect+1: warning: Unfinished character list in pattern argument '[' to function 'make'
.if make([)
. error
.endif
via-cmdline via-dot-makeflags:
: $@