| 1 |
EXPORTER_TOOL=bazel-bin/bazel/exporter_tool/exporter_tool_/exporter_tool |
| 2 |
EXPORTER_RULES=-rule='//src/...' -rule='//modules/...' -rule='//include/...' -rule='//resources/...' -rule='//rust/...' -rule='//experimental/...' |
| 3 |
|
| 4 |
generate_go: |
| 5 |
cd .. && bazelisk run //infra:gazelle -- update infra/bots/task_drivers modules/canvaskit/go \ |
| 6 |
bazel/device_specific_configs bazel/exporter bazel/deps_parser tools/ganesh/gl/interface |
| 7 |
|
| 8 |
.PHONY: gazelle |
| 9 |
gazelle: generate_go |
| 10 |
|
| 11 |
.PHONY: generate_cmake |
| 12 |
generate_cmake: |
| 13 |
cd .. && bazelisk build //bazel/exporter_tool && ${EXPORTER_TOOL} \ |
| 14 |
-output_format=cmake -proj_name=Skia -rule='//:core' |
| 15 |
|
| 16 |
.PHONY: generate_gni |
| 17 |
generate_gni: |
| 18 |
# It is tempting to try to put this into a blaze run command. However, that |
| 19 |
# is currently infeasible due to the fact that the exporter tool *calls* |
| 20 |
# Bazel, resulting in a deadlock because only one Bazel command can run |
| 21 |
# at a time. |
| 22 |
cd .. && bazelisk build //bazel/exporter_tool && \ |
| 23 |
${EXPORTER_TOOL} -output_format=gni -proj_name=Skia ${EXPORTER_RULES} \ |
| 24 |
&& bazelisk run //bazel/external/gn -- format gn/*.gni modules/*/*.gni |
| 25 |
|
| 26 |
HOST_GO_ARCH := $(shell bazelisk run //:go -- version | awk '{print $$NF}' | sed 's/\//_/g') |
| 27 |
|
| 28 |
.PHONY: generate_gni_rbe |
| 29 |
generate_gni_rbe: |
| 30 |
cd .. && bazelisk build //bazel/exporter_tool --config=linux_rbe --jobs=100 \ |
| 31 |
--platforms=@rules_go//go/toolchain:$(HOST_GO_ARCH) \ |
| 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 |
| 37 |
mocks: |
| 38 |
go generate ./... |
| 39 |
|
| 40 |
generate_third_party_patches: |
| 41 |
cd .. && python3 tools/generate_patches.py \ |
| 42 |
third_party/freetype2/include/freetype-android/freetype/config/ftmodule.h builds/android-ftmodule.h \ |
| 43 |
third_party/freetype2/include/freetype-android/freetype/config/ftoption.h builds/android-ftoption.h \ |
| 44 |
third_party/freetype2/include/freetype-no-type1/freetype/config/ftmodule.h builds/no-type1-ftmodule.h \ |
| 45 |
third_party/freetype2/include/freetype-no-type1/freetype/config/ftoption.h builds/no-type1-ftoption.h \ |
| 46 |
> bazel/external/freetype/config_files.patch |
| 47 |
|
| 48 |
cd .. && python3 tools/generate_patches.py \ |
| 49 |
third_party/expat/include/expat_config/expat_config.h expat_config.h \ |
| 50 |
> bazel/external/expat/config_files.patch |
| 51 |
|
| 52 |
cd .. && python3 tools/generate_patches.py \ |
| 53 |
third_party/harfbuzz/config-override.h config-override.h \ |
| 54 |
> bazel/external/harfbuzz/config_files.patch |
| 55 |
|
| 56 |
cd .. && python3 tools/generate_patches.py \ |
| 57 |
third_party/icu/SkLoadICU.cpp SkLoadICU.cpp \ |
| 58 |
third_party/icu/SkLoadICU.h SkLoadICU.h \ |
| 59 |
third_party/icu/make_data_cpp.py make_data_cpp.py \ |
| 60 |
> bazel/external/icu/icu_utils.patch |