diff options
| author | Simon J. Gerraty <sjg@FreeBSD.org> | 2023-05-13 17:03:50 +0000 |
|---|---|---|
| committer | Simon J. Gerraty <sjg@FreeBSD.org> | 2023-05-13 17:03:50 +0000 |
| commit | 945078deae448e0a13c34b3393d836087719fb16 (patch) | |
| tree | e286cc89cd1b5fc2f5862555adaa8ec96fe316e1 /unit-tests/forloop.mk | |
| parent | 51d8a8b4ac1dd7265e891149e470a803906de2a7 (diff) | |
Import bmake-20230510vendor/NetBSD/bmake/20230510
Relevant/interesting changes:
o parse.c: don't print null filename in stack traces
o for.c: skip syntactically wrong .for loops
o var.c: allow for :gmtime=${mtime}
add :mtime[=timestamp] where timestamp is used if stat(2)
fails, if :mtime=error stat(2) failure causes error.
o make.1: fix documentation of .PREFIX to match reality and POSIX
o unit-tests: improved var-scope-local
Diffstat (limited to 'unit-tests/forloop.mk')
| -rw-r--r-- | unit-tests/forloop.mk | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/unit-tests/forloop.mk b/unit-tests/forloop.mk deleted file mode 100644 index cef05cbe4c61..000000000000 --- a/unit-tests/forloop.mk +++ /dev/null @@ -1,53 +0,0 @@ -# $NetBSD: forloop.mk,v 1.7 2020/11/03 17:37:57 rillig Exp $ - -all: for-loop - -LIST= one "two and three" four "five" - -.if make(for-fail) -for-fail: - -XTRA_LIST= xtra -.else - -. for x in ${LIST} -. info x=$x -. endfor - -CFL= -I/this -I"This or that" -Ithat "-DTHIS=\"this and that\"" -cfl= -. for x in ${CFL} -. info x=$x -. if empty(cfl) -cfl= $x -. else -cfl+= $x -. endif -. endfor -. info cfl=${cfl} - -. if ${cfl} != ${CFL} -. error ${.newline}${cfl} != ${.newline}${CFL} -. endif - -. for a b in ${EMPTY} -. info a=$a b=$b -. endfor - -# Since at least 1993, iteration stops at the first newline. -# Back then, the .newline variable didn't exist, therefore it was unlikely -# that a newline ever occurred. -. for var in a${.newline}b${.newline}c -. info newline-item=(${var}) -. endfor - -.endif # for-fail - -.for a b in ${LIST} ${LIST:tu} ${XTRA_LIST} -. info a=$a b=$b -.endfor - -for-loop: - @echo We expect an error next: - @(cd ${.CURDIR} && ${.MAKE} -f ${MAKEFILE} for-fail) && \ - { echo "Oops that should have failed!"; exit 1; } || echo OK |
