From 2df59829e4613242b1e6cc3154ffbc22a3f05ea3 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Sun, 17 Jan 2021 16:37:55 +0100 Subject: simplify bindings generation Run `go generate ./pkg/bindings/...` once for all bindings instead of generating them separately. This should speed up bindings generation as a given package is visited only once, and it fixes #8989 by dropping the use of pushd and popd. Fixes: #8989 Signed-off-by: Valentin Rothberg --- Makefile | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 9014b81f7..7d307793c 100644 --- a/Makefile +++ b/Makefile @@ -462,15 +462,7 @@ podman-remote-%-release: BINDINGS_SOURCE = $(wildcard pkg/bindings/**/types.go) .generate-bindings: $(BINDINGS_SOURCE) ifneq ($(shell uname -s), Darwin) - for i in $(BINDINGS_SOURCE); do \ - dirname=$$(dirname $${i}); \ - shortname=$$(basename $${dirname}); \ - pushd $${dirname}>/dev/null; \ - echo $${dirname}; \ - echo $(GO) generate; \ - $(GO) generate -mod=vendor; \ - popd > /dev/null; \ - done; + $(GO) generate -mod=vendor ./pkg/bindings/... ; endif touch .generate-bindings -- cgit v1.2.3-54-g00ecf