Dan Willemsen | 04f53ed | 2016-11-09 17:22:15 -0800 | [diff] [blame] | 1 | ifeq ($(filter address,$(SANITIZE_HOST)),) |
| 2 | NINJA ?= prebuilts/build-tools/$(HOST_PREBUILT_TAG)/bin/ninja |
| 3 | else |
| 4 | NINJA ?= prebuilts/build-tools/$(HOST_PREBUILT_TAG)/asan/bin/ninja |
| 5 | endif |
| 6 | |
| 7 | KATI_OUTPUT_PATTERNS := $(OUT_DIR)/build%.ninja $(OUT_DIR)/ninja%.sh |
| 8 | |
| 9 | # Modifier goals we don't need to pass to Ninja. |
Dan Willemsen | 8a5d597 | 2019-07-29 14:22:05 -0700 | [diff] [blame] | 10 | NINJA_EXCLUDE_GOALS := all |
Dan Willemsen | 04f53ed | 2016-11-09 17:22:15 -0800 | [diff] [blame] | 11 | |
| 12 | # A list of goals which affect parsing of makefiles and we need to pass to Kati. |
| 13 | PARSE_TIME_MAKE_GOALS := \ |
| 14 | $(PARSE_TIME_MAKE_GOALS) \ |
| 15 | $(dont_bother_goals) \ |
| 16 | all \ |
Dan Willemsen | 04f53ed | 2016-11-09 17:22:15 -0800 | [diff] [blame] | 17 | ECLIPSE-% \ |
Dan Willemsen | 04f53ed | 2016-11-09 17:22:15 -0800 | [diff] [blame] | 18 | brillo_tests \ |
| 19 | btnod \ |
Roland Levillain | 209b96e | 2018-03-07 16:24:54 +0000 | [diff] [blame] | 20 | build-art% \ |
Dan Willemsen | 04f53ed | 2016-11-09 17:22:15 -0800 | [diff] [blame] | 21 | build_kernel-nodeps \ |
Roland Levillain | 209b96e | 2018-03-07 16:24:54 +0000 | [diff] [blame] | 22 | clean-oat% \ |
Dan Willemsen | 04f53ed | 2016-11-09 17:22:15 -0800 | [diff] [blame] | 23 | continuous_instrumentation_tests \ |
| 24 | continuous_native_tests \ |
| 25 | cts \ |
| 26 | custom_images \ |
Dan Willemsen | 04f53ed | 2016-11-09 17:22:15 -0800 | [diff] [blame] | 27 | dicttool_aosp \ |
Anton Hansson | 7b2b0b2 | 2022-10-07 16:21:04 +0000 | [diff] [blame] | 28 | docs \ |
Dan Willemsen | 04f53ed | 2016-11-09 17:22:15 -0800 | [diff] [blame] | 29 | eng \ |
Dan Willemsen | 04f53ed | 2016-11-09 17:22:15 -0800 | [diff] [blame] | 30 | oem_image \ |
| 31 | online-system-api-sdk-docs \ |
Dan Willemsen | 04f53ed | 2016-11-09 17:22:15 -0800 | [diff] [blame] | 32 | product-graph \ |
| 33 | samplecode \ |
| 34 | sdk \ |
| 35 | sdk_addon \ |
| 36 | sdk_repo \ |
Dan Willemsen | 04f53ed | 2016-11-09 17:22:15 -0800 | [diff] [blame] | 37 | stnod \ |
Roland Levillain | 209b96e | 2018-03-07 16:24:54 +0000 | [diff] [blame] | 38 | test-art% \ |
Dan Willemsen | 04f53ed | 2016-11-09 17:22:15 -0800 | [diff] [blame] | 39 | user \ |
| 40 | userdataimage \ |
Dan Willemsen | 39b81cd | 2021-09-16 14:23:07 -0700 | [diff] [blame] | 41 | userdebug |
Dan Willemsen | 04f53ed | 2016-11-09 17:22:15 -0800 | [diff] [blame] | 42 | |
Dan Willemsen | 1ff5fa1 | 2016-11-10 19:41:27 -0800 | [diff] [blame] | 43 | include $(wildcard vendor/*/build/ninja_config.mk) |
| 44 | |
Dan Willemsen | 04f53ed | 2016-11-09 17:22:15 -0800 | [diff] [blame] | 45 | # Any Android goals that need to be built. |
Dan Willemsen | 8939489 | 2019-07-29 22:39:08 -0700 | [diff] [blame] | 46 | ANDROID_GOALS := $(filter-out $(KATI_OUTPUT_PATTERNS),\ |
Dan Willemsen | 04f53ed | 2016-11-09 17:22:15 -0800 | [diff] [blame] | 47 | $(sort $(ORIGINAL_MAKECMDGOALS) $(MAKECMDGOALS))) |
Dan Willemsen | 39b81cd | 2021-09-16 14:23:07 -0700 | [diff] [blame] | 48 | # Temporary compatibility support until the build server configs are updated |
| 49 | ANDROID_GOALS := $(patsubst win_sdk,sdk,$(ANDROID_GOALS)) |
| 50 | ifneq ($(HOST_OS),linux) |
| 51 | ANDROID_GOALS := $(filter-out sdk,$(ANDROID_GOALS)) |
| 52 | ANDROID_GOALS := $(patsubst sdk_repo,sdk-repo-build-tools sdk-repo-platform-tools,$(ANDROID_GOALS)) |
| 53 | endif |
Dan Willemsen | 04f53ed | 2016-11-09 17:22:15 -0800 | [diff] [blame] | 54 | # Goals we need to pass to Ninja. |
| 55 | NINJA_GOALS := $(filter-out $(NINJA_EXCLUDE_GOALS), $(ANDROID_GOALS)) |
Dan Willemsen | 9bfcbc8 | 2017-05-25 21:25:24 -0700 | [diff] [blame] | 56 | ifndef NINJA_GOALS |
| 57 | NINJA_GOALS := droid |
| 58 | endif |
Dan Willemsen | 04f53ed | 2016-11-09 17:22:15 -0800 | [diff] [blame] | 59 | # Goals we need to pass to Kati. |
Dan Willemsen | 9bfcbc8 | 2017-05-25 21:25:24 -0700 | [diff] [blame] | 60 | KATI_GOALS := $(filter $(PARSE_TIME_MAKE_GOALS), $(ANDROID_GOALS)) |