master - tests: fix compilation of unit tests
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=f91ea96b4f221894008d196c1f87b93527c51311 Commit: f91ea96b4f221894008d196c1f87b93527c51311 Parent: ee5ecde35eca656e85ee5c83b15ad4029d0acf4d Author: Zdenek Kabelac <[email protected]> AuthorDate: Tue Jun 6 15:38:45 2017 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Thu Jun 8 11:59:02 2017 +0200
tests: fix compilation of unit tests
Rule for TARGET compiling got missing and needs to be explicitely expressed, otherwise default unsuitable rule is applied.
--- test/unit/Makefile.in | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-)
test/unit/Makefile.in +8 -6
@@ -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,15 +24,15 @@ UNITS = \ string_t.c\ run.c -include $(top_builddir)/make.tmpl - -ifeq ($(MAKECMDGOALS),distclean) +ifeq ("@TESTING@", "yes") SOURCES = $(UNITS) +TARGETS = run endif -ifeq ("$(TESTING)", "yes") +include $(top_builddir)/make.tmpl + +ifeq ($(MAKECMDGOALS),distclean) SOURCES = $(UNITS) -TARGETS = run endif ifeq ("$(TESTING)", "yes")
@@ -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