huangcm
2025-02-26 a813214788f6e7b512df54f1c659cd0bdc9ac175
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
ifeq ($(filter address,$(SANITIZE_HOST)),)
NINJA ?= prebuilts/build-tools/$(HOST_PREBUILT_TAG)/bin/ninja
else
NINJA ?= prebuilts/build-tools/$(HOST_PREBUILT_TAG)/asan/bin/ninja
endif
 
KATI_OUTPUT_PATTERNS := $(OUT_DIR)/build%.ninja $(OUT_DIR)/ninja%.sh
 
# Modifier goals we don't need to pass to Ninja.
NINJA_EXCLUDE_GOALS := all APP-% PRODUCT-%
 
# A list of goals which affect parsing of makefiles and we need to pass to Kati.
PARSE_TIME_MAKE_GOALS := \
   $(PARSE_TIME_MAKE_GOALS) \
   $(dont_bother_goals) \
   all \
   ECLIPSE-% \
   AUX-% \
   boottarball-nodeps \
   brillo_tests \
   btnod \
   build-art% \
   build_kernel-nodeps \
   clean-oat% \
   continuous_instrumentation_tests \
   continuous_native_tests \
   cts \
   custom_images \
   deps-license \
   dicttool_aosp \
   dump-products \
   eng \
   fusion \
   oem_image \
   online-system-api-sdk-docs \
   pdk \
   platform \
   platform-java \
   product-graph \
   samplecode \
   sdk \
   sdk_addon \
   sdk_repo \
   snod \
   stnod \
   systemimage-nodeps \
   systemtarball-nodeps \
   target-files-package \
   test-art% \
   user \
   userdataimage \
   userdebug \
   vts \
   win_sdk \
   winsdk-tools
 
include $(wildcard vendor/*/build/ninja_config.mk)
 
# Any Android goals that need to be built.
ANDROID_GOALS := $(filter-out $(KATI_OUTPUT_PATTERNS) $(CKATI) $(MAKEPARALLEL),\
    $(sort $(ORIGINAL_MAKECMDGOALS) $(MAKECMDGOALS)))
# Goals we need to pass to Ninja.
NINJA_GOALS := $(filter-out $(NINJA_EXCLUDE_GOALS), $(ANDROID_GOALS))
ifndef NINJA_GOALS
  NINJA_GOALS := droid
endif
# Goals we need to pass to Kati.
KATI_GOALS := $(filter $(PARSE_TIME_MAKE_GOALS), $(ANDROID_GOALS))