| Ying Wang | 46b20e7 | 2011-09-29 18:07:41 -0700 | [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 | |
| Ying Wang | 46b20e7 | 2011-09-29 18:07:41 -0700 | [diff] [blame] | 15 | LOCAL_PATH := $(call my-dir) |
| 16 | |
| Roozbeh Pournader | 0e969e2 | 2016-03-09 23:08:45 -0800 | [diff] [blame] | 17 | # Run sanity tests on fonts on checkbuild |
| 18 | checkbuild: fontchain_lint |
| 19 | |
| Nan Zhang | 2db709d | 2017-11-08 20:48:46 -0800 | [diff] [blame] | 20 | FONTCHAIN_LINTER := $(HOST_OUT_EXECUTABLES)/fontchain_linter |
| Roozbeh Pournader | aba60b5 | 2016-12-09 19:21:01 -0800 | [diff] [blame] | 21 | ifeq ($(MINIMAL_FONT_FOOTPRINT),true) |
| Roozbeh Pournader | 27ec3ac | 2016-03-31 13:05:32 -0700 | [diff] [blame] | 22 | CHECK_EMOJI := false |
| 23 | else |
| 24 | CHECK_EMOJI := true |
| 25 | endif |
| Roozbeh Pournader | 0e969e2 | 2016-03-09 23:08:45 -0800 | [diff] [blame] | 26 | |
| Colin Cross | f5de525 | 2017-11-10 20:30:56 -0800 | [diff] [blame] | 27 | fontchain_lint_timestamp := $(call intermediates-dir-for,PACKAGING,fontchain_lint)/stamp |
| 28 | |
| Roozbeh Pournader | 0e969e2 | 2016-03-09 23:08:45 -0800 | [diff] [blame] | 29 | .PHONY: fontchain_lint |
| Colin Cross | f5de525 | 2017-11-10 20:30:56 -0800 | [diff] [blame] | 30 | fontchain_lint: $(fontchain_lint_timestamp) |
| 31 | |
| 32 | fontchain_lint_deps := \ |
| 33 | external/unicode/DerivedAge.txt \ |
| 34 | external/unicode/emoji-data.txt \ |
| 35 | external/unicode/emoji-sequences.txt \ |
| 36 | external/unicode/emoji-variation-sequences.txt \ |
| 37 | external/unicode/emoji-zwj-sequences.txt \ |
| 38 | external/unicode/additions/emoji-data.txt \ |
| 39 | external/unicode/additions/emoji-sequences.txt \ |
| 40 | external/unicode/additions/emoji-zwj-sequences.txt \ |
| 41 | |
| 42 | $(fontchain_lint_timestamp): $(FONTCHAIN_LINTER) $(TARGET_OUT)/etc/fonts.xml $(PRODUCT_OUT)/system.img $(fontchain_lint_deps) |
| 43 | @echo Running fontchain lint |
| Nan Zhang | 2db709d | 2017-11-08 20:48:46 -0800 | [diff] [blame] | 44 | $(FONTCHAIN_LINTER) $(TARGET_OUT) $(CHECK_EMOJI) external/unicode |
| Colin Cross | f5de525 | 2017-11-10 20:30:56 -0800 | [diff] [blame] | 45 | touch $@ |