[dm-devel] [PATCH 07/16] tests/Makefile: add library dependencies

mwilck at suse.com mwilck at suse.com
Thu Sep 1 16:09:43 UTC 2022


From: Martin Wilck <mwilck at suse.com>

The tests need to be re-run if changes have been made to libmultipath
and other libraries. Add dependencies to take care of that.
Also, the libmultipath.so.0 copy under tests must be rebuilt if anything
changes under libmultipath.

Signed-off-by: Martin Wilck <mwilck at suse.com>
---
 tests/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/Makefile b/tests/Makefile
index e2793d5..3d3b431 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -113,14 +113,14 @@ dep_clean:
 	@sed -n 's/^.*__wrap_\([a-zA-Z0-9_]*\).*$$/-Wl,--wrap=\1/p' $< | \
 		sort -u | tr '\n' ' ' >$@
 
-libmultipath.so.0:
+libmultipath.so.0: $(multipathdir)/libmultipath.so.0
 	make -C $(multipathdir) configdir=$(TESTDIR)/conf.d plugindir=$(TESTDIR)/lib test-lib
 
 # COLON will get expanded during second expansion below
 COLON:=:
 .SECONDEXPANSION:
 %-test:	%.o %.o.wrap $$($$@_OBJDEPS) $$($$@_TESTDEPS) $$($$@_TESTDEPS$$(COLON).o=.o.wrap) \
-		libmultipath.so.0 Makefile
+		libmultipath.so.0 $(mpathutildir)/libmpathutil.so.0 $(mpathcmddir)/libmpathcmd.so.0 Makefile
 	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $< $($@_TESTDEPS) $($@_OBJDEPS) \
 		$(LIBDEPS) $($@_LIBDEPS) \
 		$(shell cat $<.wrap) $(foreach dep,$($@_TESTDEPS),$(shell cat $(dep).wrap))
-- 
2.37.1



More information about the dm-devel mailing list