From f246003ac7f1a9c9f7ad60af2eb277214fc51f4c Mon Sep 17 00:00:00 2001 From: ru Date: Thu, 2 Oct 2003 21:30:30 +0000 Subject: Fix a bug that prevented exists() from finding "foo/", "foo/." and "foo/.." when ".PATH: foo" was also given. PR: bin/34062 --- tools/build/make_check/Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tools/build') diff --git a/tools/build/make_check/Makefile b/tools/build/make_check/Makefile index bf26b44..e7bede7 100644 --- a/tools/build/make_check/Makefile +++ b/tools/build/make_check/Makefile @@ -44,6 +44,9 @@ all: @echo "Running test arith_expr" @${MAKE} arith_expr || ${MAKE} failure @echo "PASS: Test arith_expr detected no regression." + @echo "Running test PATH_exists" + @${MAKE} PATH_exists || ${MAKE} failure + @echo "PASS: Test PATH_exists detected no regression." .if make(double) # Doubly-defined targets. make(1) will warn, but use the "right" one. If it @@ -102,6 +105,14 @@ VALUE= 0 .endif .endif +.if make(PATH_exists) +PATH_exists: +.PATH: ${.CURDIR} +.if !exists(${.CURDIR}/) || !exists(${.CURDIR}/.) || !exists(${.CURDIR}/..) +.error exists() failed +.endif +.endif + failure: @echo "FAIL: Test failed: regression detected. See above." @false -- cgit v1.1