main.mk revision fcf7c81a7fdd0a427965f147742f4eabe45aab1c
1# Only use ANDROID_BUILD_SHELL to wrap around bash. 2# DO NOT use other shells such as zsh. 3ifdef ANDROID_BUILD_SHELL 4SHELL := $(ANDROID_BUILD_SHELL) 5else 6# Use bash, not whatever shell somebody has installed as /bin/sh 7# This is repeated in config.mk, since envsetup.sh runs that file 8# directly. 9SHELL := /bin/bash 10endif 11 12# this turns off the suffix rules built into make 13.SUFFIXES: 14 15# this turns off the RCS / SCCS implicit rules of GNU Make 16% : RCS/%,v 17% : RCS/% 18% : %,v 19% : s.% 20% : SCCS/s.% 21 22# If a rule fails, delete $@. 23.DELETE_ON_ERROR: 24 25# Figure out where we are. 26#TOP := $(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))) 27#TOP := $(patsubst %/,%,$(TOP)) 28 29# TOPDIR is the normal variable you should use, because 30# if we are executing relative to the current directory 31# it can be "", whereas TOP must be "." which causes 32# pattern matching problems when make strips off the 33# trailing "./" from paths in various places. 34#ifeq ($(TOP),.) 35#TOPDIR := 36#else 37#TOPDIR := $(TOP)/ 38#endif 39 40# Check for broken versions of make. 41ifneq (1,$(strip $(shell expr $(MAKE_VERSION) \>= 3.81))) 42$(warning ********************************************************************************) 43$(warning * You are using version $(MAKE_VERSION) of make.) 44$(warning * Android can only be built by versions 3.81 and higher.) 45$(warning * see https://source.android.com/source/download.html) 46$(warning ********************************************************************************) 47$(error stopping) 48endif 49 50# Absolute path of the present working direcotry. 51# This overrides the shell variable $PWD, which does not necessarily points to 52# the top of the source tree, for example when "make -C" is used in m/mm/mmm. 53PWD := $(shell pwd) 54 55TOP := . 56TOPDIR := 57 58BUILD_SYSTEM := $(TOPDIR)build/core 59 60# This is the default target. It must be the first declared target. 61.PHONY: droid 62DEFAULT_GOAL := droid 63$(DEFAULT_GOAL): droid_targets 64 65.PHONY: droid_targets 66droid_targets: 67 68# Used to force goals to build. Only use for conditionally defined goals. 69.PHONY: FORCE 70FORCE: 71 72# These goals don't need to collect and include Android.mks/CleanSpec.mks 73# in the source tree. 74dont_bother_goals := clean clobber dataclean installclean \ 75 help out \ 76 snod systemimage-nodeps \ 77 stnod systemtarball-nodeps \ 78 userdataimage-nodeps userdatatarball-nodeps \ 79 cacheimage-nodeps \ 80 vendorimage-nodeps \ 81 ramdisk-nodeps \ 82 bootimage-nodeps \ 83 recoveryimage-nodeps \ 84 product-graph dump-products 85 86ifneq ($(filter $(dont_bother_goals), $(MAKECMDGOALS)),) 87dont_bother := true 88endif 89 90ORIGINAL_MAKECMDGOALS := $(MAKECMDGOALS) 91 92# Targets that provide quick help on the build system. 93include $(BUILD_SYSTEM)/help.mk 94 95# Set up various standard variables based on configuration 96# and host information. 97include $(BUILD_SYSTEM)/config.mk 98 99relaunch_with_ninja := 100ifneq ($(USE_NINJA),false) 101ifndef BUILDING_WITH_NINJA 102relaunch_with_ninja := true 103endif 104endif 105 106ifeq ($(relaunch_with_ninja),true) 107# Mark this is a ninja build. 108$(shell mkdir -p $(OUT_DIR) && touch $(OUT_DIR)/ninja_build) 109include build/core/ninja.mk 110else # !relaunch_with_ninja 111ifndef BUILDING_WITH_NINJA 112# Remove ninja build mark if it exists. 113$(shell rm -f $(OUT_DIR)/ninja_build) 114endif 115 116# With these files findleaves.py won't be unnecessarily slower even if 117# there is a user creates a copy of $(OUT_DIR). 118$(shell echo '# This file prevents findleaves.py from traversing this directory further' > $(OUT_DIR)/Android.mk) 119$(shell echo '# This file prevents findleaves.py from traversing this directory further' > $(OUT_DIR)/CleanSpec.mk) 120 121# Write the build number to a file so it can be read back in 122# without changing the command line every time. Avoids rebuilds 123# when using ninja. 124$(shell mkdir -p $(OUT_DIR) && \ 125 echo -n $(BUILD_NUMBER) > $(OUT_DIR)/build_number.txt && \ 126 echo -n $(BUILD_DATETIME) > $(OUT_DIR)/build_date.txt) 127BUILD_NUMBER_FROM_FILE := $$(cat $(OUT_DIR)/build_number.txt) 128BUILD_DATETIME_FROM_FILE := $$(cat $(OUT_DIR)/build_date.txt) 129ifeq ($(HOST_OS),darwin) 130DATE_FROM_FILE := date -r $(BUILD_DATETIME_FROM_FILE) 131else 132DATE_FROM_FILE := date -d @$(BUILD_DATETIME_FROM_FILE) 133endif 134 135# CTS-specific config. 136-include cts/build/config.mk 137 138# This allows us to force a clean build - included after the config.mk 139# environment setup is done, but before we generate any dependencies. This 140# file does the rm -rf inline so the deps which are all done below will 141# be generated correctly 142include $(BUILD_SYSTEM)/cleanbuild.mk 143 144# Include the google-specific config 145-include vendor/google/build/config.mk 146 147VERSION_CHECK_SEQUENCE_NUMBER := 6 148-include $(OUT_DIR)/versions_checked.mk 149ifneq ($(VERSION_CHECK_SEQUENCE_NUMBER),$(VERSIONS_CHECKED)) 150 151$(info Checking build tools versions...) 152 153# check for a case sensitive file system 154ifneq (a,$(shell mkdir -p $(OUT_DIR) ; \ 155 echo a > $(OUT_DIR)/casecheck.txt; \ 156 echo B > $(OUT_DIR)/CaseCheck.txt; \ 157 cat $(OUT_DIR)/casecheck.txt)) 158$(warning ************************************************************) 159$(warning You are building on a case-insensitive filesystem.) 160$(warning Please move your source tree to a case-sensitive filesystem.) 161$(warning ************************************************************) 162$(error Case-insensitive filesystems not supported) 163endif 164 165# Make sure that there are no spaces in the absolute path; the 166# build system can't deal with them. 167ifneq ($(words $(shell pwd)),1) 168$(warning ************************************************************) 169$(warning You are building in a directory whose absolute path contains) 170$(warning a space character:) 171$(warning $(space)) 172$(warning "$(shell pwd)") 173$(warning $(space)) 174$(warning Please move your source tree to a path that does not contain) 175$(warning any spaces.) 176$(warning ************************************************************) 177$(error Directory names containing spaces not supported) 178endif 179 180java_version_str := $(shell unset _JAVA_OPTIONS && java -version 2>&1) 181javac_version_str := $(shell unset _JAVA_OPTIONS && javac -version 2>&1) 182 183# Check for the correct version of java, should be 1.8 by 184# default and only 1.7 if LEGACY_USE_JAVA7 is set. 185ifeq ($(LEGACY_USE_JAVA7),) # if LEGACY_USE_JAVA7 == '' 186required_version := "1.8.x" 187required_javac_version := "1.8" 188java_version := $(shell echo '$(java_version_str)' | grep '[ "]1\.8[\. "$$]') 189javac_version := $(shell echo '$(javac_version_str)' | grep '[ "]1\.8[\. "$$]') 190else 191required_version := "1.7.x" 192required_javac_version := "1.7" 193java_version := $(shell echo '$(java_version_str)' | grep '^java .*[ "]1\.7[\. "$$]') 194javac_version := $(shell echo '$(javac_version_str)' | grep '[ "]1\.7[\. "$$]') 195endif # if LEGACY_USE_JAVA7 == '' 196 197ifeq ($(strip $(java_version)),) 198$(info ************************************************************) 199$(info You are attempting to build with the incorrect version) 200$(info of java.) 201$(info $(space)) 202$(info Your version is: $(java_version_str).) 203$(info The required version is: $(required_version)) 204$(info $(space)) 205$(info Please follow the machine setup instructions at) 206$(info $(space)$(space)$(space)$(space)https://source.android.com/source/initializing.html) 207$(info ************************************************************) 208$(error stop) 209endif 210 211# Check for the current JDK. 212# 213# For Java 1.7/1.8, we require OpenJDK on linux and Oracle JDK on Mac OS. 214requires_openjdk := false 215ifeq ($(BUILD_OS),linux) 216requires_openjdk := true 217endif 218 219 220# Check for the current jdk 221ifeq ($(requires_openjdk), true) 222# The user asked for openjdk, so check that the host 223# java version is really openjdk and not some other JDK. 224ifeq ($(shell echo '$(java_version_str)' | grep -i openjdk),) 225$(info ************************************************************) 226$(info You asked for an OpenJDK based build but your version is) 227$(info $(java_version_str).) 228$(info ************************************************************) 229$(error stop) 230endif # java version is not OpenJdk 231else # if requires_openjdk 232ifneq ($(shell echo '$(java_version_str)' | grep -i openjdk),) 233$(info ************************************************************) 234$(info You are attempting to build with an unsupported JDK.) 235$(info $(space)) 236$(info You use OpenJDK but only Sun/Oracle JDK is supported.) 237$(info Please follow the machine setup instructions at) 238$(info $(space)$(space)$(space)$(space)https://source.android.com/source/download.html) 239$(info ************************************************************) 240$(error stop) 241endif # java version is not Sun Oracle JDK 242endif # if requires_openjdk 243 244# Check for the correct version of javac 245ifeq ($(strip $(javac_version)),) 246$(info ************************************************************) 247$(info You are attempting to build with the incorrect version) 248$(info of javac.) 249$(info $(space)) 250$(info Your version is: $(javac_version_str).) 251$(info The required version is: $(required_javac_version)) 252$(info $(space)) 253$(info Please follow the machine setup instructions at) 254$(info $(space)$(space)$(space)$(space)https://source.android.com/source/download.html) 255$(info ************************************************************) 256$(error stop) 257endif 258 259 260ifndef BUILD_EMULATOR 261 # Emulator binaries are now provided under prebuilts/android-emulator/ 262 BUILD_EMULATOR := false 263endif 264 265$(shell echo 'VERSIONS_CHECKED := $(VERSION_CHECK_SEQUENCE_NUMBER)' \ 266 > $(OUT_DIR)/versions_checked.mk) 267$(shell echo 'BUILD_EMULATOR ?= $(BUILD_EMULATOR)' \ 268 >> $(OUT_DIR)/versions_checked.mk) 269endif 270 271# These are the modifier targets that don't do anything themselves, but 272# change the behavior of the build. 273# (must be defined before including definitions.make) 274INTERNAL_MODIFIER_TARGETS := showcommands all 275 276# EMMA_INSTRUMENT_STATIC merges the static emma library to each emma-enabled module. 277ifeq (true,$(EMMA_INSTRUMENT_STATIC)) 278EMMA_INSTRUMENT := true 279endif 280 281# Bring in standard build system definitions. 282include $(BUILD_SYSTEM)/definitions.mk 283 284# Bring in dex_preopt.mk 285include $(BUILD_SYSTEM)/dex_preopt.mk 286 287ifneq ($(filter user userdebug eng,$(MAKECMDGOALS)),) 288$(info ***************************************************************) 289$(info ***************************************************************) 290$(info Do not pass '$(filter user userdebug eng,$(MAKECMDGOALS))' on \ 291 the make command line.) 292$(info Set TARGET_BUILD_VARIANT in buildspec.mk, or use lunch or) 293$(info choosecombo.) 294$(info ***************************************************************) 295$(info ***************************************************************) 296$(error stopping) 297endif 298 299ifneq ($(filter-out $(INTERNAL_VALID_VARIANTS),$(TARGET_BUILD_VARIANT)),) 300$(info ***************************************************************) 301$(info ***************************************************************) 302$(info Invalid variant: $(TARGET_BUILD_VARIANT)) 303$(info Valid values are: $(INTERNAL_VALID_VARIANTS)) 304$(info ***************************************************************) 305$(info ***************************************************************) 306$(error stopping) 307endif 308 309# ----------------------------------------------------------------- 310# Variable to check java support level inside PDK build. 311# Not necessary if the components is not in PDK. 312# not defined : not supported 313# "sdk" : sdk API only 314# "platform" : platform API supproted 315TARGET_BUILD_JAVA_SUPPORT_LEVEL := platform 316 317# ----------------------------------------------------------------- 318# The pdk (Platform Development Kit) build 319include build/core/pdk_config.mk 320 321# 322# ----------------------------------------------------------------- 323# Jack version configuration 324-include $(TOPDIR)prebuilts/sdk/tools/jack_versions.mk 325-include $(TOPDIR)prebuilts/sdk/tools/jack_for_module.mk 326 327# 328# ----------------------------------------------------------------- 329# Install and start Jack server 330-include $(TOPDIR)prebuilts/sdk/tools/jack_server_setup.mk 331 332# ----------------------------------------------------------------- 333### 334### In this section we set up the things that are different 335### between the build variants 336### 337 338is_sdk_build := 339 340ifneq ($(filter sdk win_sdk sdk_addon,$(MAKECMDGOALS)),) 341is_sdk_build := true 342endif 343 344# Add build properties for ART. These define system properties used by installd 345# to pass flags to dex2oat. 346ADDITIONAL_BUILD_PROPERTIES += persist.sys.dalvik.vm.lib.2=libart.so 347ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.isa.$(TARGET_ARCH).variant=$(DEX2OAT_TARGET_CPU_VARIANT) 348ifneq ($(DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES),) 349 ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.isa.$(TARGET_ARCH).features=$(DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES) 350endif 351 352ifdef TARGET_2ND_ARCH 353 ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.isa.$(TARGET_2ND_ARCH).variant=$($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_CPU_VARIANT) 354 ifneq ($($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES),) 355 ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.isa.$(TARGET_2ND_ARCH).features=$($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES) 356 endif 357endif 358 359## user/userdebug ## 360 361user_variant := $(filter user userdebug,$(TARGET_BUILD_VARIANT)) 362enable_target_debugging := true 363tags_to_install := 364ifneq (,$(user_variant)) 365 # Target is secure in user builds. 366 ADDITIONAL_DEFAULT_PROPERTIES += ro.secure=1 367 368 ifeq ($(user_variant),user) 369 ADDITIONAL_DEFAULT_PROPERTIES += ro.adb.secure=1 370 endif 371 372 ifeq ($(user_variant),userdebug) 373 # Pick up some extra useful tools 374 tags_to_install += debug 375 else 376 # Disable debugging in plain user builds. 377 enable_target_debugging := 378 endif 379 380 # Disallow mock locations by default for user builds 381 ADDITIONAL_DEFAULT_PROPERTIES += ro.allow.mock.location=0 382 383else # !user_variant 384 # Turn on checkjni for non-user builds. 385 ADDITIONAL_BUILD_PROPERTIES += ro.kernel.android.checkjni=1 386 # Set device insecure for non-user builds. 387 ADDITIONAL_DEFAULT_PROPERTIES += ro.secure=0 388 # Allow mock locations by default for non user builds 389 ADDITIONAL_DEFAULT_PROPERTIES += ro.allow.mock.location=1 390endif # !user_variant 391 392ifeq (true,$(strip $(enable_target_debugging))) 393 # Target is more debuggable and adbd is on by default 394 ADDITIONAL_DEFAULT_PROPERTIES += ro.debuggable=1 395 # Enable Dalvik lock contention logging. 396 ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.lockprof.threshold=500 397 # Include the debugging/testing OTA keys in this build. 398 INCLUDE_TEST_OTA_KEYS := true 399else # !enable_target_debugging 400 # Target is less debuggable and adbd is off by default 401 ADDITIONAL_DEFAULT_PROPERTIES += ro.debuggable=0 402endif # !enable_target_debugging 403 404## eng ## 405 406ifeq ($(TARGET_BUILD_VARIANT),eng) 407tags_to_install := debug eng 408ifneq ($(filter ro.setupwizard.mode=ENABLED, $(call collapse-pairs, $(ADDITIONAL_BUILD_PROPERTIES))),) 409 # Don't require the setup wizard on eng builds 410 ADDITIONAL_BUILD_PROPERTIES := $(filter-out ro.setupwizard.mode=%,\ 411 $(call collapse-pairs, $(ADDITIONAL_BUILD_PROPERTIES))) \ 412 ro.setupwizard.mode=OPTIONAL 413endif 414ifndef is_sdk_build 415 # To speedup startup of non-preopted builds, don't verify or compile the boot image. 416 ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.image-dex2oat-filter=verify-at-runtime 417endif 418endif 419 420## sdk ## 421 422ifdef is_sdk_build 423 424# Detect if we want to build a repository for the SDK 425sdk_repo_goal := $(strip $(filter sdk_repo,$(MAKECMDGOALS))) 426MAKECMDGOALS := $(strip $(filter-out sdk_repo,$(MAKECMDGOALS))) 427 428ifneq ($(words $(sort $(filter-out $(INTERNAL_MODIFIER_TARGETS) checkbuild emulator_tests target-files-package,$(MAKECMDGOALS)))),1) 429$(error The 'sdk' target may not be specified with any other targets) 430endif 431 432# TODO: this should be eng I think. Since the sdk is built from the eng 433# variant. 434tags_to_install := debug eng 435ADDITIONAL_BUILD_PROPERTIES += xmpp.auto-presence=true 436ADDITIONAL_BUILD_PROPERTIES += ro.config.nocheckin=yes 437else # !sdk 438endif 439 440BUILD_WITHOUT_PV := true 441 442ADDITIONAL_BUILD_PROPERTIES += net.bt.name=Android 443 444# enable vm tracing in files for now to help track 445# the cause of ANRs in the content process 446ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.stack-trace-file=/data/anr/traces.txt 447 448# ------------------------------------------------------------ 449# Define a function that, given a list of module tags, returns 450# non-empty if that module should be installed in /system. 451 452# For most goals, anything not tagged with the "tests" tag should 453# be installed in /system. 454define should-install-to-system 455$(if $(filter tests,$(1)),,true) 456endef 457 458ifdef is_sdk_build 459# For the sdk goal, anything with the "samples" tag should be 460# installed in /data even if that module also has "eng"/"debug"/"user". 461define should-install-to-system 462$(if $(filter samples tests,$(1)),,true) 463endef 464endif 465 466 467# If they only used the modifier goals (showcommands, etc), we'll actually 468# build the default target. 469ifeq ($(filter-out $(INTERNAL_MODIFIER_TARGETS),$(MAKECMDGOALS)),) 470.PHONY: $(INTERNAL_MODIFIER_TARGETS) 471$(INTERNAL_MODIFIER_TARGETS): $(DEFAULT_GOAL) 472endif 473 474# 475# Typical build; include any Android.mk files we can find. 476# 477subdirs := $(TOP) 478 479FULL_BUILD := true 480 481# Before we go and include all of the module makefiles, stash away 482# the PRODUCT_* values so that later we can verify they are not modified. 483stash_product_vars:=true 484ifeq ($(stash_product_vars),true) 485 $(call stash-product-vars, __STASHED) 486endif 487 488ifneq ($(ONE_SHOT_MAKEFILE),) 489# We've probably been invoked by the "mm" shell function 490# with a subdirectory's makefile. 491include $(ONE_SHOT_MAKEFILE) 492# Change CUSTOM_MODULES to include only modules that were 493# defined by this makefile; this will install all of those 494# modules as a side-effect. Do this after including ONE_SHOT_MAKEFILE 495# so that the modules will be installed in the same place they 496# would have been with a normal make. 497CUSTOM_MODULES := $(sort $(call get-tagged-modules,$(ALL_MODULE_TAGS))) 498FULL_BUILD := 499# Stub out the notice targets, which probably aren't defined 500# when using ONE_SHOT_MAKEFILE. 501NOTICE-HOST-%: ; 502NOTICE-TARGET-%: ; 503 504# A helper goal printing out install paths 505.PHONY: GET-INSTALL-PATH 506GET-INSTALL-PATH: 507 @echo "Install paths for modules in $(ONE_SHOT_MAKEFILE):" 508 @$(foreach m, $(ALL_MODULES), $(if $(ALL_MODULES.$(m).INSTALLED), \ 509 echo 'INSTALL-PATH: $(m) $(ALL_MODULES.$(m).INSTALLED)';)) 510 511else # ONE_SHOT_MAKEFILE 512 513ifneq ($(dont_bother),true) 514# 515# Include all of the makefiles in the system 516# 517 518# Can't use first-makefiles-under here because 519# --mindepth=2 makes the prunes not work. 520subdir_makefiles := \ 521 $(shell build/tools/findleaves.py $(FIND_LEAVES_EXCLUDES) $(subdirs) Android.mk) 522ifeq ($(USE_SOONG),true) 523subdir_makefiles := $(SOONG_ANDROID_MK) $(subdir_makefiles) 524endif 525 526$(foreach mk, $(subdir_makefiles), $(info including $(mk) ...)$(eval include $(mk))) 527 528endif # dont_bother 529 530endif # ONE_SHOT_MAKEFILE 531 532# Now with all Android.mks loaded we can do post cleaning steps. 533include $(BUILD_SYSTEM)/post_clean.mk 534 535ifeq ($(stash_product_vars),true) 536 $(call assert-product-vars, __STASHED) 537endif 538 539include $(BUILD_SYSTEM)/legacy_prebuilts.mk 540ifneq ($(filter-out $(GRANDFATHERED_ALL_PREBUILT),$(strip $(notdir $(ALL_PREBUILT)))),) 541 $(warning *** Some files have been added to ALL_PREBUILT.) 542 $(warning *) 543 $(warning * ALL_PREBUILT is a deprecated mechanism that) 544 $(warning * should not be used for new files.) 545 $(warning * As an alternative, use PRODUCT_COPY_FILES in) 546 $(warning * the appropriate product definition.) 547 $(warning * build/target/product/core.mk is the product) 548 $(warning * definition used in all products.) 549 $(warning *) 550 $(foreach bad_prebuilt,$(filter-out $(GRANDFATHERED_ALL_PREBUILT),$(strip $(notdir $(ALL_PREBUILT)))),$(warning * unexpected $(bad_prebuilt) in ALL_PREBUILT)) 551 $(warning *) 552 $(error ALL_PREBUILT contains unexpected files) 553endif 554 555# ------------------------------------------------------------------- 556# All module makefiles have been included at this point. 557# ------------------------------------------------------------------- 558 559 560# ------------------------------------------------------------------- 561# Fix up CUSTOM_MODULES to refer to installed files rather than 562# just bare module names. Leave unknown modules alone in case 563# they're actually full paths to a particular file. 564known_custom_modules := $(filter $(ALL_MODULES),$(CUSTOM_MODULES)) 565unknown_custom_modules := $(filter-out $(ALL_MODULES),$(CUSTOM_MODULES)) 566CUSTOM_MODULES := \ 567 $(call module-installed-files,$(known_custom_modules)) \ 568 $(unknown_custom_modules) 569 570# ------------------------------------------------------------------- 571# Define dependencies for modules that require other modules. 572# This can only happen now, after we've read in all module makefiles. 573# 574# TODO: deal with the fact that a bare module name isn't 575# unambiguous enough. Maybe declare short targets like 576# APPS:Quake or HOST:SHARED_LIBRARIES:libutils. 577# BUG: the system image won't know to depend on modules that are 578# brought in as requirements of other modules. 579# 580# Resolve the required module name to 32-bit or 64-bit variant. 581# Get a list of corresponding 32-bit module names, if one exists. 582define get-32-bit-modules 583$(strip $(foreach m,$(1),\ 584 $(if $(ALL_MODULES.$(m)$(TARGET_2ND_ARCH_MODULE_SUFFIX).CLASS),\ 585 $(m)$(TARGET_2ND_ARCH_MODULE_SUFFIX)))) 586endef 587# Get a list of corresponding 32-bit module names, if one exists; 588# otherwise return the original module name 589define get-32-bit-modules-if-we-can 590$(strip $(foreach m,$(1),\ 591 $(if $(ALL_MODULES.$(m)$(TARGET_2ND_ARCH_MODULE_SUFFIX).CLASS),\ 592 $(m)$(TARGET_2ND_ARCH_MODULE_SUFFIX), 593 $(m)))) 594endef 595 596# If a module is for a cross host os, the required modules must be for 597# that OS too. 598# If a module is built for 32-bit, the required modules must be 32-bit too; 599# Otherwise if the module is an exectuable or shared library, 600# the required modules must be 64-bit; 601# otherwise we require both 64-bit and 32-bit variant, if one exists. 602$(foreach m,$(ALL_MODULES),\ 603 $(eval r := $(ALL_MODULES.$(m).REQUIRED))\ 604 $(if $(r),\ 605 $(if $(ALL_MODULES.$(m).FOR_HOST_CROSS),\ 606 $(eval r := $(addprefix host_cross_,$(r))))\ 607 $(if $(ALL_MODULES.$(m).FOR_2ND_ARCH),\ 608 $(eval r_r := $(call get-32-bit-modules-if-we-can,$(r))),\ 609 $(if $(filter EXECUTABLES SHARED_LIBRARIES,$(ALL_MODULES.$(m).CLASS)),\ 610 $(eval r_r := $(r)),\ 611 $(eval r_r := $(r) $(call get-32-bit-modules,$(r)))\ 612 )\ 613 )\ 614 $(eval ALL_MODULES.$(m).REQUIRED := $(strip $(r_r)))\ 615 )\ 616) 617r_r := 618 619define add-required-deps 620$(1): | $(2) 621endef 622 623$(foreach m,$(ALL_MODULES), \ 624 $(eval r := $(ALL_MODULES.$(m).REQUIRED)) \ 625 $(if $(r), \ 626 $(eval r := $(call module-installed-files,$(r))) \ 627 $(eval t_m := $(filter $(TARGET_OUT_ROOT)/%, $(ALL_MODULES.$(m).INSTALLED))) \ 628 $(eval h_m := $(filter $(HOST_OUT_ROOT)/%, $(ALL_MODULES.$(m).INSTALLED))) \ 629 $(eval hc_m := $(filter $(HOST_CROSS_OUT_ROOT)/%, $(ALL_MODULES.$(m).INSTALLED))) \ 630 $(eval t_r := $(filter $(TARGET_OUT_ROOT)/%, $(r))) \ 631 $(eval h_r := $(filter $(HOST_OUT_ROOT)/%, $(r))) \ 632 $(eval hc_r := $(filter $(HOST_CROSS_OUT_ROOT)/%, $(r))) \ 633 $(eval t_m := $(filter-out $(t_r), $(t_m))) \ 634 $(eval h_m := $(filter-out $(h_r), $(h_m))) \ 635 $(eval hc_m := $(filter-out $(hc_r), $(hc_m))) \ 636 $(if $(t_m), $(eval $(call add-required-deps, $(t_m),$(t_r)))) \ 637 $(if $(h_m), $(eval $(call add-required-deps, $(h_m),$(h_r)))) \ 638 $(if $(hc_m), $(eval $(call add-required-deps, $(hc_m),$(hc_r)))) \ 639 ) \ 640 ) 641 642t_m := 643h_m := 644hc_m := 645t_r := 646h_r := 647hc_r := 648 649# Establish the dependecies on the shared libraries. 650# It also adds the shared library module names to ALL_MODULES.$(m).REQUIRED, 651# so they can be expanded to product_MODULES later. 652# $(1): TARGET_ or HOST_ or HOST_CROSS_. 653# $(2): non-empty for 2nd arch. 654# $(3): non-empty for host cross compile. 655define resolve-shared-libs-depes 656$(foreach m,$($(if $(2),$($(1)2ND_ARCH_VAR_PREFIX))$(1)DEPENDENCIES_ON_SHARED_LIBRARIES),\ 657 $(eval p := $(subst :,$(space),$(m)))\ 658 $(eval mod := $(firstword $(p)))\ 659 $(eval deps := $(subst $(comma),$(space),$(lastword $(p))))\ 660 $(if $(2),$(eval deps := $(addsuffix $($(1)2ND_ARCH_MODULE_SUFFIX),$(deps))))\ 661 $(if $(3),$(eval deps := $(addprefix host_cross_,$(deps))))\ 662 $(eval r := $(filter $($(1)OUT)/%,$(call module-installed-files,\ 663 $(deps))))\ 664 $(eval $(call add-required-deps,$(word 2,$(p)),$(r)))\ 665 $(eval ALL_MODULES.$(mod).REQUIRED += $(deps))) 666endef 667 668$(call resolve-shared-libs-depes,TARGET_) 669ifdef TARGET_2ND_ARCH 670$(call resolve-shared-libs-depes,TARGET_,true) 671endif 672$(call resolve-shared-libs-depes,HOST_) 673ifdef HOST_2ND_ARCH 674$(call resolve-shared-libs-depes,HOST_,true) 675endif 676ifdef HOST_CROSS_OS 677$(call resolve-shared-libs-depes,HOST_CROSS_,,true) 678endif 679 680m := 681r := 682p := 683deps := 684add-required-deps := 685 686# ------------------------------------------------------------------- 687# Figure out our module sets. 688# 689# Of the modules defined by the component makefiles, 690# determine what we actually want to build. 691 692########################################################### 693## Expand a module name list with REQUIRED modules 694########################################################### 695# $(1): The variable name that holds the initial module name list. 696# the variable will be modified to hold the expanded results. 697# $(2): The initial module name list. 698# Returns empty string (maybe with some whitespaces). 699define expand-required-modules 700$(eval _erm_new_modules := $(sort $(filter-out $($(1)),\ 701 $(foreach m,$(2),$(ALL_MODULES.$(m).REQUIRED)))))\ 702$(if $(_erm_new_modules),$(eval $(1) += $(_erm_new_modules))\ 703 $(call expand-required-modules,$(1),$(_erm_new_modules))) 704endef 705 706ifdef FULL_BUILD 707 # The base list of modules to build for this product is specified 708 # by the appropriate product definition file, which was included 709 # by product_config.mk. 710 product_MODULES := $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES) 711 # Filter out the overridden packages before doing expansion 712 product_MODULES := $(filter-out $(foreach p, $(product_MODULES), \ 713 $(PACKAGES.$(p).OVERRIDES)), $(product_MODULES)) 714 715 # Resolve the :32 :64 module name 716 modules_32 := $(patsubst %:32,%,$(filter %:32, $(product_MODULES))) 717 modules_64 := $(patsubst %:64,%,$(filter %:64, $(product_MODULES))) 718 modules_rest := $(filter-out %:32 %:64,$(product_MODULES)) 719 # Note for 32-bit product, $(modules_32) and $(modules_64) will be 720 # added as their original module names. 721 product_MODULES := $(call get-32-bit-modules-if-we-can, $(modules_32)) 722 product_MODULES += $(modules_64) 723 # For the rest we add both 724 product_MODULES += $(call get-32-bit-modules, $(modules_rest)) 725 product_MODULES += $(modules_rest) 726 727 $(call expand-required-modules,product_MODULES,$(product_MODULES)) 728 729 product_FILES := $(call module-installed-files, $(product_MODULES)) 730 ifeq (0,1) 731 $(info product_FILES for $(TARGET_DEVICE) ($(INTERNAL_PRODUCT)):) 732 $(foreach p,$(product_FILES),$(info : $(p))) 733 $(error done) 734 endif 735else 736 # We're not doing a full build, and are probably only including 737 # a subset of the module makefiles. Don't try to build any modules 738 # requested by the product, because we probably won't have rules 739 # to build them. 740 product_FILES := 741endif 742 743eng_MODULES := $(sort \ 744 $(call get-tagged-modules,eng) \ 745 $(call module-installed-files, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES_ENG)) \ 746 ) 747debug_MODULES := $(sort \ 748 $(call get-tagged-modules,debug) \ 749 $(call module-installed-files, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES_DEBUG)) \ 750 ) 751tests_MODULES := $(sort \ 752 $(call get-tagged-modules,tests) \ 753 $(call module-installed-files, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES_TESTS)) \ 754 ) 755 756# TODO: Remove the 3 places in the tree that use ALL_DEFAULT_INSTALLED_MODULES 757# and get rid of it from this list. 758modules_to_install := $(sort \ 759 $(ALL_DEFAULT_INSTALLED_MODULES) \ 760 $(product_FILES) \ 761 $(foreach tag,$(tags_to_install),$($(tag)_MODULES)) \ 762 $(CUSTOM_MODULES) \ 763 ) 764 765# Some packages may override others using LOCAL_OVERRIDES_PACKAGES. 766# Filter out (do not install) any overridden packages. 767overridden_packages := $(call get-package-overrides,$(modules_to_install)) 768ifdef overridden_packages 769# old_modules_to_install := $(modules_to_install) 770 modules_to_install := \ 771 $(filter-out $(foreach p,$(overridden_packages),$(p) %/$(p).apk), \ 772 $(modules_to_install)) 773endif 774#$(error filtered out 775# $(filter-out $(modules_to_install),$(old_modules_to_install))) 776 777# Don't include any GNU General Public License shared objects or static 778# libraries in SDK images. GPL executables (not static/dynamic libraries) 779# are okay if they don't link against any closed source libraries (directly 780# or indirectly) 781 782# It's ok (and necessary) to build the host tools, but nothing that's 783# going to be installed on the target (including static libraries). 784 785ifdef is_sdk_build 786 target_gnu_MODULES := \ 787 $(filter \ 788 $(TARGET_OUT_INTERMEDIATES)/% \ 789 $(TARGET_OUT)/% \ 790 $(TARGET_OUT_DATA)/%, \ 791 $(sort $(call get-tagged-modules,gnu))) 792 target_gnu_MODULES := $(filter-out $(TARGET_OUT_EXECUTABLES)/%,$(target_gnu_MODULES)) 793 $(info Removing from sdk:)$(foreach d,$(target_gnu_MODULES),$(info : $(d))) 794 modules_to_install := \ 795 $(filter-out $(target_gnu_MODULES),$(modules_to_install)) 796 797 # Ensure every module listed in PRODUCT_PACKAGES* gets something installed 798 # TODO: Should we do this for all builds and not just the sdk? 799 dangling_modules := 800 $(foreach m, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES), \ 801 $(if $(strip $(ALL_MODULES.$(m).INSTALLED) $(ALL_MODULES.$(m)$(TARGET_2ND_ARCH_MODULE_SUFFIX).INSTALLED)),,\ 802 $(eval dangling_modules += $(m)))) 803 ifneq ($(dangling_modules),) 804 $(warning: Modules '$(dangling_modules)' in PRODUCT_PACKAGES have nothing to install!) 805 endif 806 $(foreach m, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES_DEBUG), \ 807 $(if $(strip $(ALL_MODULES.$(m).INSTALLED)),,\ 808 $(warning $(ALL_MODULES.$(m).MAKEFILE): Module '$(m)' in PRODUCT_PACKAGES_DEBUG has nothing to install!))) 809 $(foreach m, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES_ENG), \ 810 $(if $(strip $(ALL_MODULES.$(m).INSTALLED)),,\ 811 $(warning $(ALL_MODULES.$(m).MAKEFILE): Module '$(m)' in PRODUCT_PACKAGES_ENG has nothing to install!))) 812 $(foreach m, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES_TESTS), \ 813 $(if $(strip $(ALL_MODULES.$(m).INSTALLED)),,\ 814 $(warning $(ALL_MODULES.$(m).MAKEFILE): Module '$(m)' in PRODUCT_PACKAGES_TESTS has nothing to install!))) 815endif 816 817# build/core/Makefile contains extra stuff that we don't want to pollute this 818# top-level makefile with. It expects that ALL_DEFAULT_INSTALLED_MODULES 819# contains everything that's built during the current make, but it also further 820# extends ALL_DEFAULT_INSTALLED_MODULES. 821ALL_DEFAULT_INSTALLED_MODULES := $(modules_to_install) 822include $(BUILD_SYSTEM)/Makefile 823modules_to_install := $(sort $(ALL_DEFAULT_INSTALLED_MODULES)) 824ALL_DEFAULT_INSTALLED_MODULES := 825 826 827# These are additional goals that we build, in order to make sure that there 828# is as little code as possible in the tree that doesn't build. 829modules_to_check := $(foreach m,$(ALL_MODULES),$(ALL_MODULES.$(m).CHECKED)) 830 831# If you would like to build all goals, and not skip any intermediate 832# steps, you can pass the "all" modifier goal on the commandline. 833ifneq ($(filter all,$(MAKECMDGOALS)),) 834modules_to_check += $(foreach m,$(ALL_MODULES),$(ALL_MODULES.$(m).BUILT)) 835endif 836 837# for easier debugging 838modules_to_check := $(sort $(modules_to_check)) 839#$(error modules_to_check $(modules_to_check)) 840 841# ------------------------------------------------------------------- 842# This is used to to get the ordering right, you can also use these, 843# but they're considered undocumented, so don't complain if their 844# behavior changes. 845.PHONY: prebuilt 846prebuilt: $(ALL_PREBUILT) 847 848# An internal target that depends on all copied headers 849# (see copy_headers.make). Other targets that need the 850# headers to be copied first can depend on this target. 851.PHONY: all_copied_headers 852all_copied_headers: ; 853 854$(ALL_C_CPP_ETC_OBJECTS): | all_copied_headers 855 856# All the droid stuff, in directories 857.PHONY: files 858files: prebuilt \ 859 $(modules_to_install) \ 860 $(INSTALLED_ANDROID_INFO_TXT_TARGET) 861 862# ------------------------------------------------------------------- 863 864.PHONY: checkbuild 865checkbuild: $(modules_to_check) droid_targets 866ifeq ($(USE_SOONG),true) 867checkbuild: checkbuild-soong 868endif 869ifeq (true,$(ANDROID_BUILD_EVERYTHING_BY_DEFAULT)) 870droid: checkbuild 871endif 872 873.PHONY: ramdisk 874ramdisk: $(INSTALLED_RAMDISK_TARGET) 875 876.PHONY: systemtarball 877systemtarball: $(INSTALLED_SYSTEMTARBALL_TARGET) 878 879.PHONY: boottarball 880boottarball: $(INSTALLED_BOOTTARBALL_TARGET) 881 882.PHONY: userdataimage 883userdataimage: $(INSTALLED_USERDATAIMAGE_TARGET) 884 885ifneq (,$(filter userdataimage, $(MAKECMDGOALS))) 886$(call dist-for-goals, userdataimage, $(BUILT_USERDATAIMAGE_TARGET)) 887endif 888 889.PHONY: userdatatarball 890userdatatarball: $(INSTALLED_USERDATATARBALL_TARGET) 891 892.PHONY: cacheimage 893cacheimage: $(INSTALLED_CACHEIMAGE_TARGET) 894 895.PHONY: vendorimage 896vendorimage: $(INSTALLED_VENDORIMAGE_TARGET) 897 898.PHONY: bootimage 899bootimage: $(INSTALLED_BOOTIMAGE_TARGET) 900 901# phony target that include any targets in $(ALL_MODULES) 902.PHONY: all_modules 903ifndef BUILD_MODULES_IN_PATHS 904all_modules: $(ALL_MODULES) 905else 906# BUILD_MODULES_IN_PATHS is a list of paths relative to the top of the tree 907build_modules_in_paths := $(patsubst ./%,%,$(BUILD_MODULES_IN_PATHS)) 908module_path_patterns := $(foreach p, $(build_modules_in_paths),\ 909 $(if $(filter %/,$(p)),$(p)%,$(p)/%)) 910my_all_modules := $(sort $(foreach m, $(ALL_MODULES),$(if $(filter\ 911 $(module_path_patterns), $(addsuffix /,$(ALL_MODULES.$(m).PATH))),$(m)))) 912all_modules: $(my_all_modules) 913endif 914 915 916# Build files and then package it into the rom formats 917.PHONY: droidcore 918droidcore: files \ 919 systemimage \ 920 $(INSTALLED_BOOTIMAGE_TARGET) \ 921 $(INSTALLED_RECOVERYIMAGE_TARGET) \ 922 $(INSTALLED_USERDATAIMAGE_TARGET) \ 923 $(INSTALLED_CACHEIMAGE_TARGET) \ 924 $(INSTALLED_VENDORIMAGE_TARGET) \ 925 $(INSTALLED_FILES_FILE) \ 926 $(INSTALLED_FILES_FILE_VENDOR) 927 928# dist_files only for putting your library into the dist directory with a full build. 929.PHONY: dist_files 930 931ifneq ($(TARGET_BUILD_APPS),) 932 # If this build is just for apps, only build apps and not the full system by default. 933 934 unbundled_build_modules := 935 ifneq ($(filter all,$(TARGET_BUILD_APPS)),) 936 # If they used the magic goal "all" then build all apps in the source tree. 937 unbundled_build_modules := $(foreach m,$(sort $(ALL_MODULES)),$(if $(filter APPS,$(ALL_MODULES.$(m).CLASS)),$(m))) 938 else 939 unbundled_build_modules := $(TARGET_BUILD_APPS) 940 endif 941 942 # Dist the installed files if they exist. 943 apps_only_installed_files := $(foreach m,$(unbundled_build_modules),$(ALL_MODULES.$(m).INSTALLED)) 944 $(call dist-for-goals,apps_only, $(apps_only_installed_files)) 945 # For uninstallable modules such as static Java library, we have to dist the built file, 946 # as <module_name>.<suffix> 947 apps_only_dist_built_files := $(foreach m,$(unbundled_build_modules),$(if $(ALL_MODULES.$(m).INSTALLED),,\ 948 $(if $(ALL_MODULES.$(m).BUILT),$(ALL_MODULES.$(m).BUILT):$(m)$(suffix $(ALL_MODULES.$(m).BUILT)))\ 949 $(if $(ALL_MODULES.$(m).AAR),$(ALL_MODULES.$(m).AAR):$(m).aar)\ 950 )) 951 $(call dist-for-goals,apps_only, $(apps_only_dist_built_files)) 952 953 ifeq ($(EMMA_INSTRUMENT),true) 954 $(EMMA_META_ZIP) : $(apps_only_installed_files) 955 956 $(call dist-for-goals,apps_only, $(EMMA_META_ZIP)) 957 endif 958 959 $(PROGUARD_DICT_ZIP) : $(apps_only_installed_files) 960 $(call dist-for-goals,apps_only, $(PROGUARD_DICT_ZIP)) 961 962 $(SYMBOLS_ZIP) : $(apps_only_installed_files) 963 $(call dist-for-goals,apps_only, $(SYMBOLS_ZIP)) 964 965.PHONY: apps_only 966apps_only: $(unbundled_build_modules) 967 968droid_targets: apps_only 969 970# Combine the NOTICE files for a apps_only build 971$(eval $(call combine-notice-files, \ 972 $(target_notice_file_txt), \ 973 $(target_notice_file_html), \ 974 "Notices for files for apps:", \ 975 $(TARGET_OUT_NOTICE_FILES), \ 976 $(apps_only_installed_files))) 977 978 979else # TARGET_BUILD_APPS 980 $(call dist-for-goals, droidcore, \ 981 $(INTERNAL_UPDATE_PACKAGE_TARGET) \ 982 $(INTERNAL_OTA_PACKAGE_TARGET) \ 983 $(BUILT_OTATOOLS_PACKAGE) \ 984 $(SYMBOLS_ZIP) \ 985 $(INSTALLED_FILES_FILE) \ 986 $(INSTALLED_FILES_FILE_VENDOR) \ 987 $(INSTALLED_BUILD_PROP_TARGET) \ 988 $(BUILT_TARGET_FILES_PACKAGE) \ 989 $(INSTALLED_ANDROID_INFO_TXT_TARGET) \ 990 $(INSTALLED_RAMDISK_TARGET) \ 991 ) 992 993 # Put a copy of the radio/bootloader files in the dist dir. 994 $(foreach f,$(INSTALLED_RADIOIMAGE_TARGET), \ 995 $(call dist-for-goals, droidcore, $(f))) 996 997 ifneq ($(ANDROID_BUILD_EMBEDDED),true) 998 ifneq ($(TARGET_BUILD_PDK),true) 999 $(call dist-for-goals, droidcore, \ 1000 $(APPS_ZIP) \ 1001 $(INTERNAL_EMULATOR_PACKAGE_TARGET) \ 1002 $(PACKAGE_STATS_FILE) \ 1003 ) 1004 endif 1005 endif 1006 1007 ifeq ($(EMMA_INSTRUMENT),true) 1008 $(EMMA_META_ZIP) : $(INSTALLED_SYSTEMIMAGE) 1009 1010 $(call dist-for-goals, dist_files, $(EMMA_META_ZIP)) 1011 endif 1012 1013# Building a full system-- the default is to build droidcore 1014droid_targets: droidcore dist_files 1015 1016endif # TARGET_BUILD_APPS 1017 1018.PHONY: docs 1019docs: $(ALL_DOCS) 1020 1021.PHONY: sdk 1022ALL_SDK_TARGETS := $(INTERNAL_SDK_TARGET) 1023sdk: $(ALL_SDK_TARGETS) 1024$(call dist-for-goals,sdk win_sdk, \ 1025 $(ALL_SDK_TARGETS) \ 1026 $(SYMBOLS_ZIP) \ 1027 $(INSTALLED_BUILD_PROP_TARGET) \ 1028) 1029 1030# umbrella targets to assit engineers in verifying builds 1031.PHONY: java native target host java-host java-target native-host native-target \ 1032 java-host-tests java-target-tests native-host-tests native-target-tests \ 1033 java-tests native-tests host-tests target-tests tests 1034# some synonyms 1035.PHONY: host-java target-java host-native target-native \ 1036 target-java-tests target-native-tests 1037host-java : java-host 1038target-java : java-target 1039host-native : native-host 1040target-native : native-target 1041target-java-tests : java-target-tests 1042target-native-tests : native-target-tests 1043tests : host-tests target-tests 1044 1045# To catch more build breakage, check build tests modules in eng and userdebug builds. 1046ifneq ($(ANDROID_NO_TEST_CHECK),true) 1047ifneq ($(TARGET_BUILD_PDK),true) 1048ifneq ($(filter eng userdebug,$(TARGET_BUILD_VARIANT)),) 1049droidcore : target-tests host-tests 1050endif 1051endif 1052endif 1053 1054ifneq (,$(filter samplecode, $(MAKECMDGOALS))) 1055.PHONY: samplecode 1056sample_MODULES := $(sort $(call get-tagged-modules,samples)) 1057sample_APKS_DEST_PATH := $(TARGET_COMMON_OUT_ROOT)/samples 1058sample_APKS_COLLECTION := \ 1059 $(foreach module,$(sample_MODULES),$(sample_APKS_DEST_PATH)/$(notdir $(module))) 1060$(foreach module,$(sample_MODULES),$(eval $(call \ 1061 copy-one-file,$(module),$(sample_APKS_DEST_PATH)/$(notdir $(module))))) 1062sample_ADDITIONAL_INSTALLED := \ 1063 $(filter-out $(modules_to_install) $(modules_to_check) $(ALL_PREBUILT),$(sample_MODULES)) 1064samplecode: $(sample_APKS_COLLECTION) 1065 @echo "Collect sample code apks: $^" 1066 # remove apks that are not intended to be installed. 1067 rm -f $(sample_ADDITIONAL_INSTALLED) 1068endif # samplecode in $(MAKECMDGOALS) 1069 1070.PHONY: findbugs 1071findbugs: $(INTERNAL_FINDBUGS_HTML_TARGET) $(INTERNAL_FINDBUGS_XML_TARGET) 1072 1073.PHONY: clean 1074clean: 1075 @rm -rf $(OUT_DIR)/* 1076 @echo "Entire build directory removed." 1077 1078.PHONY: clobber 1079clobber: clean 1080 1081# The rules for dataclean and installclean are defined in cleanbuild.mk. 1082 1083#xxx scrape this from ALL_MODULE_NAME_TAGS 1084.PHONY: modules 1085modules: 1086 @echo "Available sub-modules:" 1087 @echo "$(call module-names-for-tag-list,$(ALL_MODULE_TAGS))" | \ 1088 tr -s ' ' '\n' | sort -u | $(COLUMN) 1089 1090.PHONY: showcommands 1091showcommands: 1092 @echo >/dev/null 1093 1094.PHONY: nothing 1095nothing: 1096 @echo Successfully read the makefiles. 1097endif # !relaunch_with_ninja 1098