From 2581e470853736444e23e8ccef97a0a38c6236d3 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Thu, 1 Dec 2016 22:43:20 +1100 Subject: [PATCH] Makefile: Remove testdepends from make check dependencies The new Makefile system, via the helper script in tools/gen_deps.sh, when generating the targets to test a module, inserts dependencies meaning it must first check modules this one depends on, whether via 'depends' or 'testdepends' in _info. Although it seems logical, including 'testdepends' is actually incorrect. If ccan/a testepends on ccan/b then ccan/b must be *built* in order to test ccan/a, but it doesn't need to be tested. testepends are explicitly permitted to contain loops - it's quite common for two complementary modules to be used to test each other. This is one of the reasons testdepends exists separate from depends. So, remove testdepends from the generated check dependencies, removing the circular dependency that Make complains about. Signed-off-by: David Gibson --- tools/gen_deps.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/gen_deps.sh b/tools/gen_deps.sh index e38dffab..4429afaa 100755 --- a/tools/gen_deps.sh +++ b/tools/gen_deps.sh @@ -14,7 +14,7 @@ test_srcs=`ls $path/test/*.[ch] 2>/dev/null | tr '\n' ' '` module_objs=`ls $path/*.c 2>/dev/null | sed 's/.c$/.o/g' | tr '\n' ' '` # ... and on the modules this test uses having passed their tests -deps=$(echo `$path/info testdepends` `$path/info depends` | tr ' ' '\n' | \ +deps=$(echo `$path/info depends` | tr ' ' '\n' | \ sort | uniq | sed -e 's/$/\/.ok/g' -e '/^\/.ok$/d' | tr '\n' ' ') # Print the test targets and target aliases -- 2.39.2