From 11ec59c8d568bfebcdf4c77e2c90984cc1f06fe8 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Tue, 1 Mar 2011 21:30:43 +0000 Subject: [PATCH] Quick fix to compile lvm2api tests when possible Do not build lvm2api tests when lvm2api lib is not enabled. --- test/api/Makefile.in | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/api/Makefile.in b/test/api/Makefile.in index 4c2e8871f..50f245689 100644 --- a/test/api/Makefile.in +++ b/test/api/Makefile.in @@ -20,11 +20,14 @@ ifeq ("@DEBUG@", "yes") endif TARGETS = +ifeq ("@APPLIB@", "yes") +TARGETS += test test_SOURCES = test.c wrapper_SOURCES = test.c INCLUDES += -I../../include -UNIT = vgtest.t percent.t +TARGETS += vgtest.t percent.t +endif LVMLIBS = @LVM2APP_LIB@ -ldevmapper DEPLIBS = $(top_builddir)/liblvm/liblvm2app.so $(top_builddir)/libdm/libdevmapper.so @@ -44,9 +47,9 @@ test_OBJECTS = $(test_SOURCES:.c=.o) wrapper_OBJECTS = $(wrapper_SOURCES:.c=.o) OBJECTS = $(test_OBJECTS) -all: tests test +all: tests -tests: $(UNIT) +tests: $(TARGETS) test: $(test_OBJECTS) $(DEPLIBS) $(CC) -o test $(test_OBJECTS) $(CFLAGS) $(LDFLAGS) $(LVMLIBS) $(LIBS) $(READLINE_LIBS)