]> sourceware.org Git - lvm2.git/commitdiff
tests: fix compilation of unit tests
authorZdenek Kabelac <zkabelac@redhat.com>
Tue, 6 Jun 2017 13:38:45 +0000 (15:38 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Thu, 8 Jun 2017 09:59:02 +0000 (11:59 +0200)
Rule for TARGET compiling got missing and needs to be explicitely
expressed, otherwise default unsuitable rule is applied.

test/unit/Makefile.in

index 70b7e79c13e96d716e54de6ddc4dc755e93c3511..7aa180f9c3940dac2e1e6fca6c5ce96877747747 100644 (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,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
This page took 0.036359 seconds and 5 git commands to generate.