]>
Commit | Line | Data |
---|---|---|
a672b071 IN |
1 | .PHONY: test |
2 | GITHUB_ORG_URI := https://github.com/yaml | |
3 | TEST_SUITE_URL := $(GITHUB_ORG_URI)/yaml-test-suite | |
4 | LIBYAML_DIR ?= $(PWD)/libyaml-parser-emitter/libyaml | |
5 | ||
6 | default: help | |
7 | ||
8 | help: | |
9 | @echo 'test - Run the tests' | |
10 | @echo 'clean - Remove generated files' | |
11 | @echo 'help - Show help' | |
12 | ||
13 | # Depends on parser and emitter but, building parser will also build emitter. | |
14 | # Building twice makes things fail. Note: Some environments like on OS X, the | |
15 | # shell resets the {DY,}LD_LIBRARY_PATH vars, so we work around it like so: | |
16 | test: data src/libyaml-parser | |
17 | (export MY_LD_LIBRARY_PATH=$(LIBYAML_DIR)/src/.libs; prove -lv test) | |
18 | ||
19 | clean: | |
20 | rm -fr data | |
21 | ||
22 | data: | |
23 | git clone $(TEST_SUITE_URL) $@ --branch=$@ | |
24 | ||
25 | %/libyaml-parser %/libyaml-emitter: % | |
048095f0 IN |
26 | (cd $<; make clean build) |
27 | (cd $<; make clean build) | |
a672b071 IN |
28 | |
29 | libyaml-parser-emitter: | |
30 | git clone $(GITHUB_ORG_URI)/$@ $@ |