From 0629d5e958497692055757b8da8fc1d7eb99c1ee Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Thu, 15 May 2014 15:45:45 +0000 Subject: [PATCH] Makefile.inc is also included by the tests subdirectory, which results in SUBDIRS having tests added to it, which fails. Work around this by checking to make sure tests exists before adding it to subdirs and work to get the generated file fixed so we can rename Makefile.inc to something else so it isn't automatically included by subdirs... --- usr.bin/bmake/Makefile.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usr.bin/bmake/Makefile.inc b/usr.bin/bmake/Makefile.inc index 89c5f61f4d7a..ad7faad29f96 100644 --- a/usr.bin/bmake/Makefile.inc +++ b/usr.bin/bmake/Makefile.inc @@ -13,7 +13,10 @@ PROG= make NO_SHARED?= YES .endif -.if defined(MK_TESTS) && ${MK_TESTS} != no +# hack to not add tests to tests subdir since this is included from +# there and to avoid renaming things that require changes to generated +# files. +.if defined(MK_TESTS) && ${MK_TESTS} != no && exists(${.CURDIR}/tests) SUBDIR+= tests .endif