main.mk revision fdd3a1020cc63c9f2440f3cff814318d11d6c773
1 2# Use bash, not whatever shell somebody has installed as /bin/sh 3# This is repeated in config.mk, since envsetup.sh runs that file 4# directly. 5SHELL := /bin/bash 6 7# this turns off the suffix rules built into make 8.SUFFIXES: 9 10# If a rule fails, delete $@. 11.DELETE_ON_ERROR: 12 13# Figure out where we are. 14#TOP := $(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))) 15#TOP := $(patsubst %/,%,$(TOP)) 16 17# TOPDIR is the normal variable you should use, because 18# if we are executing relative to the current directory 19# it can be "", whereas TOP must be "." which causes 20# pattern matching probles when make strips off the 21# trailing "./" from paths in various places. 22#ifeq ($(TOP),.) 23#TOPDIR := 24#else 25#TOPDIR := $(TOP)/ 26#endif 27 28# check for broken versions of make 29ifeq (0,$(shell expr $$(echo $(MAKE_VERSION) | sed "s/[^0-9\.].*//") \>= 3.81)) 30$(warning ********************************************************************************) 31$(warning * You are using version $(MAKE_VERSION) of make.) 32$(warning * You must upgrade to version 3.81 or greater.) 33$(warning * see file://$(shell pwd)/docs/development-environment/machine-setup.html) 34$(warning ********************************************************************************) 35$(error stopping) 36endif 37 38TOP := . 39TOPDIR := 40 41BUILD_SYSTEM := $(TOPDIR)build/core 42 43# This is the default target. It must be the first declared target. 44DEFAULT_GOAL := droid 45$(DEFAULT_GOAL): 46 47# Set up various standard variables based on configuration 48# and host information. 49include $(BUILD_SYSTEM)/config.mk 50 51# This allows us to force a clean build - included after the config.make 52# environment setup is done, but before we generate any dependencies. This 53# file does the rm -rf inline so the deps which are all done below will 54# be generated correctly 55include $(BUILD_SYSTEM)/cleanbuild.mk 56 57ifneq ($(HOST_OS),windows) 58ifneq ($(HOST_OS)-$(HOST_ARCH),darwin-ppc) 59# check for a case sensitive file system 60ifneq (a,$(shell mkdir -p $(OUT_DIR) ; \ 61 echo a > $(OUT_DIR)/casecheck.txt; \ 62 echo B > $(OUT_DIR)/CaseCheck.txt; \ 63 cat $(OUT_DIR)/casecheck.txt)) 64$(warning ************************************************************) 65$(warning You are building on a case-insensitive filesystem.) 66$(warning Please move your source tree to a case-sensitive filesystem.) 67$(warning ************************************************************) 68$(error Case-insensitive filesystems not supported) 69endif 70endif 71endif 72 73# Make sure that there are no spaces in the absolute path; the 74# build system can't deal with them. 75ifneq ($(words $(shell pwd)),1) 76$(warning ************************************************************) 77$(warning You are building in a directory whose absolute path contains) 78$(warning a space character:) 79$(warning $(space)) 80$(warning "$(shell pwd)") 81$(warning $(space)) 82$(warning Please move your source tree to a path that does not contain) 83$(warning any spaces.) 84$(warning ************************************************************) 85$(error Directory names containing spaces not supported) 86endif 87 88# Set up version information. 89include $(BUILD_SYSTEM)/version_defaults.mk 90 91# These are the modifier targets that don't do anything themselves, but 92# change the behavior of the build. 93# (must be defined before including definitions.make) 94INTERNAL_MODIFIER_TARGETS := showcommands 95 96# Bring in standard build system definitions. 97include $(BUILD_SYSTEM)/definitions.mk 98 99ifneq ($(filter eng user userdebug tests,$(MAKECMDGOALS)),) 100$(info ***************************************************************) 101$(info ***************************************************************) 102$(info Don't pass '$(filter eng user userdebug tests,$(MAKECMDGOALS))' on \ 103 the make command line.) 104# XXX The single quote on this line fixes gvim's syntax highlighting. 105# Without which, the rest of this file is impossible to read. 106$(info Set TARGET_BUILD_VARIANT in buildspec.mk, or use lunch or) 107$(info choosecombo.) 108$(info ***************************************************************) 109$(info ***************************************************************) 110$(error stopping) 111endif 112 113ifneq ($(filter-out $(INTERNAL_VALID_VARIANTS),$(TARGET_BUILD_VARIANT)),) 114$(info ***************************************************************) 115$(info ***************************************************************) 116$(info Invalid variant: $(TARGET_BUILD_VARIANT) 117$(info Valid values are: $(INTERNAL_VALID_VARIANTS) 118$(info ***************************************************************) 119$(info ***************************************************************) 120$(error stopping) 121endif 122 123### 124### In this section we set up the things that are different 125### between the build variants 126### 127 128## user/userdebug ## 129 130user_variant := $(filter userdebug user,$(TARGET_BUILD_VARIANT)) 131enable_target_debugging := true 132ifneq (,$(user_variant)) 133 # Target is secure in user builds. 134 ADDITIONAL_DEFAULT_PROPERTIES += ro.secure=1 135 136 tags_to_install := user 137 ifeq ($(user_variant),userdebug) 138 # Pick up some extra useful tools 139 tags_to_install += debug 140 else 141 # Disable debugging in plain user builds. 142 enable_target_debugging := 143 endif 144 145 # TODO: Always set WITH_DEXPREOPT (for user builds) once it works on OSX. 146 # Also, remove the corresponding block in config/product_config.make. 147 ifeq ($(HOST_OS)-$(WITH_DEXPREOPT_buildbot),linux-true) 148 WITH_DEXPREOPT := true 149 endif 150 151 # Disallow mock locations by default for user builds 152 ADDITIONAL_DEFAULT_PROPERTIES += ro.allow.mock.location=0 153 154else # !user_variant 155 # Turn on checkjni for non-user builds. 156 ADDITIONAL_BUILD_PROPERTIES += ro.kernel.android.checkjni=1 157 # Set device insecure for non-user builds. 158 ADDITIONAL_DEFAULT_PROPERTIES += ro.secure=0 159 # Allow mock locations by default for non user builds 160 ADDITIONAL_DEFAULT_PROPERTIES += ro.allow.mock.location=1 161endif # !user_variant 162 163ifeq (true,$(strip $(enable_target_debugging))) 164 # Target is more debuggable and adbd is on by default 165 ADDITIONAL_DEFAULT_PROPERTIES += ro.debuggable=1 persist.service.adb.enable=1 166 # Include the debugging/testing OTA keys in this build. 167 INCLUDE_TEST_OTA_KEYS := true 168else # !enable_target_debugging 169 # Target is less debuggable and adbd is off by default 170 ADDITIONAL_DEFAULT_PROPERTIES += ro.debuggable=0 persist.service.adb.enable=0 171endif # !enable_target_debugging 172 173## eng ## 174 175ifeq ($(TARGET_BUILD_VARIANT),eng) 176tags_to_install := user debug eng 177 # Don't require the setup wizard on eng builds 178 ADDITIONAL_BUILD_PROPERTIES := $(filter-out ro.setupwizard.mode=%,\ 179 $(call collapse-pairs, $(ADDITIONAL_BUILD_PROPERTIES))) 180endif 181 182## tests ## 183 184ifeq ($(TARGET_BUILD_VARIANT),tests) 185tags_to_install := user debug eng tests 186endif 187 188## sdk ## 189 190ifneq ($(filter sdk,$(MAKECMDGOALS)),) 191ifneq ($(words $(filter-out $(INTERNAL_MODIFIER_TARGETS),$(MAKECMDGOALS))),1) 192$(error The 'sdk' target may not be specified with any other targets) 193endif 194# TODO: this should be eng I think. Since the sdk is built from the eng 195# variant. 196tags_to_install := user 197ADDITIONAL_BUILD_PROPERTIES += xmpp.auto-presence=true 198ADDITIONAL_BUILD_PROPERTIES += ro.config.nocheckin=yes 199else # !sdk 200# Enable sync for non-sdk builds only (sdk builds lack SubscribedFeedsProvider). 201ADDITIONAL_BUILD_PROPERTIES += ro.config.sync=yes 202endif 203 204ifeq "" "$(filter %:system/etc/apns-conf.xml, $(PRODUCT_COPY_FILES))" 205 # Install an apns-conf.xml file if one's not already being installed. 206 PRODUCT_COPY_FILES += development/data/etc/apns-conf_sdk.xml:system/etc/apns-conf.xml 207 ifeq ($(filter sdk,$(MAKECMDGOALS)),) 208 $(warning implicitly installing apns-conf_sdk.xml) 209 endif 210endif 211 212ADDITIONAL_BUILD_PROPERTIES += net.bt.name=Android 213 214# enable vm tracing in files for now to help track 215# the cause of ANRs in the content process 216ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.stack-trace-file=/data/anr/traces.txt 217 218 219# ------------------------------------------------------------ 220# Define a function that, given a list of module tags, returns 221# non-empty if that module should be installed in /system. 222 223# For most goals, anything not tagged with the "tests" tag should 224# be installed in /system. 225define should-install-to-system 226$(if $(filter tests,$(1)),,true) 227endef 228 229ifneq (,$(filter sdk,$(MAKECMDGOALS))) 230# For the sdk goal, anything with the "samples" tag should be 231# installed in /data even if that module also has "eng"/"debug"/"user". 232define should-install-to-system 233$(if $(filter samples tests,$(1)),,true) 234endef 235endif 236 237 238# If all they typed was make showcommands, we'll actually build 239# the default target. 240ifeq ($(MAKECMDGOALS),showcommands) 241.PHONY: showcommands 242showcommands: $(DEFAULT_GOAL) 243endif 244 245# These targets are going to delete stuff, don't bother including 246# the whole directory tree if that's all we're going to do 247ifeq ($(MAKECMDGOALS),clean) 248dont_bother := true 249endif 250ifeq ($(MAKECMDGOALS),clobber) 251dont_bother := true 252endif 253ifeq ($(MAKECMDGOALS),dataclean) 254dont_bother := true 255endif 256ifeq ($(MAKECMDGOALS),installclean) 257dont_bother := true 258endif 259 260# Bring in all modules that need to be built. 261ifneq ($(dont_bother),true) 262 263subdir_makefiles := 264 265ifeq ($(HOST_OS),windows) 266SDK_ONLY := true 267endif 268ifeq ($(HOST_OS)-$(HOST_ARCH),darwin-ppc) 269SDK_ONLY := true 270endif 271 272ifeq ($(SDK_ONLY),true) 273 274subdirs := \ 275 prebuilt \ 276 build/libs/host \ 277 dalvik/dexdump \ 278 dalvik/libdex \ 279 dalvik/tools/dmtracedump \ 280 development/emulator/mksdcard \ 281 development/tools/activitycreator \ 282 development/tools/line_endings \ 283 development/host \ 284 external/expat \ 285 external/libpng \ 286 external/qemu \ 287 external/sqlite/dist \ 288 external/zlib \ 289 frameworks/base/libs/utils \ 290 frameworks/base/tools/aapt \ 291 frameworks/base/tools/aidl \ 292 system/core/adb \ 293 system/core/fastboot \ 294 system/core/libcutils \ 295 system/core/liblog \ 296 system/core/libzipfile 297 298# The following can only be built if "javac" is available. 299# This check is used when building parts of the SDK under Cygwin. 300ifneq (,$(shell which javac 2>/dev/null)) 301$(warning sdk-only: javac available.) 302subdirs += \ 303 build/tools/signapk \ 304 build/tools/zipalign \ 305 dalvik/dx \ 306 dalvik/libcore \ 307 development/apps \ 308 development/tools/androidprefs \ 309 development/tools/apkbuilder \ 310 development/tools/jarutils \ 311 development/tools/layoutlib_utils \ 312 development/tools/ninepatch \ 313 development/tools/sdkstats \ 314 development/tools/sdkmanager \ 315 frameworks/base \ 316 frameworks/base/tools/layoutlib \ 317 external/googleclient \ 318 packages 319else 320$(warning sdk-only: javac not available.) 321endif 322 323# Exclude tools/acp when cross-compiling windows under linux 324ifeq ($(findstring Linux,$(UNAME)),) 325subdirs += build/tools/acp 326endif 327 328else # !SDK_ONLY 329ifeq ($(BUILD_TINY_ANDROID), true) 330 331# TINY_ANDROID is a super-minimal build configuration, handy for board 332# bringup and very low level debugging 333 334INTERNAL_DEFAULT_DOCS_TARGETS := 335 336subdirs := \ 337 bionic \ 338 system/core \ 339 build/libs \ 340 build/target \ 341 build/tools/acp \ 342 build/tools/apriori \ 343 build/tools/kcm \ 344 build/tools/soslim \ 345 external/elfcopy \ 346 external/elfutils \ 347 external/yaffs2 \ 348 external/zlib 349else # !BUILD_TINY_ANDROID 350 351# 352# Typical build; include any Android.mk files we can find. 353# 354INTERNAL_DEFAULT_DOCS_TARGETS := offline-sdk-docs 355subdirs := $(TOP) 356 357FULL_BUILD := true 358 359endif # !BUILD_TINY_ANDROID 360 361endif # !SDK_ONLY 362 363# Can't use first-makefiles-under here because 364# --mindepth=2 makes the prunes not work. 365subdir_makefiles += \ 366 $(shell build/tools/findleaves.sh --prune="./out" $(subdirs) Android.mk) 367 368# Boards may be defined under $(SRC_TARGET_DIR)/board/$(TARGET_DEVICE) 369# or under vendor/*/$(TARGET_DEVICE). Search in both places, but 370# make sure only one exists. 371# Real boards should always be associated with an OEM vendor. 372board_config_mk := \ 373 $(strip $(wildcard \ 374 $(SRC_TARGET_DIR)/board/$(TARGET_DEVICE)/BoardConfig.mk \ 375 vendor/*/$(TARGET_DEVICE)/BoardConfig.mk \ 376 )) 377ifeq ($(board_config_mk),) 378 $(error No config file found for TARGET_DEVICE $(TARGET_DEVICE)) 379endif 380ifneq ($(words $(board_config_mk)),1) 381 $(error Multiple board config files for TARGET_DEVICE $(TARGET_DEVICE): $(board_config_mk)) 382endif 383include $(board_config_mk) 384TARGET_DEVICE_DIR := $(patsubst %/,%,$(dir $(board_config_mk))) 385board_config_mk := 386 387# Clean up/verify variables defined by the board config file. 388TARGET_BOOTLOADER_BOARD_NAME := $(strip $(TARGET_BOOTLOADER_BOARD_NAME)) 389 390# 391# Include all of the makefiles in the system 392# 393 394ifneq ($(ONE_SHOT_MAKEFILE),) 395# We've probably been invoked by the "mm" shell function 396# with a subdirectory's makefile. 397include $(ONE_SHOT_MAKEFILE) 398# Change CUSTOM_MODULES to include only modules that were 399# defined by this makefile; this will install all of those 400# modules as a side-effect. Do this after including ONE_SHOT_MAKEFILE 401# so that the modules will be installed in the same place they 402# would have been with a normal make. 403CUSTOM_MODULES := $(sort $(call get-tagged-modules,$(ALL_MODULE_TAGS),)) 404FULL_BUILD := 405INTERNAL_DEFAULT_DOCS_TARGETS := 406# Stub out the notice targets, which probably aren't defined 407# when using ONE_SHOT_MAKEFILE. 408NOTICE-HOST-%: ; 409NOTICE-TARGET-%: ; 410else 411include $(subdir_makefiles) 412endif 413# ------------------------------------------------------------------- 414# All module makefiles have been included at this point. 415# ------------------------------------------------------------------- 416 417# ------------------------------------------------------------------- 418# Include any makefiles that must happen after the module makefiles 419# have been included. 420# TODO: have these files register themselves via a global var rather 421# than hard-coding the list here. 422ifdef FULL_BUILD 423 # Only include this during a full build, otherwise we can't be 424 # guaranteed that any policies were included. 425 -include frameworks/policies/base/PolicyConfig.mk 426endif 427 428# ------------------------------------------------------------------- 429# Fix up CUSTOM_MODULES to refer to installed files rather than 430# just bare module names. Leave unknown modules alone in case 431# they're actually full paths to a particular file. 432known_custom_modules := $(filter $(ALL_MODULES),$(CUSTOM_MODULES)) 433unknown_custom_modules := $(filter-out $(ALL_MODULES),$(CUSTOM_MODULES)) 434CUSTOM_MODULES := \ 435 $(call module-installed-files,$(known_custom_modules)) \ 436 $(unknown_custom_modules) 437 438# ------------------------------------------------------------------- 439# Define dependencies for modules that require other modules. 440# This can only happen now, after we've read in all module makefiles. 441# 442# TODO: deal with the fact that a bare module name isn't 443# unambiguous enough. Maybe declare short targets like 444# APPS:Quake or HOST:SHARED_LIBRARIES:libutils. 445# BUG: the system image won't know to depend on modules that are 446# brought in as requirements of other modules. 447define add-required-deps 448$(1): $(2) 449endef 450$(foreach m,$(ALL_MODULES), \ 451 $(eval r := $(ALL_MODULES.$(m).REQUIRED)) \ 452 $(if $(r), \ 453 $(eval r := $(call module-installed-files,$(r))) \ 454 $(eval $(call add-required-deps,$(ALL_MODULES.$(m).INSTALLED),$(r))) \ 455 ) \ 456 ) 457m := 458r := 459add-required-deps := 460 461# ------------------------------------------------------------------- 462# Figure out our module sets. 463 464# Of the modules defined by the component makefiles, 465# determine what we actually want to build. 466# If a module has the "restricted" tag on it, it 467# poisons the rest of the tags and shouldn't appear 468# on any list. 469Default_MODULES := $(sort $(ALL_DEFAULT_INSTALLED_MODULES) \ 470 $(ALL_BUILT_MODULES) \ 471 $(CUSTOM_MODULES)) 472# TODO: Remove the 3 places in the tree that use 473# ALL_DEFAULT_INSTALLED_MODULES and get rid of it from this list. 474 475ifdef FULL_BUILD 476 # The base list of modules to build for this product is specified 477 # by the appropriate product definition file, which was included 478 # by product_config.make. 479 user_PACKAGES := $(call module-installed-files, \ 480 $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES)) 481 ifeq (0,1) 482 $(info user packages for $(TARGET_DEVICE) ($(INTERNAL_PRODUCT)):) 483 $(foreach p,$(user_PACKAGES),$(info : $(p))) 484 $(error done) 485 endif 486else 487 # We're not doing a full build, and are probably only including 488 # a subset of the module makefiles. Don't try to build any modules 489 # requested by the product, because we probably won't have rules 490 # to build them. 491 user_PACKAGES := 492endif 493# Use tags to get the non-APPS user modules. Use the product 494# definition files to get the APPS user modules. 495user_MODULES := $(sort $(call get-tagged-modules,user,_class@APPS restricted)) 496user_MODULES := $(user_MODULES) $(user_PACKAGES) 497 498eng_MODULES := $(sort $(call get-tagged-modules,eng,restricted)) 499debug_MODULES := $(sort $(call get-tagged-modules,debug,restricted)) 500tests_MODULES := $(sort $(call get-tagged-modules,tests,restricted)) 501 502ifeq ($(strip $(tags_to_install)),) 503$(error ASSERTION FAILED: tags_to_install should not be empty) 504endif 505modules_to_install := $(sort $(Default_MODULES) \ 506 $(foreach tag,$(tags_to_install),$($(tag)_MODULES))) 507 508# Some packages may override others using LOCAL_OVERRIDES_PACKAGES. 509# Filter out (do not install) any overridden packages. 510overridden_packages := $(call get-package-overrides,$(modules_to_install)) 511ifdef overridden_packages 512# old_modules_to_install := $(modules_to_install) 513 modules_to_install := \ 514 $(filter-out $(foreach p,$(overridden_packages),$(p) %/$(p).apk), \ 515 $(modules_to_install)) 516endif 517#$(error filtered out 518# $(filter-out $(modules_to_install),$(old_modules_to_install))) 519 520# Don't include any GNU targets in the SDK. It's ok (and necessary) 521# to build the host tools, but nothing that's going to be installed 522# on the target (including static libraries). 523ifneq ($(filter sdk,$(MAKECMDGOALS)),) 524 target_gnu_MODULES := \ 525 $(filter \ 526 $(TARGET_OUT_INTERMEDIATES)/% \ 527 $(TARGET_OUT)/% \ 528 $(TARGET_OUT_DATA)/%, \ 529 $(sort $(call get-tagged-modules,gnu))) 530 $(info Removing from sdk:)$(foreach d,$(target_gnu_MODULES),$(info : $(d))) 531 modules_to_install := \ 532 $(filter-out $(target_gnu_MODULES),$(modules_to_install)) 533endif 534 535 536# config/Makefile contains extra stuff that we don't want to pollute this 537# top-level makefile with. It expects that ALL_DEFAULT_INSTALLED_MODULES 538# contains everything that's built during the current make, but it also further 539# extends ALL_DEFAULT_INSTALLED_MODULES. 540ALL_DEFAULT_INSTALLED_MODULES := $(modules_to_install) 541include $(BUILD_SYSTEM)/Makefile 542modules_to_install := $(sort $(ALL_DEFAULT_INSTALLED_MODULES)) 543ALL_DEFAULT_INSTALLED_MODULES := 544 545endif # dont_bother 546 547# ------------------------------------------------------------------- 548# This is used to to get the ordering right, you can also use these, 549# but they're considered undocumented, so don't complain if their 550# behavior changes. 551.PHONY: prebuilt 552prebuilt: $(ALL_PREBUILT) 553 554# An internal target that depends on all copied headers 555# (see copy_headers.make). Other targets that need the 556# headers to be copied first can depend on this target. 557.PHONY: all_copied_headers 558all_copied_headers: ; 559 560$(ALL_C_CPP_ETC_OBJECTS): | all_copied_headers 561 562# All the droid stuff, in directories 563.PHONY: files 564files: prebuilt $(modules_to_install) $(INSTALLED_ANDROID_INFO_TXT_TARGET) 565 566# ------------------------------------------------------------------- 567 568.PHONY: ramdisk 569ramdisk: $(INSTALLED_RAMDISK_TARGET) 570 571.PHONY: systemtarball 572systemtarball: $(INSTALLED_SYSTEMTARBALL_TARGET) 573 574.PHONY: userdataimage 575userdataimage: $(INSTALLED_USERDATAIMAGE_TARGET) 576 577.PHONY: userdatatarball 578userdatatarball: $(INSTALLED_USERDATATARBALL_TARGET) 579 580.PHONY: bootimage 581bootimage: $(INSTALLED_BOOTIMAGE_TARGET) 582 583ifeq ($(BUILD_TINY_ANDROID), true) 584INSTALLED_RECOVERYIMAGE_TARGET := 585endif 586 587# Build files and then package it into the rom formats 588.PHONY: droidcore 589droidcore: files \ 590 systemimage \ 591 $(INSTALLED_BOOTIMAGE_TARGET) \ 592 $(INSTALLED_RECOVERYIMAGE_TARGET) \ 593 $(INSTALLED_USERDATAIMAGE_TARGET) \ 594 $(INTERNAL_DEFAULT_DOCS_TARGETS) \ 595 $(INSTALLED_FILES_FILE) 596 597# The actual files built by the droidcore target changes depending 598# on the build variant. 599.PHONY: droid tests 600droid tests: droidcore 601 602$(call dist-for-goals, droid, \ 603 $(INTERNAL_UPDATE_PACKAGE_TARGET) \ 604 $(INTERNAL_OTA_PACKAGE_TARGET) \ 605 $(SYMBOLS_ZIP) \ 606 $(APPS_ZIP) \ 607 $(INTERNAL_EMULATOR_PACKAGE_TARGET) \ 608 $(PACKAGE_STATS_FILE) \ 609 $(INSTALLED_FILES_FILE) \ 610 $(INSTALLED_BUILD_PROP_TARGET) \ 611 $(BUILT_TARGET_FILES_PACKAGE) \ 612 ) 613 614# Tests are installed in userdata.img. If we're building the tests 615# variant, copy it for "make tests dist". Also copy a zip of the 616# contents of userdata.img, so that people can easily extract a 617# single .apk. 618ifeq ($(TARGET_BUILD_VARIANT),tests) 619$(call dist-for-goals, droid, \ 620 $(INSTALLED_USERDATAIMAGE_TARGET) \ 621 $(BUILT_TESTS_ZIP_PACKAGE) \ 622 ) 623endif 624 625.PHONY: docs 626docs: $(ALL_DOCS) 627 628.PHONY: sdk 629ALL_SDK_TARGETS := $(INTERNAL_SDK_TARGET) 630sdk: $(ALL_SDK_TARGETS) 631$(call dist-for-goals,sdk,$(ALL_SDK_TARGETS)) 632 633.PHONY: findbugs 634findbugs: $(INTERNAL_FINDBUGS_HTML_TARGET) $(INTERNAL_FINDBUGS_XML_TARGET) 635 636.PHONY: clean 637dirs_to_clean := \ 638 $(PRODUCT_OUT) \ 639 $(TARGET_COMMON_OUT_ROOT) \ 640 $(HOST_OUT) \ 641 $(HOST_COMMON_OUT_ROOT) 642clean: 643 @for dir in $(dirs_to_clean) ; do \ 644 echo "Cleaning $$dir..."; \ 645 rm -rf $$dir; \ 646 done 647 @echo "Clean."; \ 648 649.PHONY: clobber 650clobber: 651 @rm -rf $(OUT_DIR) 652 @echo "Entire build directory removed." 653 654# The rules for dataclean and installclean are defined in cleanbuild.mk. 655 656#xxx scrape this from ALL_MODULE_NAME_TAGS 657.PHONY: modules 658modules: 659 @echo "Available sub-modules:" 660 @echo "$(call module-names-for-tag-list,$(ALL_MODULE_TAGS))" | \ 661 sed -e 's/ */\n/g' | sort -u | $(COLUMN) 662 663.PHONY: showcommands 664showcommands: 665 @echo >/dev/null 666 667