Debian Codegraph @

Makefile

raw
1 # Copyright 2015 Google Inc. All Rights Reserved.
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 all: v2
16
17 v2:
18 PYTHONPATH=$(PYTHONPATH):$(CURDIR)/scripts/lib python scripts/build-v2.py
19
20 crunch:
21 mkdir -p out/crunched
22 cd third_party/fontcrunch && \
23 for source in ../../out/RobotoTTF/*.ttf ../../out/RobotoCondensedTTF/*.ttf; do \
24 python fontcrunch.py gen $$source; \
25 done && \
26 $(MAKE) -j8 && \
27 for source in ../../out/RobotoTTF/*.ttf ../../out/RobotoCondensedTTF/*.ttf; do \
28 python fontcrunch.py pack $$source ../../out/crunched/$$(basename $$source) >/dev/null; \
29 done
30
31 android:
32 mkdir -p out/android
33 for source in out/crunched/*.ttf; do \
34 touched=$$(mktemp); \
35 subsetted=$$(mktemp); \
36 final=out/android/$$(basename $$source); \
37 python scripts/touchup_for_android.py $$source $$touched && \
38 python $$HOME/noto/nototools/subset.py $$touched $$subsetted && \
39 python scripts/force_yminmax.py $$subsetted $$final && \
40 rm $$touched $$subsetted; \
41 done
42
43 # TODO: remove this build target once we are comfortable with the quality of
44 # the new toolchain
45 android-from-hinted:
46 mkdir -p out/android
47 for source in src/hinted/*.ttf; do \
48 unhinted=$$(mktemp); \
49 touched=$$(mktemp); \
50 subsetted=$$(mktemp); \
51 final=out/android/$$(basename $$source); \
52 python $$HOME/noto/nototools/drop_hints.py $$source $$unhinted && \
53 python scripts/touchup_for_android.py $$unhinted $$touched && \
54 python $$HOME/noto/nototools/subset.py $$touched $$subsetted && \
55 python scripts/force_yminmax.py $$subsetted $$final && \
56 rm $$touched $$subsetted; \
57 done
58
59 web:
60 mkdir -p out/web
61 for source in src/hinted/*.ttf; do \
62 basename=$$(basename $$source); \
63 case $$source in \
64 src/hinted/Roboto-*) unhinted=out/RobotoTTF/$$basename ;; \
65 *) unhinted=out/RobotoCondensedTTF/$$basename ;; \
66 esac; \
67 touched=$$(mktemp); \
68 final=out/web/$$(basename $$source); \
69 python scripts/touchup_for_web.py $$source $$unhinted $$touched Roboto && \
70 python scripts/subset_for_web.py $$touched $$final && \
71 rm $$touched; \
72 done
73
74 chromeos:
75 mkdir -p out/chromeos
76 for source in src/hinted/*.ttf; do \
77 basename=$$(basename $$source); \
78 case $$source in \
79 src/hinted/Roboto-*) unhinted=out/RobotoTTF/$$basename ;; \
80 *) unhinted=out/RobotoCondensedTTF/$$basename ;; \
81 esac; \
82 touched=$$(mktemp); \
83 final=out/chromeos/$$(basename $$source); \
84 python scripts/touchup_for_cros.py $$source $$unhinted $$touched Roboto && \
85 python $$HOME/noto/nototools/subset.py $$touched $$final && \
86 rm $$touched; \
87 done
88
89 test: test-android test-coverage test-general
90
91 test-general:
92 python scripts/run_general_tests.py
93
94 test-exhaustive:
95 python scripts/run_exhaustive_tests.py
96
97 test-android:
98 python scripts/run_android_tests.py
99
100 test-web:
101 python scripts/run_web_tests.py
102
103 test-coverage:
104 python scripts/coverage_test.py