1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

Quick fix to compile lvm2api tests when possible

Do not build lvm2api tests when lvm2api lib is not enabled.
This commit is contained in:
Zdenek Kabelac 2011-03-01 21:30:43 +00:00
parent cbedb99e4c
commit 11ec59c8d5

View File

@ -20,11 +20,14 @@ ifeq ("@DEBUG@", "yes")
endif endif
TARGETS = TARGETS =
ifeq ("@APPLIB@", "yes")
TARGETS += test
test_SOURCES = test.c test_SOURCES = test.c
wrapper_SOURCES = test.c wrapper_SOURCES = test.c
INCLUDES += -I../../include INCLUDES += -I../../include
UNIT = vgtest.t percent.t TARGETS += vgtest.t percent.t
endif
LVMLIBS = @LVM2APP_LIB@ -ldevmapper LVMLIBS = @LVM2APP_LIB@ -ldevmapper
DEPLIBS = $(top_builddir)/liblvm/liblvm2app.so $(top_builddir)/libdm/libdevmapper.so 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) wrapper_OBJECTS = $(wrapper_SOURCES:.c=.o)
OBJECTS = $(test_OBJECTS) OBJECTS = $(test_OBJECTS)
all: tests test all: tests
tests: $(UNIT) tests: $(TARGETS)
test: $(test_OBJECTS) $(DEPLIBS) test: $(test_OBJECTS) $(DEPLIBS)
$(CC) -o test $(test_OBJECTS) $(CFLAGS) $(LDFLAGS) $(LVMLIBS) $(LIBS) $(READLINE_LIBS) $(CC) -o test $(test_OBJECTS) $(CFLAGS) $(LDFLAGS) $(LVMLIBS) $(LIBS) $(READLINE_LIBS)