github.com/felipejfc/helm@v2.1.2+incompatible/_proto/Makefile (about) 1 space := $(empty) $(empty) 2 comma := , 3 empty := 4 5 import_path = k8s.io/helm/pkg/proto/hapi 6 7 dst = ../pkg/proto 8 target = go 9 plugins = grpc 10 11 chart_ias = $(subst $(space),$(comma),$(addsuffix =$(import_path)/$(chart_pkg),$(addprefix M,$(chart_pbs)))) 12 chart_pbs = $(sort $(wildcard hapi/chart/*.proto)) 13 chart_pkg = chart 14 15 release_ias = $(subst $(space),$(comma),$(addsuffix =$(import_path)/$(release_pkg),$(addprefix M,$(release_pbs)))) 16 release_pbs = $(sort $(wildcard hapi/release/*.proto)) 17 release_pkg = release 18 19 services_ias = $(subst $(space),$(comma),$(addsuffix =$(import_path)/$(services_pkg),$(addprefix M,$(services_pbs)))) 20 services_pbs = $(sort $(wildcard hapi/services/*.proto)) 21 services_pkg = services 22 23 version_ias = $(subst $(space),$(comma),$(addsuffix =$(import_path)/$(version_pkg),$(addprefix M,$(version_pbs)))) 24 version_pbs = $(sort $(wildcard hapi/version/*.proto)) 25 version_pkg = version 26 27 google_deps = Mgoogle/protobuf/timestamp.proto=github.com/golang/protobuf/ptypes/timestamp,Mgoogle/protobuf/any.proto=github.com/golang/protobuf/ptypes/any 28 29 .PHONY: all 30 all: chart release services version 31 32 chart: 33 PATH=../bin:$(PATH) protoc --$(target)_out=plugins=$(plugins),$(google_deps),$(chart_ias):$(dst) $(chart_pbs) 34 35 release: 36 PATH=../bin:$(PATH) protoc --$(target)_out=plugins=$(plugins),$(google_deps),$(chart_ias),$(version_ias):$(dst) $(release_pbs) 37 38 services: 39 PATH=../bin:$(PATH) protoc --$(target)_out=plugins=$(plugins),$(google_deps),$(chart_ias),$(version_ias),$(release_ias):$(dst) $(services_pbs) 40 41 version: 42 PATH=../bin:$(PATH) protoc --$(target)_out=plugins=$(plugins),$(google_deps):$(dst) $(version_pbs) 43 44 .PHONY: clean 45 clean: 46 @rm -rf $(dst)/hapi 2>/dev/null