]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
test: include all objects in prerequisites of unit tests
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 13 Sep 2018 08:24:06 +0000 (10:24 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 13 Sep 2018 09:23:16 +0000 (11:23 +0200)
test/unit/Makefile.in

index 61ab7417813d2a3b1b198211a2f4ffb83d714234..333365ac05c66e0cd551ea34d5cfad3fd413161f 100644 (file)
@@ -16,8 +16,10 @@ CHRONYD_OBJS := $(patsubst %.o,$(CHRONY_SRCDIR)/%.o,$(filter-out main.o,\
 
 all: $(TESTS)
 
-%.test: %.o $(SHARED_OBJS)
-       $(CC) $(CFLAGS) -o $@ $^ $(CHRONYD_OBJS:%/$*.o=) $(LDFLAGS)
+$(CHRONY_OBJS): ;
+
+%.test: %.o $(SHARED_OBJS) $(CHRONYD_OBJS)
+       $(CC) $(CFLAGS) -o $@ $(filter-out $(CHRONY_SRCDIR)/$<,$^) $(LDFLAGS)
 
 %.o: %.c
        $(CC) $(CPPFLAGS) $(CFLAGS) -c $<