e7f978fc259b4841714149d811ed366a5e9ffe77
[integration.git] / test / security / k8s / Makefile
1 PROJECT = check
2 BIN_DIR = bin
3 SRC_DIR = src
4 PKG_DIR = pkg
5 BIN = check
6
7 all: run
8
9 run: build
10         $(BIN_DIR)/$(BIN)
11
12 build: $(BIN)
13
14 $(BIN): export GOPATH = $(shell pwd)
15 $(BIN): deps
16         go install $(PROJECT)/cmd/$(BIN)
17
18 deps: export GOPATH = $(shell pwd)
19 deps:
20         go get $(PROJECT)/...
21
22 clean_deps: export GOPATH = $(shell pwd)
23 clean_deps:
24         go clean -i -r $(PROJECT)/... 2>/dev/null || true
25
26 test: export GOPATH = $(shell pwd)
27 test:
28         go test $(PROJECT)/...
29
30 clean: clean_deps
31         -rmdir $(BIN_DIR)
32         rm -rf $(PKG_DIR)
33         find $(SRC_DIR) -mindepth 1 -maxdepth 1 ! -name $(PROJECT) -exec rm -rf {} +
34
35 .PHONY: all run build deps clean_deps test clean $(BIN)