This commit:
commit 0d119368385a ("ndctl: reorganize file structure, use per sub-directory
makefiles")
reorganized the file structure & makefiles in ndctl, but broke builds that
used the --enable-destructive option. Here are some of the failure
messages:
../test/blk_namespaces.o: In function `test_blk_namespaces':
/root/project/ndctl/ndctl/../test/blk_namespaces.c:222: undefined reference to
`__ndctl_test_attempt'
/root/project/ndctl/ndctl/../test/blk_namespaces.c:250: undefined reference to
`__ndctl_test_skip'
The root cause of this build failure was that when --enable-destructive was
being set, test/core.c wasn't being compiled and included in the build,
hence the undefined references.
Fix the makefile to include test/core.c.
Signed-off-by: Ross Zwisler <ross.zwisler(a)linux.intel.com>
---
ndctl/Makefile.am | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ndctl/Makefile.am b/ndctl/Makefile.am
index 56cd929..47e0044 100644
--- a/ndctl/Makefile.am
+++ b/ndctl/Makefile.am
@@ -53,7 +53,8 @@ endif
if ENABLE_DESTRUCTIVE
ndctl_SOURCES += ../test/blk_namespaces.c \
../test/pmem_namespaces.c \
- ../test/pcommit.c
+ ../test/pcommit.c \
+ ../test/core.c
ndctl_SOURCES += builtin-bat.c
endif
--
2.9.0