[bazel] Add "gazelle" Make target.
Bug: skia:11110
Change-Id: I63bc937adce07d8dbefe9f78f947852c7f152029
Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/373837
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
diff --git a/Makefile b/Makefile
index d1b2c71..08d6041 100644
--- a/Makefile
+++ b/Makefile
@@ -147,17 +147,18 @@
cd fiddlek && $(MAKE) test-frontend-ci
cd status && $(MAKE) test-frontend-ci
-# Directories with Go code for which we generate Bazel build targets with Gazelle.
-GAZELLE_DIRS=./
.PHONY: update-go-bazel-files
update-go-bazel-files:
- bazel run //:gazelle -- update $(GAZELLE_DIRS)
+ bazel run //:gazelle -- update ./
.PHONY: update-go-bazel-deps
update-go-bazel-deps:
bazel run //:gazelle -- update-repos -from_file=go.mod -to_macro=go_repositories.bzl%go_repositories
+.PHONY: gazelle
+gazelle: update-go-bazel-deps update-go-bazel-files
+
# Known good Bazel build targets.
#
# Targets can be excluded by prefixing them with a dash, e.g. -//perf, -//gold, etc.