on master help sign in
improve Makefile for getting test-data

add a target for git and update docs

commitbecdb772afd298a2d1340a30cf3acfea53e75b6f authorKubo Kovac <kuko@ksp.sk> dateSun 29 Oct 2017, 14:29 (9 years ago) parentdcbb74d
2 files changed+13−5
tests-and-benchmarks.markdown+7−4 tests/Makefile+6−1
tests-and-benchmarks.markdown+7−4
@@ -13,10 +13,13 @@ you can clone from one of the following locations:
1313* Git mirror repository:
1414 [github.com/bos/text-test-data](https://github.com/bos/text-test-data)
1515
16−You should clone that repository into the `tests` subdirectory (your
17−clone must be named `text-test-data` locally), then run `make -C
18−tests/text-test-data` to uncompress the test files. Many tests and
19−benchmarks will fail if the test files are missing.
16+You can clone either repository into the `tests` subdirectory using
17+
18+ cd tests/
19+ make text-test-data # to clone from mercurial, OR
20+ make VCS=git text-test-data # to clone from git
21+
22+Many tests and benchmarks will fail if the test files are missing.
2023
2124Functional tests
2225----------------
tests/Makefile+6−1
@@ -1,3 +1,4 @@
1+VCS = hg
12count = 1000
23
34all: coverage literal-rule-test
@@ -12,7 +13,11 @@ build: text-test-data
1213 cabal build
1314
1415text-test-data:
16+ifeq ($(VCS),git)
17+ git clone https://github.com/bos/text-test-data.git
18+else
1519 hg clone https://bitbucket.org/bos/text-test-data
20+endif
1621 $(MAKE) -C text-test-data
1722
1823coverage/text-tests.tix:
@@ -37,4 +42,4 @@ coverage/hpc_index.html: coverage/coverage.tix
3742clean:
3843 rm -rf dist coverage .hpc
3944
40−.PHONY: build coverage all literal-rule-test
45+.PHONY: all build clean coverage literal-rule-test