Makefile: build t/fio-dedupe only if zlib support is found
authorVincent Fu <vincent.fu@samsung.com>
Fri, 28 Jan 2022 21:46:37 +0000 (21:46 +0000)
committerJens Axboe <axboe@kernel.dk>
Fri, 28 Jan 2022 21:49:09 +0000 (14:49 -0700)
df284fbdc23974c931865a8ddb7d171606b3c778 added zlib support as a
requirement for building fio-dedupe.

The current patch changes the Makefile to avoid trying to build
fio-dedupe when zlib support is not present.

Link: https://lore.kernel.org/fio/51b79acb-c314-143b-514c-a22ff9462829@gmail.com/T/#u
Reported-by: Professor Pro <annivation@gmail.com>
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Link: https://lore.kernel.org/r/20220128214611.165312-1-vincent.fu@samsung.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Makefile

index 00e7953918a337275e0949108a16b0d9b9677a55..2432f5192f8eb63295a382108f6f1be3f29cdbb2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -430,7 +430,9 @@ T_TEST_PROGS += $(T_AXMAP_PROGS)
 T_TEST_PROGS += $(T_LFSR_TEST_PROGS)
 T_TEST_PROGS += $(T_GEN_RAND_PROGS)
 T_PROGS += $(T_BTRACE_FIO_PROGS)
+ifdef CONFIG_ZLIB
 T_PROGS += $(T_DEDUPE_PROGS)
+endif
 T_PROGS += $(T_VS_PROGS)
 T_TEST_PROGS += $(T_MEMLOCK_PROGS)
 ifdef CONFIG_PREAD
@@ -618,8 +620,10 @@ t/fio-btrace2fio: $(T_BTRACE_FIO_OBJS)
        $(QUIET_LINK)$(CC) $(LDFLAGS) -o $@ $(T_BTRACE_FIO_OBJS) $(LIBS)
 endif
 
+ifdef CONFIG_ZLIB
 t/fio-dedupe: $(T_DEDUPE_OBJS)
        $(QUIET_LINK)$(CC) $(LDFLAGS) -o $@ $(T_DEDUPE_OBJS) $(LIBS)
+endif
 
 t/fio-verify-state: $(T_VS_OBJS)
        $(QUIET_LINK)$(CC) $(LDFLAGS) -o $@ $(T_VS_OBJS) $(LIBS)