1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

tests: fix compilation of unit tests

Rule for TARGET compiling got missing and needs to be explicitely
expressed, otherwise default unsuitable rule is applied.
This commit is contained in:
Zdenek Kabelac 2017-06-06 15:38:45 +02:00
parent ee5ecde35e
commit f91ea96b4f

View File

@ -1,4 +1,4 @@
# Copyright (C) 2011-2015 Red Hat, Inc. All rights reserved.
# Copyright (C) 2011-2017 Red Hat, Inc. All rights reserved.
#
# This file is part of LVM2.
#
@ -24,17 +24,17 @@ UNITS = \
string_t.c\
run.c
ifeq ("@TESTING@", "yes")
SOURCES = $(UNITS)
TARGETS = run
endif
include $(top_builddir)/make.tmpl
ifeq ($(MAKECMDGOALS),distclean)
SOURCES = $(UNITS)
endif
ifeq ("$(TESTING)", "yes")
SOURCES = $(UNITS)
TARGETS = run
endif
ifeq ("$(TESTING)", "yes")
LDLIBS += -ldevmapper @CUNIT_LIBS@
CFLAGS += @CUNIT_CFLAGS@
@ -42,6 +42,8 @@ CFLAGS += @CUNIT_CFLAGS@
check: unit
$(TARGETS): $(OBJECTS) $(top_builddir)/libdm/libdevmapper.$(LIB_SUFFIX)
$(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) -L$(top_builddir)/libdm \
-o $@ $(OBJECTS) $(LDLIBS)
unit: $(TARGETS)
@echo Running unit tests