main.mk revision f2a9135ed14a59da38a65a0218e8e8486620a3ad
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 := 5 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.7 by 184# default, and 1.8 if EXPERIMENTAL_USE_JAVA8 is set 185ifneq ($(EXPERIMENTAL_USE_JAVA8),) 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 # default 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 EXPERIMENTAL_USE_JAVA8 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, 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 java7 openjdk, so check that the host 223# java version is really openjdk 224ifeq ($(shell echo '$(java_version_str)' | grep -i openjdk),) 225$(info ************************************************************) 226$(info You asked for an OpenJDK 7 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### In this section we set up the things that are different 330### between the build variants 331### 332 333is_sdk_build := 334 335ifneq ($(filter sdk win_sdk sdk_addon,$(MAKECMDGOALS)),) 336is_sdk_build := true 337endif 338 339# Add build properties for ART. These define system properties used by installd 340# to pass flags to dex2oat. 341ADDITIONAL_BUILD_PROPERTIES += persist.sys.dalvik.vm.lib.2=libart.so 342ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.isa.$(TARGET_ARCH).variant=$(DEX2OAT_TARGET_CPU_VARIANT) 343ifneq ($(DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES),) 344 ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.isa.$(TARGET_ARCH).features=$(DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES) 345endif 346 347ifdef TARGET_2ND_ARCH 348 ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.isa.$(TARGET_2ND_ARCH).variant=$($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_CPU_VARIANT) 349 ifneq ($($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES),) 350 ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.isa.$(TARGET_2ND_ARCH).features=$($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES) 351 endif 352endif 353 354## user/userdebug ## 355 356user_variant := $(filter user userdebug,$(TARGET_BUILD_VARIANT)) 357enable_target_debugging := true 358tags_to_install := 359ifneq (,$(user_variant)) 360 # Target is secure in user builds. 361 ADDITIONAL_DEFAULT_PROPERTIES += ro.secure=1 362 363 ifeq ($(user_variant),userdebug) 364 # Pick up some extra useful tools 365 tags_to_install += debug 366 else 367 # Disable debugging in plain user builds. 368 enable_target_debugging := 369 endif 370 371 # Turn on Dalvik preoptimization for user builds, but only if not 372 # explicitly disabled and the build is running on Linux (since host 373 # Dalvik isn't built for non-Linux hosts). 374 ifeq (,$(WITH_DEXPREOPT)) 375 ifeq ($(user_variant),user) 376 ifeq ($(HOST_OS),linux) 377 # TODO: turn on WITH_DEXPREOPT for libart user builds. 378 # WITH_DEXPREOPT := true 379 endif 380 endif 381 endif 382 383 # Disallow mock locations by default for user builds 384 ADDITIONAL_DEFAULT_PROPERTIES += ro.allow.mock.location=0 385 386else # !user_variant 387 # Turn on checkjni for non-user builds. 388 ADDITIONAL_BUILD_PROPERTIES += ro.kernel.android.checkjni=1 389 # Set device insecure for non-user builds. 390 ADDITIONAL_DEFAULT_PROPERTIES += ro.secure=0 391 # Allow mock locations by default for non user builds 392 ADDITIONAL_DEFAULT_PROPERTIES += ro.allow.mock.location=1 393endif # !user_variant 394 395ifeq (true,$(strip $(enable_target_debugging))) 396 # Target is more debuggable and adbd is on by default 397 ADDITIONAL_DEFAULT_PROPERTIES += ro.debuggable=1 398 # Enable Dalvik lock contention logging. 399 ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.lockprof.threshold=500 400 # Include the debugging/testing OTA keys in this build. 401 INCLUDE_TEST_OTA_KEYS := true 402else # !enable_target_debugging 403 # Target is less debuggable and adbd is off by default 404 ADDITIONAL_DEFAULT_PROPERTIES += ro.debuggable=0 405endif # !enable_target_debugging 406 407## eng ## 408 409ifeq ($(TARGET_BUILD_VARIANT),eng) 410tags_to_install := debug eng 411ifneq ($(filter ro.setupwizard.mode=ENABLED, $(call collapse-pairs, $(ADDITIONAL_BUILD_PROPERTIES))),) 412 # Don't require the setup wizard on eng builds 413 ADDITIONAL_BUILD_PROPERTIES := $(filter-out ro.setupwizard.mode=%,\ 414 $(call collapse-pairs, $(ADDITIONAL_BUILD_PROPERTIES))) \ 415 ro.setupwizard.mode=OPTIONAL 416endif 417ifndef is_sdk_build 418 # Don't verify or compile the image on eng builds to speed startup. 419 ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.image-dex2oat-filter=verify-at-runtime 420 # Don't verify or compile apps on eng builds to speed startup. 421 ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.dex2oat-filter=verify-at-runtime 422endif 423endif 424 425## sdk ## 426 427ifdef is_sdk_build 428 429# Detect if we want to build a repository for the SDK 430sdk_repo_goal := $(strip $(filter sdk_repo,$(MAKECMDGOALS))) 431MAKECMDGOALS := $(strip $(filter-out sdk_repo,$(MAKECMDGOALS))) 432 433ifneq ($(words $(sort $(filter-out $(INTERNAL_MODIFIER_TARGETS) checkbuild emulator_tests target-files-package,$(MAKECMDGOALS)))),1) 434$(error The 'sdk' target may not be specified with any other targets) 435endif 436 437# TODO: this should be eng I think. Since the sdk is built from the eng 438# variant. 439tags_to_install := debug eng 440ADDITIONAL_BUILD_PROPERTIES += xmpp.auto-presence=true 441ADDITIONAL_BUILD_PROPERTIES += ro.config.nocheckin=yes 442else # !sdk 443endif 444 445BUILD_WITHOUT_PV := true 446 447ADDITIONAL_BUILD_PROPERTIES += net.bt.name=Android 448 449# enable vm tracing in files for now to help track 450# the cause of ANRs in the content process 451ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.stack-trace-file=/data/anr/traces.txt 452 453# ------------------------------------------------------------ 454# Define a function that, given a list of module tags, returns 455# non-empty if that module should be installed in /system. 456 457# For most goals, anything not tagged with the "tests" tag should 458# be installed in /system. 459define should-install-to-system 460$(if $(filter tests,$(1)),,true) 461endef 462 463ifdef is_sdk_build 464# For the sdk goal, anything with the "samples" tag should be 465# installed in /data even if that module also has "eng"/"debug"/"user". 466define should-install-to-system 467$(if $(filter samples tests,$(1)),,true) 468endef 469endif 470 471 472# If they only used the modifier goals (showcommands, etc), we'll actually 473# build the default target. 474ifeq ($(filter-out $(INTERNAL_MODIFIER_TARGETS),$(MAKECMDGOALS)),) 475.PHONY: $(INTERNAL_MODIFIER_TARGETS) 476$(INTERNAL_MODIFIER_TARGETS): $(DEFAULT_GOAL) 477endif 478 479# 480# Typical build; include any Android.mk files we can find. 481# 482subdirs := $(TOP) 483 484FULL_BUILD := true 485 486# Before we go and include all of the module makefiles, stash away 487# the PRODUCT_* values so that later we can verify they are not modified. 488stash_product_vars:=true 489ifeq ($(stash_product_vars),true) 490 $(call stash-product-vars, __STASHED) 491endif 492 493ifneq ($(ONE_SHOT_MAKEFILE),) 494# We've probably been invoked by the "mm" shell function 495# with a subdirectory's makefile. 496include $(ONE_SHOT_MAKEFILE) 497# Change CUSTOM_MODULES to include only modules that were 498# defined by this makefile; this will install all of those 499# modules as a side-effect. Do this after including ONE_SHOT_MAKEFILE 500# so that the modules will be installed in the same place they 501# would have been with a normal make. 502CUSTOM_MODULES := $(sort $(call get-tagged-modules,$(ALL_MODULE_TAGS))) 503FULL_BUILD := 504# Stub out the notice targets, which probably aren't defined 505# when using ONE_SHOT_MAKEFILE. 506NOTICE-HOST-%: ; 507NOTICE-TARGET-%: ; 508 509# A helper goal printing out install paths 510.PHONY: GET-INSTALL-PATH 511GET-INSTALL-PATH: 512 @echo "Install paths for modules in $(ONE_SHOT_MAKEFILE):" 513 @$(foreach m, $(ALL_MODULES), $(if $(ALL_MODULES.$(m).INSTALLED), \ 514 echo 'INSTALL-PATH: $(m) $(ALL_MODULES.$(m).INSTALLED)';)) 515 516else # ONE_SHOT_MAKEFILE 517 518ifneq ($(dont_bother),true) 519# 520# Include all of the makefiles in the system 521# 522 523# Can't use first-makefiles-under here because 524# --mindepth=2 makes the prunes not work. 525subdir_makefiles := \ 526 $(shell build/tools/findleaves.py $(FIND_LEAVES_EXCLUDES) $(subdirs) Android.mk) 527 528$(foreach mk, $(subdir_makefiles), $(info including $(mk) ...)$(eval include $(mk))) 529 530endif # dont_bother 531 532endif # ONE_SHOT_MAKEFILE 533 534# Now with all Android.mks loaded we can do post cleaning steps. 535include $(BUILD_SYSTEM)/post_clean.mk 536 537ifeq ($(stash_product_vars),true) 538 $(call assert-product-vars, __STASHED) 539endif 540 541include $(BUILD_SYSTEM)/legacy_prebuilts.mk 542ifneq ($(filter-out $(GRANDFATHERED_ALL_PREBUILT),$(strip $(notdir $(ALL_PREBUILT)))),) 543 $(warning *** Some files have been added to ALL_PREBUILT.) 544 $(warning *) 545 $(warning * ALL_PREBUILT is a deprecated mechanism that) 546 $(warning * should not be used for new files.) 547 $(warning * As an alternative, use PRODUCT_COPY_FILES in) 548 $(warning * the appropriate product definition.) 549 $(warning * build/target/product/core.mk is the product) 550 $(warning * definition used in all products.) 551 $(warning *) 552 $(foreach bad_prebuilt,$(filter-out $(GRANDFATHERED_ALL_PREBUILT),$(strip $(notdir $(ALL_PREBUILT)))),$(warning * unexpected $(bad_prebuilt) in ALL_PREBUILT)) 553 $(warning *) 554 $(error ALL_PREBUILT contains unexpected files) 555endif 556 557# ------------------------------------------------------------------- 558# All module makefiles have been included at this point. 559# ------------------------------------------------------------------- 560 561 562# ------------------------------------------------------------------- 563# Fix up CUSTOM_MODULES to refer to installed files rather than 564# just bare module names. Leave unknown modules alone in case 565# they're actually full paths to a particular file. 566known_custom_modules := $(filter $(ALL_MODULES),$(CUSTOM_MODULES)) 567unknown_custom_modules := $(filter-out $(ALL_MODULES),$(CUSTOM_MODULES)) 568CUSTOM_MODULES := \ 569 $(call module-installed-files,$(known_custom_modules)) \ 570 $(unknown_custom_modules) 571 572# ------------------------------------------------------------------- 573# Define dependencies for modules that require other modules. 574# This can only happen now, after we've read in all module makefiles. 575# 576# TODO: deal with the fact that a bare module name isn't 577# unambiguous enough. Maybe declare short targets like 578# APPS:Quake or HOST:SHARED_LIBRARIES:libutils. 579# BUG: the system image won't know to depend on modules that are 580# brought in as requirements of other modules. 581# 582# Resolve the required module name to 32-bit or 64-bit variant. 583# Get a list of corresponding 32-bit module names, if one exists. 584define get-32-bit-modules 585$(strip $(foreach m,$(1),\ 586 $(if $(ALL_MODULES.$(m)$(TARGET_2ND_ARCH_MODULE_SUFFIX).CLASS),\ 587 $(m)$(TARGET_2ND_ARCH_MODULE_SUFFIX)))) 588endef 589# Get a list of corresponding 32-bit module names, if one exists; 590# otherwise return the original module name 591define get-32-bit-modules-if-we-can 592$(strip $(foreach m,$(1),\ 593 $(if $(ALL_MODULES.$(m)$(TARGET_2ND_ARCH_MODULE_SUFFIX).CLASS),\ 594 $(m)$(TARGET_2ND_ARCH_MODULE_SUFFIX), 595 $(m)))) 596endef 597 598# If a module is for a cross host os, the required modules must be for 599# that OS too. 600# If a module is built for 32-bit, the required modules must be 32-bit too; 601# Otherwise if the module is an exectuable or shared library, 602# the required modules must be 64-bit; 603# otherwise we require both 64-bit and 32-bit variant, if one exists. 604$(foreach m,$(ALL_MODULES),\ 605 $(eval r := $(ALL_MODULES.$(m).REQUIRED))\ 606 $(if $(r),\ 607 $(if $(ALL_MODULES.$(m).FOR_HOST_CROSS),\ 608 $(eval r := $(addprefix host_cross_,$(r))))\ 609 $(if $(ALL_MODULES.$(m).FOR_2ND_ARCH),\ 610 $(eval r_r := $(call get-32-bit-modules-if-we-can,$(r))),\ 611 $(if $(filter EXECUTABLES SHARED_LIBRARIES,$(ALL_MODULES.$(m).CLASS)),\ 612 $(eval r_r := $(r)),\ 613 $(eval r_r := $(r) $(call get-32-bit-modules,$(r)))\ 614 )\ 615 )\ 616 $(eval ALL_MODULES.$(m).REQUIRED := $(strip $(r_r)))\ 617 )\ 618) 619r_r := 620 621define add-required-deps 622$(1): | $(2) 623endef 624 625$(foreach m,$(ALL_MODULES), \ 626 $(eval r := $(ALL_MODULES.$(m).REQUIRED)) \ 627 $(if $(r), \ 628 $(eval r := $(call module-installed-files,$(r))) \ 629 $(eval t_m := $(filter $(TARGET_OUT_ROOT)/%, $(ALL_MODULES.$(m).INSTALLED))) \ 630 $(eval h_m := $(filter $(HOST_OUT_ROOT)/%, $(ALL_MODULES.$(m).INSTALLED))) \ 631 $(eval hc_m := $(filter $(HOST_CROSS_OUT_ROOT)/%, $(ALL_MODULES.$(m).INSTALLED))) \ 632 $(eval t_r := $(filter $(TARGET_OUT_ROOT)/%, $(r))) \ 633 $(eval h_r := $(filter $(HOST_OUT_ROOT)/%, $(r))) \ 634 $(eval hc_r := $(filter $(HOST_CROSS_OUT_ROOT)/%, $(r))) \ 635 $(eval t_m := $(filter-out $(t_r), $(t_m))) \ 636 $(eval h_m := $(filter-out $(h_r), $(h_m))) \ 637 $(eval hc_m := $(filter-out $(hc_r), $(hc_m))) \ 638 $(if $(t_m), $(eval $(call add-required-deps, $(t_m),$(t_r)))) \ 639 $(if $(h_m), $(eval $(call add-required-deps, $(h_m),$(h_r)))) \ 640 $(if $(hc_m), $(eval $(call add-required-deps, $(hc_m),$(hc_r)))) \ 641 ) \ 642 ) 643 644t_m := 645h_m := 646hc_m := 647t_r := 648h_r := 649hc_r := 650 651# Establish the dependecies on the shared libraries. 652# It also adds the shared library module names to ALL_MODULES.$(m).REQUIRED, 653# so they can be expanded to product_MODULES later. 654# $(1): TARGET_ or HOST_ or HOST_CROSS_. 655# $(2): non-empty for 2nd arch. 656# $(3): non-empty for host cross compile. 657define resolve-shared-libs-depes 658$(foreach m,$($(if $(2),$($(1)2ND_ARCH_VAR_PREFIX))$(1)DEPENDENCIES_ON_SHARED_LIBRARIES),\ 659 $(eval p := $(subst :,$(space),$(m)))\ 660 $(eval mod := $(firstword $(p)))\ 661 $(eval deps := $(subst $(comma),$(space),$(lastword $(p))))\ 662 $(if $(2),$(eval deps := $(addsuffix $($(1)2ND_ARCH_MODULE_SUFFIX),$(deps))))\ 663 $(if $(3),$(eval deps := $(addprefix host_cross_,$(deps))))\ 664 $(eval r := $(filter $($(1)OUT)/%,$(call module-installed-files,\ 665 $(deps))))\ 666 $(eval $(call add-required-deps,$(word 2,$(p)),$(r)))\ 667 $(eval ALL_MODULES.$(mod).REQUIRED += $(deps))) 668endef 669 670$(call resolve-shared-libs-depes,TARGET_) 671ifdef TARGET_2ND_ARCH 672$(call resolve-shared-libs-depes,TARGET_,true) 673endif 674$(call resolve-shared-libs-depes,HOST_) 675ifdef HOST_2ND_ARCH 676$(call resolve-shared-libs-depes,HOST_,true) 677endif 678ifdef HOST_CROSS_OS 679$(call resolve-shared-libs-depes,HOST_CROSS_,,true) 680endif 681 682m := 683r := 684p := 685deps := 686add-required-deps := 687 688# ------------------------------------------------------------------- 689# Figure out our module sets. 690# 691# Of the modules defined by the component makefiles, 692# determine what we actually want to build. 693 694########################################################### 695## Expand a module name list with REQUIRED modules 696########################################################### 697# $(1): The variable name that holds the initial module name list. 698# the variable will be modified to hold the expanded results. 699# $(2): The initial module name list. 700# Returns empty string (maybe with some whitespaces). 701define expand-required-modules 702$(eval _erm_new_modules := $(sort $(filter-out $($(1)),\ 703 $(foreach m,$(2),$(ALL_MODULES.$(m).REQUIRED)))))\ 704$(if $(_erm_new_modules),$(eval $(1) += $(_erm_new_modules))\ 705 $(call expand-required-modules,$(1),$(_erm_new_modules))) 706endef 707 708ifdef FULL_BUILD 709 # The base list of modules to build for this product is specified 710 # by the appropriate product definition file, which was included 711 # by product_config.mk. 712 product_MODULES := $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES) 713 # Filter out the overridden packages before doing expansion 714 product_MODULES := $(filter-out $(foreach p, $(product_MODULES), \ 715 $(PACKAGES.$(p).OVERRIDES)), $(product_MODULES)) 716 717 # Resolve the :32 :64 module name 718 modules_32 := $(patsubst %:32,%,$(filter %:32, $(product_MODULES))) 719 modules_64 := $(patsubst %:64,%,$(filter %:64, $(product_MODULES))) 720 modules_rest := $(filter-out %:32 %:64,$(product_MODULES)) 721 # Note for 32-bit product, $(modules_32) and $(modules_64) will be 722 # added as their original module names. 723 product_MODULES := $(call get-32-bit-modules-if-we-can, $(modules_32)) 724 product_MODULES += $(modules_64) 725 # For the rest we add both 726 product_MODULES += $(call get-32-bit-modules, $(modules_rest)) 727 product_MODULES += $(modules_rest) 728 729 $(call expand-required-modules,product_MODULES,$(product_MODULES)) 730 731 product_FILES := $(call module-installed-files, $(product_MODULES)) 732 ifeq (0,1) 733 $(info product_FILES for $(TARGET_DEVICE) ($(INTERNAL_PRODUCT)):) 734 $(foreach p,$(product_FILES),$(info : $(p))) 735 $(error done) 736 endif 737else 738 # We're not doing a full build, and are probably only including 739 # a subset of the module makefiles. Don't try to build any modules 740 # requested by the product, because we probably won't have rules 741 # to build them. 742 product_FILES := 743endif 744 745eng_MODULES := $(sort \ 746 $(call get-tagged-modules,eng) \ 747 $(call module-installed-files, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES_ENG)) \ 748 ) 749debug_MODULES := $(sort \ 750 $(call get-tagged-modules,debug) \ 751 $(call module-installed-files, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES_DEBUG)) \ 752 ) 753tests_MODULES := $(sort \ 754 $(call get-tagged-modules,tests) \ 755 $(call module-installed-files, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES_TESTS)) \ 756 ) 757 758# TODO: Remove the 3 places in the tree that use ALL_DEFAULT_INSTALLED_MODULES 759# and get rid of it from this list. 760modules_to_install := $(sort \ 761 $(ALL_DEFAULT_INSTALLED_MODULES) \ 762 $(product_FILES) \ 763 $(foreach tag,$(tags_to_install),$($(tag)_MODULES)) \ 764 $(CUSTOM_MODULES) \ 765 ) 766 767# Some packages may override others using LOCAL_OVERRIDES_PACKAGES. 768# Filter out (do not install) any overridden packages. 769overridden_packages := $(call get-package-overrides,$(modules_to_install)) 770ifdef overridden_packages 771# old_modules_to_install := $(modules_to_install) 772 modules_to_install := \ 773 $(filter-out $(foreach p,$(overridden_packages),$(p) %/$(p).apk), \ 774 $(modules_to_install)) 775endif 776#$(error filtered out 777# $(filter-out $(modules_to_install),$(old_modules_to_install))) 778 779# Don't include any GNU General Public License shared objects or static 780# libraries in SDK images. GPL executables (not static/dynamic libraries) 781# are okay if they don't link against any closed source libraries (directly 782# or indirectly) 783 784# It's ok (and necessary) to build the host tools, but nothing that's 785# going to be installed on the target (including static libraries). 786 787ifdef is_sdk_build 788 target_gnu_MODULES := \ 789 $(filter \ 790 $(TARGET_OUT_INTERMEDIATES)/% \ 791 $(TARGET_OUT)/% \ 792 $(TARGET_OUT_DATA)/%, \ 793 $(sort $(call get-tagged-modules,gnu))) 794 target_gnu_MODULES := $(filter-out $(TARGET_OUT_EXECUTABLES)/%,$(target_gnu_MODULES)) 795 $(info Removing from sdk:)$(foreach d,$(target_gnu_MODULES),$(info : $(d))) 796 modules_to_install := \ 797 $(filter-out $(target_gnu_MODULES),$(modules_to_install)) 798 799 # Ensure every module listed in PRODUCT_PACKAGES* gets something installed 800 # TODO: Should we do this for all builds and not just the sdk? 801 dangling_modules := 802 $(foreach m, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES), \ 803 $(if $(strip $(ALL_MODULES.$(m).INSTALLED) $(ALL_MODULES.$(m)$(TARGET_2ND_ARCH_MODULE_SUFFIX).INSTALLED)),,\ 804 $(eval dangling_modules += $(m)))) 805 ifneq ($(dangling_modules),) 806 $(warning: Modules '$(dangling_modules)' in PRODUCT_PACKAGES have nothing to install!) 807 endif 808 $(foreach m, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES_DEBUG), \ 809 $(if $(strip $(ALL_MODULES.$(m).INSTALLED)),,\ 810 $(warning $(ALL_MODULES.$(m).MAKEFILE): Module '$(m)' in PRODUCT_PACKAGES_DEBUG has nothing to install!))) 811 $(foreach m, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES_ENG), \ 812 $(if $(strip $(ALL_MODULES.$(m).INSTALLED)),,\ 813 $(warning $(ALL_MODULES.$(m).MAKEFILE): Module '$(m)' in PRODUCT_PACKAGES_ENG has nothing to install!))) 814 $(foreach m, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES_TESTS), \ 815 $(if $(strip $(ALL_MODULES.$(m).INSTALLED)),,\ 816 $(warning $(ALL_MODULES.$(m).MAKEFILE): Module '$(m)' in PRODUCT_PACKAGES_TESTS has nothing to install!))) 817endif 818 819# build/core/Makefile contains extra stuff that we don't want to pollute this 820# top-level makefile with. It expects that ALL_DEFAULT_INSTALLED_MODULES 821# contains everything that's built during the current make, but it also further 822# extends ALL_DEFAULT_INSTALLED_MODULES. 823ALL_DEFAULT_INSTALLED_MODULES := $(modules_to_install) 824include $(BUILD_SYSTEM)/Makefile 825modules_to_install := $(sort $(ALL_DEFAULT_INSTALLED_MODULES)) 826ALL_DEFAULT_INSTALLED_MODULES := 827 828 829# These are additional goals that we build, in order to make sure that there 830# is as little code as possible in the tree that doesn't build. 831modules_to_check := $(foreach m,$(ALL_MODULES),$(ALL_MODULES.$(m).CHECKED)) 832 833# If you would like to build all goals, and not skip any intermediate 834# steps, you can pass the "all" modifier goal on the commandline. 835ifneq ($(filter all,$(MAKECMDGOALS)),) 836modules_to_check += $(foreach m,$(ALL_MODULES),$(ALL_MODULES.$(m).BUILT)) 837endif 838 839# for easier debugging 840modules_to_check := $(sort $(modules_to_check)) 841#$(error modules_to_check $(modules_to_check)) 842 843# ------------------------------------------------------------------- 844# This is used to to get the ordering right, you can also use these, 845# but they're considered undocumented, so don't complain if their 846# behavior changes. 847.PHONY: prebuilt 848prebuilt: $(ALL_PREBUILT) 849 850# An internal target that depends on all copied headers 851# (see copy_headers.make). Other targets that need the 852# headers to be copied first can depend on this target. 853.PHONY: all_copied_headers 854all_copied_headers: ; 855 856$(ALL_C_CPP_ETC_OBJECTS): | all_copied_headers 857 858# All the droid stuff, in directories 859.PHONY: files 860files: prebuilt \ 861 $(modules_to_install) \ 862 $(INSTALLED_ANDROID_INFO_TXT_TARGET) 863 864# ------------------------------------------------------------------- 865 866.PHONY: checkbuild 867checkbuild: $(modules_to_check) droid_targets 868ifeq (true,$(ANDROID_BUILD_EVERYTHING_BY_DEFAULT)) 869droid: checkbuild 870endif 871 872.PHONY: ramdisk 873ramdisk: $(INSTALLED_RAMDISK_TARGET) 874 875.PHONY: systemtarball 876systemtarball: $(INSTALLED_SYSTEMTARBALL_TARGET) 877 878.PHONY: boottarball 879boottarball: $(INSTALLED_BOOTTARBALL_TARGET) 880 881.PHONY: userdataimage 882userdataimage: $(INSTALLED_USERDATAIMAGE_TARGET) 883 884ifneq (,$(filter userdataimage, $(MAKECMDGOALS))) 885$(call dist-for-goals, userdataimage, $(BUILT_USERDATAIMAGE_TARGET)) 886endif 887 888.PHONY: userdatatarball 889userdatatarball: $(INSTALLED_USERDATATARBALL_TARGET) 890 891.PHONY: cacheimage 892cacheimage: $(INSTALLED_CACHEIMAGE_TARGET) 893 894.PHONY: vendorimage 895vendorimage: $(INSTALLED_VENDORIMAGE_TARGET) 896 897.PHONY: bootimage 898bootimage: $(INSTALLED_BOOTIMAGE_TARGET) 899 900# phony target that include any targets in $(ALL_MODULES) 901.PHONY: all_modules 902ifndef BUILD_MODULES_IN_PATHS 903all_modules: $(ALL_MODULES) 904else 905# BUILD_MODULES_IN_PATHS is a list of paths relative to the top of the tree 906build_modules_in_paths := $(patsubst ./%,%,$(BUILD_MODULES_IN_PATHS)) 907module_path_patterns := $(foreach p, $(build_modules_in_paths),\ 908 $(if $(filter %/,$(p)),$(p)%,$(p)/%)) 909my_all_modules := $(sort $(foreach m, $(ALL_MODULES),$(if $(filter\ 910 $(module_path_patterns), $(addsuffix /,$(ALL_MODULES.$(m).PATH))),$(m)))) 911all_modules: $(my_all_modules) 912endif 913 914 915# Build files and then package it into the rom formats 916.PHONY: droidcore 917droidcore: files \ 918 systemimage \ 919 $(INSTALLED_BOOTIMAGE_TARGET) \ 920 $(INSTALLED_RECOVERYIMAGE_TARGET) \ 921 $(INSTALLED_USERDATAIMAGE_TARGET) \ 922 $(INSTALLED_CACHEIMAGE_TARGET) \ 923 $(INSTALLED_VENDORIMAGE_TARGET) \ 924 $(INSTALLED_FILES_FILE) \ 925 $(INSTALLED_FILES_FILE_VENDOR) 926 927# dist_files only for putting your library into the dist directory with a full build. 928.PHONY: dist_files 929 930ifneq ($(TARGET_BUILD_APPS),) 931 # If this build is just for apps, only build apps and not the full system by default. 932 933 unbundled_build_modules := 934 ifneq ($(filter all,$(TARGET_BUILD_APPS)),) 935 # If they used the magic goal "all" then build all apps in the source tree. 936 unbundled_build_modules := $(foreach m,$(sort $(ALL_MODULES)),$(if $(filter APPS,$(ALL_MODULES.$(m).CLASS)),$(m))) 937 else 938 unbundled_build_modules := $(TARGET_BUILD_APPS) 939 endif 940 941 # Dist the installed files if they exist. 942 apps_only_installed_files := $(foreach m,$(unbundled_build_modules),$(ALL_MODULES.$(m).INSTALLED)) 943 $(call dist-for-goals,apps_only, $(apps_only_installed_files)) 944 # For uninstallable modules such as static Java library, we have to dist the built file, 945 # as <module_name>.<suffix> 946 apps_only_dist_built_files := $(foreach m,$(unbundled_build_modules),$(if $(ALL_MODULES.$(m).INSTALLED),,\ 947 $(if $(ALL_MODULES.$(m).BUILT),$(ALL_MODULES.$(m).BUILT):$(m)$(suffix $(ALL_MODULES.$(m).BUILT)))\ 948 $(if $(ALL_MODULES.$(m).AAR),$(ALL_MODULES.$(m).AAR):$(m).aar)\ 949 )) 950 $(call dist-for-goals,apps_only, $(apps_only_dist_built_files)) 951 952 ifeq ($(EMMA_INSTRUMENT),true) 953 $(EMMA_META_ZIP) : $(apps_only_installed_files) 954 955 $(call dist-for-goals,apps_only, $(EMMA_META_ZIP)) 956 endif 957 958 $(PROGUARD_DICT_ZIP) : $(apps_only_installed_files) 959 $(call dist-for-goals,apps_only, $(PROGUARD_DICT_ZIP)) 960 961 $(SYMBOLS_ZIP) : $(apps_only_installed_files) 962 $(call dist-for-goals,apps_only, $(SYMBOLS_ZIP)) 963 964.PHONY: apps_only 965apps_only: $(unbundled_build_modules) 966 967droid_targets: apps_only 968 969# Combine the NOTICE files for a apps_only build 970$(eval $(call combine-notice-files, \ 971 $(target_notice_file_txt), \ 972 $(target_notice_file_html), \ 973 "Notices for files for apps:", \ 974 $(TARGET_OUT_NOTICE_FILES), \ 975 $(apps_only_installed_files))) 976 977 978else # TARGET_BUILD_APPS 979 $(call dist-for-goals, droidcore, \ 980 $(INTERNAL_UPDATE_PACKAGE_TARGET) \ 981 $(INTERNAL_OTA_PACKAGE_TARGET) \ 982 $(BUILT_OTATOOLS_PACKAGE) \ 983 $(SYMBOLS_ZIP) \ 984 $(INSTALLED_FILES_FILE) \ 985 $(INSTALLED_FILES_FILE_VENDOR) \ 986 $(INSTALLED_BUILD_PROP_TARGET) \ 987 $(BUILT_TARGET_FILES_PACKAGE) \ 988 $(INSTALLED_ANDROID_INFO_TXT_TARGET) \ 989 $(INSTALLED_RAMDISK_TARGET) \ 990 ) 991 992 # Put a copy of the radio/bootloader files in the dist dir. 993 $(foreach f,$(INSTALLED_RADIOIMAGE_TARGET), \ 994 $(call dist-for-goals, droidcore, $(f))) 995 996 ifneq ($(ANDROID_BUILD_EMBEDDED),true) 997 ifneq ($(TARGET_BUILD_PDK),true) 998 $(call dist-for-goals, droidcore, \ 999 $(APPS_ZIP) \ 1000 $(INTERNAL_EMULATOR_PACKAGE_TARGET) \ 1001 $(PACKAGE_STATS_FILE) \ 1002 ) 1003 endif 1004 endif 1005 1006 ifeq ($(EMMA_INSTRUMENT),true) 1007 $(EMMA_META_ZIP) : $(INSTALLED_SYSTEMIMAGE) 1008 1009 $(call dist-for-goals, dist_files, $(EMMA_META_ZIP)) 1010 endif 1011 1012# Building a full system-- the default is to build droidcore 1013droid_targets: droidcore dist_files 1014 1015endif # TARGET_BUILD_APPS 1016 1017.PHONY: docs 1018docs: $(ALL_DOCS) 1019 1020.PHONY: sdk 1021ALL_SDK_TARGETS := $(INTERNAL_SDK_TARGET) 1022sdk: $(ALL_SDK_TARGETS) 1023$(call dist-for-goals,sdk win_sdk, \ 1024 $(ALL_SDK_TARGETS) \ 1025 $(SYMBOLS_ZIP) \ 1026 $(INSTALLED_BUILD_PROP_TARGET) \ 1027) 1028 1029# umbrella targets to assit engineers in verifying builds 1030.PHONY: java native target host java-host java-target native-host native-target \ 1031 java-host-tests java-target-tests native-host-tests native-target-tests \ 1032 java-tests native-tests host-tests target-tests tests 1033# some synonyms 1034.PHONY: host-java target-java host-native target-native \ 1035 target-java-tests target-native-tests 1036host-java : java-host 1037target-java : java-target 1038host-native : native-host 1039target-native : native-target 1040target-java-tests : java-target-tests 1041target-native-tests : native-target-tests 1042tests : host-tests target-tests 1043 1044# To catch more build breakage, check build tests modules in eng and userdebug builds. 1045ifneq ($(ANDROID_NO_TEST_CHECK),true) 1046ifneq ($(TARGET_BUILD_PDK),true) 1047ifneq ($(filter eng userdebug,$(TARGET_BUILD_VARIANT)),) 1048droidcore : target-tests host-tests 1049endif 1050endif 1051endif 1052 1053ifneq (,$(filter samplecode, $(MAKECMDGOALS))) 1054.PHONY: samplecode 1055sample_MODULES := $(sort $(call get-tagged-modules,samples)) 1056sample_APKS_DEST_PATH := $(TARGET_COMMON_OUT_ROOT)/samples 1057sample_APKS_COLLECTION := \ 1058 $(foreach module,$(sample_MODULES),$(sample_APKS_DEST_PATH)/$(notdir $(module))) 1059$(foreach module,$(sample_MODULES),$(eval $(call \ 1060 copy-one-file,$(module),$(sample_APKS_DEST_PATH)/$(notdir $(module))))) 1061sample_ADDITIONAL_INSTALLED := \ 1062 $(filter-out $(modules_to_install) $(modules_to_check) $(ALL_PREBUILT),$(sample_MODULES)) 1063samplecode: $(sample_APKS_COLLECTION) 1064 @echo "Collect sample code apks: $^" 1065 # remove apks that are not intended to be installed. 1066 rm -f $(sample_ADDITIONAL_INSTALLED) 1067endif # samplecode in $(MAKECMDGOALS) 1068 1069.PHONY: findbugs 1070findbugs: $(INTERNAL_FINDBUGS_HTML_TARGET) $(INTERNAL_FINDBUGS_XML_TARGET) 1071 1072.PHONY: clean 1073clean: 1074 @rm -rf $(OUT_DIR)/* 1075 @echo "Entire build directory removed." 1076 1077.PHONY: clobber 1078clobber: clean 1079 1080# The rules for dataclean and installclean are defined in cleanbuild.mk. 1081 1082#xxx scrape this from ALL_MODULE_NAME_TAGS 1083.PHONY: modules 1084modules: 1085 @echo "Available sub-modules:" 1086 @echo "$(call module-names-for-tag-list,$(ALL_MODULE_TAGS))" | \ 1087 tr -s ' ' '\n' | sort -u | $(COLUMN) 1088 1089.PHONY: showcommands 1090showcommands: 1091 @echo >/dev/null 1092 1093.PHONY: nothing 1094nothing: 1095 @echo Successfully read the makefiles. 1096endif # !relaunch_with_ninja 1097