btrfs-progs: tests: fix library-test rules and deps
authorDavid Sterba <dsterba@suse.com>
Mon, 20 Feb 2017 13:58:57 +0000 (14:58 +0100)
committerDavid Sterba <dsterba@suse.com>
Wed, 8 Mar 2017 12:00:48 +0000 (13:00 +0100)
The symbol __error was undefined and the rule did not use the
dependencies from the rule definiton, like the rest.

Signed-off-by: David Sterba <dsterba@suse.com>
Makefile

index 2b8e929..67fbc48 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -446,15 +446,15 @@ test-ioctl: ioctl-test ioctl-test-32 ioctl-test-64
        $(Q)./ioctl-test-32 > ioctl-test-32.log
        $(Q)./ioctl-test-64 > ioctl-test-64.log
 
-library-test: library-test.o $(libs_shared)
+library-test: library-test.o messages.o $(libs_shared)
        @echo "    [LD]     $@"
-       $(Q)$(CC) $(CFLAGS) -o $@ library-test.o $(LDFLAGS) -Wl,-rpath=$(TOPDIR) -lbtrfs
+       $(Q)$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) -Wl,-rpath=$(TOPDIR) -lbtrfs
        @echo "    [TEST]   $@"
        $(Q)./$@
 
-library-test.static: library-test.static.o $(libs_static)
+library-test.static: library-test.static.o messages.static.o $(libs_static)
        @echo "    [LD]     $@"
-       $(Q)$(CC) $(STATIC_CFLAGS) -o $@ library-test.static.o $(STATIC_LDFLAGS) $(libs_static) $(STATIC_LIBS)
+       $(Q)$(CC) $(STATIC_CFLAGS) -o $@ $^ $(STATIC_LDFLAGS) $(libs_static) $(STATIC_LIBS)
        @echo "    [TEST]   $@"
        $(Q)./$@