Skip to content

Commit

Permalink
simplify bindings generation
Browse files Browse the repository at this point in the history
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 containers#8989 by dropping
the use of pushd and popd.

Fixes: containers#8989
Signed-off-by: Valentin Rothberg <[email protected]>
  • Loading branch information
vrothberg authored and Achilleas Tzenetopoulos committed Jan 26, 2021
1 parent 7e03a79 commit 0307600
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 0307600

Please sign in to comment.