• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1EXPORTER_TOOL=bazel-bin/bazel/exporter_tool/exporter_tool_/exporter_tool
2EXPORTER_RULES=-rule='//src/...' -rule='//modules/...' -rule='//include/...' -rule='//resources/...'
3
4generate:
5	echo "You do not need to run this any more for C++ code, only if you modify go code"
6
7generate_go:
8	cd .. && bazelisk run //infra:gazelle -- update infra/bots/task_drivers modules/canvaskit/go \
9       bazel/device_specific_configs bazel/exporter bazel/deps_parser tools/gpu/gl/interface \
10			 tools/testrunners/common/make_tarball tools/testrunners/common/android/adb_test_runner \
11			 experimental/bazel_test/go
12
13.PHONY: generate_cmake
14generate_cmake:
15	cd .. && bazelisk build //bazel/exporter_tool && ${EXPORTER_TOOL} \
16		-output_format=cmake -proj_name=Skia -rule='//:skia_public'
17
18.PHONY: generate_gni
19generate_gni:
20	# It is tempting to try to put this into a blaze run command. However, that
21	# is currently infeasible due to the fact that the exporter tool *calls*
22	# Bazel, resulting in a deadlock because only one Bazel command can run
23	# at a time.
24	cd .. && bazelisk build //bazel/exporter_tool --config=no_sandbox && \
25        ${EXPORTER_TOOL} -output_format=gni -proj_name=Skia ${EXPORTER_RULES} \
26		&& bazelisk run //bazel/external/gn -- format gn/*.gni modules/*/*.gni
27
28.PHONY: generate_gni_rbe
29generate_gni_rbe:
30	cd .. && bazelisk build //bazel/exporter_tool --config=linux_rbe --jobs=100 \
31 		--platforms=@io_bazel_rules_go//go/toolchain:$(shell bazelisk run //bazel/utils:go_platform) \
32 		--remote_download_toplevel && \
33        ${EXPORTER_TOOL} -output_format=gni -proj_name=Skia ${EXPORTER_RULES} \
34		&& bazelisk run //bazel/external/gn -- format gn/*.gni modules/*/*.gni
35
36.PHONY: mocks
37mocks:
38	go generate ./...
39
40# This target should be run after the go.mod file is updated (e.g. version rolls or new updates)
41gazelle_update_repo:
42	cd .. && bazelisk run //infra:gazelle -- update-repos -from_file=go.mod -to_macro=go_repositories.bzl%go_repositories -prune
43