summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2019-04-23 21:18:11 (GMT)
committerDmitry V. Levin <ldv@altlinux.org>2019-04-23 21:18:11 (GMT)
commit0d3f85df651cf298e0a60c646e119e3e5fd90c72 (patch)
treee4425834eb54334daeb73bb2608ce3044c991c32 /tests
parent8069d2ae6ff88fbaeff1c8d5bf1e4d3eedca1d3c (diff)
downloadlz4-0d3f85df651cf298e0a60c646e119e3e5fd90c72.zip
lz4-0d3f85df651cf298e0a60c646e119e3e5fd90c72.tar.gz
lz4-0d3f85df651cf298e0a60c646e119e3e5fd90c72.tar.bz2
test-amalgamation: split the rule
Change test-amalgamation to follow each-rule-makes-a-single-target idiom. Fixes: a7e8d394 ("[amalgamation] add test")
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile14
1 files 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