-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
44 lines (37 loc) · 778 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
mainprogram=run
ifndef inpath
override inpath = ./tests/testdata/test.csv
endif
ifndef outpath
override outpath = result.csv
endif
.PHONY: build
build:
@go build \
-o $(mainprogram) cmd/fareestimation/main.go
.PHONY: run
run:
make build
@./$(mainprogram) \
-inpath=${inpath} \
-outpath=${outpath}
.PHONY: test
test:
@go test -v -cover ./...
.PHONY: runall
runall:
make test
make run
.PHONY: help
help:
@echo ""
@echo "Available tasks:"
@echo " build"
@echo " code compilation"
@echo " test"
@echo " run all tests"
@echo " run inpath=./tests/testdata/file.csv outpath=result.csv"
@echo " build and run"
@echo " runall inpath=./tests/testdata/file.csv outpath=result.csv"
@echo " test, build and run"
@echo ""