mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-22 10:48:02 +00:00
![Simon J. Gerraty](/assets/img/avatar_default.png)
o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable checks in InitObjdir. Explicit .OBJDIR target always allows read-only directory. o Fix building and unit-tests on non-BSD. o More code cleanup and refactoring. o More unit tests
60 lines
1.1 KiB
Makefile
60 lines
1.1 KiB
Makefile
# $NetBSD: cond-op-not.mk,v 1.6 2020/11/15 14:58:14 rillig Exp $
|
|
#
|
|
# Tests for the ! operator in .if conditions, which negates its argument.
|
|
|
|
# The exclamation mark negates its operand.
|
|
.if !1
|
|
. error
|
|
.endif
|
|
|
|
# Exclamation marks can be chained.
|
|
# This doesn't happen in practice though.
|
|
.if !!!1
|
|
. error
|
|
.endif
|
|
|
|
# The ! binds more tightly than the &&.
|
|
.if !!0 && 1
|
|
. error
|
|
.endif
|
|
|
|
# The operator '==' binds more tightly than '!'.
|
|
# This is unusual since most other programming languages define the precedence
|
|
# to be the other way round.
|
|
.if !${:Uexpression} == "expression"
|
|
. error
|
|
.endif
|
|
|
|
.if !${:U}
|
|
. info Not empty evaluates to true.
|
|
.else
|
|
. info Not empty evaluates to false.
|
|
.endif
|
|
|
|
.if !${:U }
|
|
. info Not space evaluates to true.
|
|
.else
|
|
. info Not space evaluates to false.
|
|
.endif
|
|
|
|
.if !${:U0}
|
|
. info Not 0 evaluates to true.
|
|
.else
|
|
. info Not 0 evaluates to false.
|
|
.endif
|
|
|
|
.if !${:U1}
|
|
. info Not 1 evaluates to true.
|
|
.else
|
|
. info Not 1 evaluates to false.
|
|
.endif
|
|
|
|
.if !${:Uword}
|
|
. info Not word evaluates to true.
|
|
.else
|
|
. info Not word evaluates to false.
|
|
.endif
|
|
|
|
all:
|
|
@:;
|