From 0d3f85df651cf298e0a60c646e119e3e5fd90c72 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Tue, 23 Apr 2019 21:18:11 +0000 Subject: [PATCH] test-amalgamation: split the rule Change test-amalgamation to follow each-rule-makes-a-single-target idiom. Fixes: a7e8d394 ("[amalgamation] add test") --- tests/Makefile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index 36cb26a..8f0dfd3 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -114,7 +114,7 @@ clean: frametest$(EXT) frametest32$(EXT) \ fasttest$(EXT) roundTripTest$(EXT) \ datagen$(EXT) checkTag$(EXT) \ - frameTest$(EXT) + frameTest$(EXT) lz4_all.c @$(RM) -rf $(TESTDIR) @echo Cleaning completed @@ -156,11 +156,13 @@ test: test-lz4 test-lz4c test-frametest test-fullbench test-fuzzer test-install test32: CFLAGS+=-m32 test32: test -.PHONY: test-amalgamation -test-amalgamation: $(LZ4DIR)/lz4.c $(LZ4DIR)/lz4hc.c $(LZ4DIR)/lz4frame.c - cat $^ > lz4_all.c - $(CC) $(CFLAGS) $(CPPFLAGS) -c lz4_all.c - $(RM) lz4_all.c +test-amalgamation: lz4_all.o + +lz4_all.o: lz4_all.c + $(CC) $(CFLAGS) $(CPPFLAGS) -c $^ -o $@ + +lz4_all.c: $(LZ4DIR)/lz4.c $(LZ4DIR)/lz4hc.c $(LZ4DIR)/lz4frame.c + cat $^ > $@ test-install: lz4 lib liblz4.pc lz4_root=.. ./test_install.sh