Pawel Wieczorek | cc75291 | 2019-05-26 11:40:36 +0200 | [diff] [blame] | 1 | PROJECT = check |
| 2 | BIN_DIR = bin |
| 3 | BIN = check |
| 4 | |
| 5 | all: run |
| 6 | |
| 7 | run: build |
| 8 | $(BIN_DIR)/$(BIN) |
| 9 | |
| 10 | build: $(BIN) |
| 11 | |
| 12 | $(BIN): export GOPATH = $(shell pwd) |
| 13 | $(BIN): |
| 14 | go install $(PROJECT)/cmd/$(BIN) |
| 15 | |
Pawel Wieczorek | 056ef4c | 2019-07-08 14:17:55 +0200 | [diff] [blame^] | 16 | test: export GOPATH = $(shell pwd) |
| 17 | test: |
| 18 | go test $(PROJECT)/... |
| 19 | |
Pawel Wieczorek | cc75291 | 2019-05-26 11:40:36 +0200 | [diff] [blame] | 20 | clean: |
| 21 | rm $(BIN_DIR)/$(BIN) |
| 22 | rmdir $(BIN_DIR) |
| 23 | |
Pawel Wieczorek | 056ef4c | 2019-07-08 14:17:55 +0200 | [diff] [blame^] | 24 | .PHONY: all run build test clean $(BIN) |