1.DEFAULT_GOAL := build 2 3#------------------------------------------------------------------------------ 4# Variables 5#------------------------------------------------------------------------------ 6 7SHELL := /bin/bash 8BINDIR := bin 9PKG := github.com/envoyproxy/go-control-plane 10 11.PHONY: build 12build: 13 @go build ./pkg/... ./envoy/... 14 15.PHONY: test 16test: 17 @go test ./pkg/... 18 19.PHONY: cover 20cover: 21 @build/coverage.sh 22 23.PHONY: format 24format: 25 @goimports -local $(PKG) -w -l pkg 26 27#----------------- 28#-- integration 29#----------------- 30.PHONY: $(BINDIR)/test integration integration.ads integration.xds integration.rest integration.ads.tls 31 32$(BINDIR)/test: 33 @go build -race -o $@ pkg/test/main/main.go 34 35integration: integration.xds integration.ads integration.rest integration.ads.tls 36 37integration.ads: $(BINDIR)/test 38 env XDS=ads build/integration.sh 39 40integration.xds: $(BINDIR)/test 41 env XDS=xds build/integration.sh 42 43integration.rest: $(BINDIR)/test 44 env XDS=rest build/integration.sh 45 46integration.ads.tls: $(BINDIR)/test 47 env XDS=ads build/integration.sh -tls 48