Don't bother going through the source tree
Don't bother going through the source tree in more circumstances: all cleaning goals, helping goals, no-deps goals. Bug: 10244578 Change-Id: Id53a249085c62838e4193962a85e0ac34f46954f
This commit is contained in:
@@ -385,6 +385,10 @@ $(INSTALLED_RAMDISK_TARGET): $(MKBOOTFS) $(INTERNAL_RAMDISK_FILES) | $(MINIGZIP)
|
|||||||
$(call pretty,"Target ram disk: $@")
|
$(call pretty,"Target ram disk: $@")
|
||||||
$(hide) $(MKBOOTFS) $(TARGET_ROOT_OUT) | $(MINIGZIP) > $@
|
$(hide) $(MKBOOTFS) $(TARGET_ROOT_OUT) | $(MINIGZIP) > $@
|
||||||
|
|
||||||
|
.PHONY: ramdisk-nodeps
|
||||||
|
ramdisk-nodeps: $(MKBOOTFS) | $(MINIGZIP)
|
||||||
|
@echo "make $@: ignoring dependencies"
|
||||||
|
$(hide) $(MKBOOTFS) $(TARGET_ROOT_OUT) | $(MINIGZIP) > $(INSTALLED_RAMDISK_TARGET)
|
||||||
|
|
||||||
ifneq ($(strip $(TARGET_NO_KERNEL)),true)
|
ifneq ($(strip $(TARGET_NO_KERNEL)),true)
|
||||||
|
|
||||||
@@ -422,12 +426,24 @@ $(INSTALLED_BOOTIMAGE_TARGET): $(MKEXT2IMG) $(INTERNAL_BOOTIMAGE_FILES)
|
|||||||
$(call pretty,"Target boot image: $@")
|
$(call pretty,"Target boot image: $@")
|
||||||
$(hide) $(MKEXT2BOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) --output $@
|
$(hide) $(MKEXT2BOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) --output $@
|
||||||
|
|
||||||
|
.PHONY: bootimage-nodeps
|
||||||
|
bootimage-nodeps: $(MKEXT2IMG)
|
||||||
|
@echo "make $@: ignoring dependencies"
|
||||||
|
$(hide) $(MKEXT2BOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) --output $(INSTALLED_BOOTIMAGE_TARGET)
|
||||||
|
|
||||||
else # TARGET_BOOTIMAGE_USE_EXT2 != true
|
else # TARGET_BOOTIMAGE_USE_EXT2 != true
|
||||||
|
|
||||||
$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES)
|
$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES)
|
||||||
$(call pretty,"Target boot image: $@")
|
$(call pretty,"Target boot image: $@")
|
||||||
$(hide) $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $@
|
$(hide) $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $@
|
||||||
$(hide) $(call assert-max-image-size,$@,$(BOARD_BOOTIMAGE_PARTITION_SIZE),raw)
|
$(hide) $(call assert-max-image-size,$@,$(BOARD_BOOTIMAGE_PARTITION_SIZE),raw)
|
||||||
|
|
||||||
|
.PHONY: bootimage-nodeps
|
||||||
|
bootimage-nodeps: $(MKBOOTIMG)
|
||||||
|
@echo "make $@: ignoring dependencies"
|
||||||
|
$(hide) $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $(INSTALLED_BOOTIMAGE_TARGET)
|
||||||
|
$(hide) $(call assert-max-image-size,$(INSTALLED_BOOTIMAGE_TARGET),$(BOARD_BOOTIMAGE_PARTITION_SIZE),raw)
|
||||||
|
|
||||||
endif # TARGET_BOOTIMAGE_USE_EXT2
|
endif # TARGET_BOOTIMAGE_USE_EXT2
|
||||||
|
|
||||||
else # TARGET_NO_KERNEL
|
else # TARGET_NO_KERNEL
|
||||||
@@ -1600,9 +1616,11 @@ $(INTERNAL_FINDBUGS_HTML_TARGET): $(INTERNAL_FINDBUGS_XML_TARGET)
|
|||||||
|
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
# These are some additional build tasks that need to be run.
|
# These are some additional build tasks that need to be run.
|
||||||
|
ifneq ($(dont_bother),true)
|
||||||
include $(sort $(wildcard $(BUILD_SYSTEM)/tasks/*.mk))
|
include $(sort $(wildcard $(BUILD_SYSTEM)/tasks/*.mk))
|
||||||
-include $(sort $(wildcard vendor/*/build/tasks/*.mk))
|
-include $(sort $(wildcard vendor/*/build/tasks/*.mk))
|
||||||
-include $(sort $(wildcard device/*/build/tasks/*.mk))
|
-include $(sort $(wildcard device/*/build/tasks/*.mk))
|
||||||
|
endif
|
||||||
|
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
# Create SDK repository packages. Must be done after tasks/* since
|
# Create SDK repository packages. Must be done after tasks/* since
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
# Don't bother with the cleanspecs if you are running mm/mmm
|
# Don't bother with the cleanspecs if you are running mm/mmm
|
||||||
ifndef ONE_SHOT_MAKEFILE
|
ifeq ($(ONE_SHOT_MAKEFILE)$(dont_bother),)
|
||||||
|
|
||||||
INTERNAL_CLEAN_STEPS :=
|
INTERNAL_CLEAN_STEPS :=
|
||||||
|
|
||||||
@@ -100,7 +100,7 @@ clean_steps_file :=
|
|||||||
INTERNAL_CLEAN_STEPS :=
|
INTERNAL_CLEAN_STEPS :=
|
||||||
INTERNAL_CLEAN_BUILD_VERSION :=
|
INTERNAL_CLEAN_BUILD_VERSION :=
|
||||||
|
|
||||||
endif # ifndef ONE_SHOT_MAKEFILE
|
endif # if not ONE_SHOT_MAKEFILE dont_bother
|
||||||
|
|
||||||
# Since products and build variants (unfortunately) share the same
|
# Since products and build variants (unfortunately) share the same
|
||||||
# PRODUCT_OUT staging directory, things can get out of sync if different
|
# PRODUCT_OUT staging directory, things can get out of sync if different
|
||||||
|
@@ -159,6 +159,26 @@ endif
|
|||||||
TARGET_DEVICE_DIR := $(patsubst %/,%,$(dir $(board_config_mk)))
|
TARGET_DEVICE_DIR := $(patsubst %/,%,$(dir $(board_config_mk)))
|
||||||
board_config_mk :=
|
board_config_mk :=
|
||||||
|
|
||||||
|
# Perhaps we should move this block to build/core/Makefile,
|
||||||
|
# once we don't have TARGET_NO_KERNEL reference in AndroidBoard.mk/Android.mk.
|
||||||
|
ifneq ($(strip $(TARGET_NO_BOOTLOADER)),true)
|
||||||
|
INSTALLED_BOOTLOADER_MODULE := $(PRODUCT_OUT)/bootloader
|
||||||
|
ifeq ($(strip $(TARGET_BOOTLOADER_IS_2ND)),true)
|
||||||
|
INSTALLED_2NDBOOTLOADER_TARGET := $(PRODUCT_OUT)/2ndbootloader
|
||||||
|
else
|
||||||
|
INSTALLED_2NDBOOTLOADER_TARGET :=
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
INSTALLED_BOOTLOADER_MODULE :=
|
||||||
|
INSTALLED_2NDBOOTLOADER_TARGET :=
|
||||||
|
endif # TARGET_NO_BOOTLOADER
|
||||||
|
ifneq ($(strip $(TARGET_NO_KERNEL)),true)
|
||||||
|
INSTALLED_KERNEL_TARGET := $(PRODUCT_OUT)/kernel
|
||||||
|
else
|
||||||
|
INSTALLED_KERNEL_TARGET :=
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
# The build system exposes several variables for where to find the kernel
|
# The build system exposes several variables for where to find the kernel
|
||||||
# headers:
|
# headers:
|
||||||
# TARGET_DEVICE_KERNEL_HEADERS is automatically created for the current
|
# TARGET_DEVICE_KERNEL_HEADERS is automatically created for the current
|
||||||
|
@@ -14,13 +14,6 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
ifeq ($(MAKECMDGOALS),help)
|
|
||||||
dont_bother := true
|
|
||||||
endif
|
|
||||||
ifeq ($(MAKECMDGOALS),out)
|
|
||||||
dont_bother := true
|
|
||||||
endif
|
|
||||||
|
|
||||||
.PHONY: help
|
.PHONY: help
|
||||||
help:
|
help:
|
||||||
@echo
|
@echo
|
||||||
@@ -39,4 +32,3 @@ help:
|
|||||||
.PHONY: out
|
.PHONY: out
|
||||||
out:
|
out:
|
||||||
@echo "I'm sure you're nice and all, but no thanks."
|
@echo "I'm sure you're nice and all, but no thanks."
|
||||||
|
|
||||||
|
35
core/main.mk
35
core/main.mk
@@ -71,6 +71,22 @@ $(DEFAULT_GOAL):
|
|||||||
.PHONY: FORCE
|
.PHONY: FORCE
|
||||||
FORCE:
|
FORCE:
|
||||||
|
|
||||||
|
# These goals don't need to collect and include Android.mks/CleanSpec.mks
|
||||||
|
# in the source tree.
|
||||||
|
dont_bother_goals := clean clobber dataclean installclean \
|
||||||
|
help out \
|
||||||
|
snod systemimage-nodeps \
|
||||||
|
stnod systemtarball-nodeps \
|
||||||
|
userdataimage-nodeps userdatatarball-nodeps \
|
||||||
|
cacheimage-nodeps \
|
||||||
|
vendorimage-nodeps \
|
||||||
|
ramdisk-nodeps \
|
||||||
|
bootimage-nodeps
|
||||||
|
|
||||||
|
ifneq ($(filter $(dont_bother_goals), $(MAKECMDGOALS)),)
|
||||||
|
dont_bother := true
|
||||||
|
endif
|
||||||
|
|
||||||
# Targets that provide quick help on the build system.
|
# Targets that provide quick help on the build system.
|
||||||
include $(BUILD_SYSTEM)/help.mk
|
include $(BUILD_SYSTEM)/help.mk
|
||||||
|
|
||||||
@@ -84,21 +100,6 @@ include $(BUILD_SYSTEM)/config.mk
|
|||||||
# be generated correctly
|
# be generated correctly
|
||||||
include $(BUILD_SYSTEM)/cleanbuild.mk
|
include $(BUILD_SYSTEM)/cleanbuild.mk
|
||||||
|
|
||||||
# These targets are going to delete stuff, don't bother including
|
|
||||||
# the whole directory tree if that's all we're going to do
|
|
||||||
ifeq ($(MAKECMDGOALS),clean)
|
|
||||||
dont_bother := true
|
|
||||||
endif
|
|
||||||
ifeq ($(MAKECMDGOALS),clobber)
|
|
||||||
dont_bother := true
|
|
||||||
endif
|
|
||||||
ifeq ($(MAKECMDGOALS),dataclean)
|
|
||||||
dont_bother := true
|
|
||||||
endif
|
|
||||||
ifeq ($(MAKECMDGOALS),installclean)
|
|
||||||
dont_bother := true
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Include the google-specific config
|
# Include the google-specific config
|
||||||
-include vendor/google/build/config.mk
|
-include vendor/google/build/config.mk
|
||||||
|
|
||||||
@@ -675,6 +676,8 @@ ifdef is_sdk_build
|
|||||||
$(warning $(ALL_MODULES.$(m).MAKEFILE): Module '$(m)' in PRODUCT_PACKAGES_TESTS has nothing to install!)))
|
$(warning $(ALL_MODULES.$(m).MAKEFILE): Module '$(m)' in PRODUCT_PACKAGES_TESTS has nothing to install!)))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
endif # dont_bother
|
||||||
|
|
||||||
# build/core/Makefile contains extra stuff that we don't want to pollute this
|
# build/core/Makefile contains extra stuff that we don't want to pollute this
|
||||||
# top-level makefile with. It expects that ALL_DEFAULT_INSTALLED_MODULES
|
# top-level makefile with. It expects that ALL_DEFAULT_INSTALLED_MODULES
|
||||||
# contains everything that's built during the current make, but it also further
|
# contains everything that's built during the current make, but it also further
|
||||||
@@ -684,8 +687,6 @@ include $(BUILD_SYSTEM)/Makefile
|
|||||||
modules_to_install := $(sort $(ALL_DEFAULT_INSTALLED_MODULES))
|
modules_to_install := $(sort $(ALL_DEFAULT_INSTALLED_MODULES))
|
||||||
ALL_DEFAULT_INSTALLED_MODULES :=
|
ALL_DEFAULT_INSTALLED_MODULES :=
|
||||||
|
|
||||||
endif # dont_bother
|
|
||||||
|
|
||||||
|
|
||||||
# These are additional goals that we build, in order to make sure that there
|
# These are additional goals that we build, in order to make sure that there
|
||||||
# is as little code as possible in the tree that doesn't build.
|
# is as little code as possible in the tree that doesn't build.
|
||||||
|
@@ -2,24 +2,6 @@
|
|||||||
# Set up product-global definitions and include product-specific rules.
|
# Set up product-global definitions and include product-specific rules.
|
||||||
#
|
#
|
||||||
|
|
||||||
ifneq ($(strip $(TARGET_NO_BOOTLOADER)),true)
|
|
||||||
INSTALLED_BOOTLOADER_MODULE := $(PRODUCT_OUT)/bootloader
|
|
||||||
ifeq ($(strip $(TARGET_BOOTLOADER_IS_2ND)),true)
|
|
||||||
INSTALLED_2NDBOOTLOADER_TARGET := $(PRODUCT_OUT)/2ndbootloader
|
|
||||||
else
|
|
||||||
INSTALLED_2NDBOOTLOADER_TARGET :=
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
INSTALLED_BOOTLOADER_MODULE :=
|
|
||||||
INSTALLED_2NDBOOTLOADER_TARGET :=
|
|
||||||
endif # TARGET_NO_BOOTLOADER
|
|
||||||
|
|
||||||
ifneq ($(strip $(TARGET_NO_KERNEL)),true)
|
|
||||||
INSTALLED_KERNEL_TARGET := $(PRODUCT_OUT)/kernel
|
|
||||||
else
|
|
||||||
INSTALLED_KERNEL_TARGET :=
|
|
||||||
endif
|
|
||||||
|
|
||||||
-include $(TARGET_DEVICE_DIR)/AndroidBoard.mk
|
-include $(TARGET_DEVICE_DIR)/AndroidBoard.mk
|
||||||
|
|
||||||
# Generate a file that contains various information about the
|
# Generate a file that contains various information about the
|
||||||
|
Reference in New Issue
Block a user