| 1 | PROJECT_ROOT_DIR := $(CURDIR) |
| 2 | SRC := $(shell git ls-files *.go */*.go) |
| 3 | |
| 4 | .PHONY: bin test test-go test-core test-skipped submodule |
| 5 | |
| 6 | test: test-go test-core |
| 7 | |
| 8 | submodule: |
| 9 | git submodule update --init |
| 10 | |
| 11 | editorconfig: $(SRC) |
| 12 | go build \ |
| 13 | -ldflags "-X main.version=1.99.99" \ |
| 14 | github.com/editorconfig/editorconfig-core-go/v2/cmd/editorconfig |
| 15 | |
| 16 | test-go: |
| 17 | go test -v ./... |
| 18 | |
| 19 | test-core: editorconfig |
| 20 | cd core-test; \ |
| 21 | cmake .. |
| 22 | cd core-test; \ |
| 23 | ctest \ |
| 24 | -E "^(octothorpe_in_value|(backslashed_)*semicolon_or_hash_in_property)$$" \ |
| 25 | --output-on-failure \ |
| 26 | . |
| 27 | |
| 28 | test-skipped: editorconfig |
| 29 | cd core-test; \ |
| 30 | cmake .. |
| 31 | cd core-test; \ |
| 32 | ctest \ |
| 33 | -R "^(octothorpe_in_value)$$" \ |
| 34 | --show-only \ |
| 35 | . |