Nelson Li | 6a699c8 | 2024-01-19 06:59:22 +0000 | [diff] [blame] | 1 | # Copyright (C) 2011 The Android Open Source Project |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | # Run sanity tests on fonts on checkbuild |
| 16 | checkbuild: fontchain_lint |
| 17 | |
| 18 | FONTCHAIN_LINTER := $(HOST_OUT_EXECUTABLES)/fontchain_linter |
| 19 | ifeq ($(MINIMAL_FONT_FOOTPRINT),true) |
| 20 | CHECK_EMOJI := false |
| 21 | else |
| 22 | CHECK_EMOJI := true |
| 23 | endif |
| 24 | |
| 25 | fontchain_lint_timestamp := $(call intermediates-dir-for,PACKAGING,fontchain_lint)/stamp |
| 26 | |
| 27 | .PHONY: fontchain_lint |
| 28 | fontchain_lint: $(fontchain_lint_timestamp) |
| 29 | |
| 30 | fontchain_lint_deps := \ |
| 31 | external/unicode/DerivedAge.txt \ |
| 32 | external/unicode/emoji-data.txt \ |
| 33 | external/unicode/emoji-sequences.txt \ |
| 34 | external/unicode/emoji-variation-sequences.txt \ |
| 35 | external/unicode/emoji-zwj-sequences.txt \ |
| 36 | external/unicode/additions/emoji-data.txt \ |
| 37 | external/unicode/additions/emoji-sequences.txt \ |
| 38 | external/unicode/additions/emoji-zwj-sequences.txt \ |
| 39 | |
| 40 | $(fontchain_lint_timestamp): $(FONTCHAIN_LINTER) $(TARGET_OUT)/etc/fonts.xml $(PRODUCT_OUT)/system.img $(fontchain_lint_deps) |
| 41 | @echo Running fontchain lint |
| 42 | $(FONTCHAIN_LINTER) $(TARGET_OUT) $(CHECK_EMOJI) external/unicode |
| 43 | touch $@ |