Merge "Remove USE_NINJA=false"

This commit is contained in:
Dan Willemsen 2016-02-29 22:16:14 +00:00 committed by Gerrit Code Review
commit 3bfc095f53
15 changed files with 17 additions and 66 deletions

View File

@ -56,7 +56,6 @@ ifeq ($(my_host_cross),true)
my_module_tags :=
endif
ifdef BUILDING_WITH_NINJA
# Ninja has an implicit dependency on the command being run, and kati will
# regenerate the ninja manifest if any read makefile changes, so there is no
# need to have dependencies on makefiles.
@ -64,7 +63,6 @@ ifdef BUILDING_WITH_NINJA
# a .mk file, because a few users of LOCAL_ADDITIONAL_DEPENDENCIES don't include
# base_rules.mk, but it will fix the most common ones.
LOCAL_ADDITIONAL_DEPENDENCIES := $(filter-out %.mk,$(LOCAL_ADDITIONAL_DEPENDENCIES))
endif
###########################################################
## Validate and define fallbacks for input LOCAL_* variables.

View File

@ -53,7 +53,7 @@ my_cxx_wrapper := $(CXX_WRAPPER)
my_c_includes := $(LOCAL_C_INCLUDES)
my_generated_sources := $(LOCAL_GENERATED_SOURCES)
my_native_coverage := $(LOCAL_NATIVE_COVERAGE)
my_additional_dependencies := $(LOCAL_MODULE_MAKEFILE_DEP) $(LOCAL_ADDITIONAL_DEPENDENCIES)
my_additional_dependencies := $(LOCAL_ADDITIONAL_DEPENDENCIES)
my_export_c_include_dirs := $(LOCAL_EXPORT_C_INCLUDE_DIRS)
ifdef LOCAL_IS_HOST_MODULE
@ -1143,7 +1143,7 @@ import_includes_deps := $(strip \
$(foreach l, $(my_static_libraries) $(my_whole_static_libraries), \
$(call intermediates-dir-for,STATIC_LIBRARIES,$(l),$(LOCAL_IS_HOST_MODULE),,$(LOCAL_2ND_ARCH_VAR_PREFIX),$(my_host_cross))/export_includes))
$(import_includes): PRIVATE_IMPORT_EXPORT_INCLUDES := $(import_includes_deps)
$(import_includes) : $(LOCAL_MODULE_MAKEFILE_DEP) $(import_includes_deps)
$(import_includes) : $(import_includes_deps)
@echo Import includes file: $@
$(hide) mkdir -p $(dir $@) && rm -f $@
ifdef import_includes_deps
@ -1210,11 +1210,7 @@ endif
# that custom build rules which generate .o files don't consume other generated
# sources as input (or if they do they take care of that dependency themselves).
$(normal_objects) : | $(my_generated_sources)
ifeq ($(BUILDING_WITH_NINJA),true)
$(all_objects) : $(import_includes)
else
$(all_objects) : | $(import_includes)
endif
ALL_C_CPP_ETC_OBJECTS += $(all_objects)
@ -1406,7 +1402,7 @@ $(export_includes): PRIVATE_EXPORT_C_INCLUDE_DIRS := $(my_export_c_include_dirs)
# Similarly, the generated DBus headers need to exist before we export their location.
# People are not going to consume the aidl generated cpp file, but the cpp file is
# generated after the headers, so this is a convenient way to ensure the headers exist.
$(export_includes) : $(LOCAL_MODULE_MAKEFILE_DEP) $(proto_generated_headers) $(dbus_generated_headers) $(aidl_gen_cpp)
$(export_includes) : $(proto_generated_headers) $(dbus_generated_headers) $(aidl_gen_cpp)
@echo Export includes file: $< -- $@
$(hide) mkdir -p $(dir $@) && rm -f $@.tmp
ifdef my_export_c_include_dirs
@ -1416,15 +1412,11 @@ ifdef my_export_c_include_dirs
else
$(hide) touch $@.tmp
endif
ifeq ($(BUILDING_WITH_NINJA),true)
$(hide) if cmp -s $@.tmp $@ ; then \
rm $@.tmp ; \
else \
mv $@.tmp $@ ; \
fi
else
mv $@.tmp $@ ;
endif
# Kati adds restat=1 to ninja. GNU make does nothing for this.
.KATI_RESTAT: $(export_includes)

View File

@ -133,7 +133,6 @@ endef
define my-dir
$(strip \
$(eval LOCAL_MODULE_MAKEFILE := $$(lastword $$(MAKEFILE_LIST))) \
$(eval LOCAL_MODULE_MAKEFILE_DEP := $(if $(BUILDING_WITH_NINJA),,$$(LOCAL_MODULE_MAKEFILE))) \
$(if $(filter $(BUILD_SYSTEM)/% $(OUT_DIR)/%,$(LOCAL_MODULE_MAKEFILE)), \
$(error my-dir must be called before including any other makefile.) \
, \
@ -895,15 +894,9 @@ endef
###########################################################
# $(1): the .P file
# $(2): the main build target
ifeq ($(BUILDING_WITH_NINJA),true)
define include-depfile
$(eval $(2) : .KATI_DEPFILE := $1)
endef
else
define include-depfile
$(eval -include $1)
endef
endif
###########################################################
## Track source files compiled to objects
@ -2025,9 +2018,7 @@ endef
# Moves $1.tmp to $1 if necessary. This is designed to be used with
# .KATI_RESTAT. For kati, this function doesn't update the timestamp
# of $1 when $1.tmp is identical to $1 so that ninja won't rebuild
# targets which depend on $1. For GNU make, this function simply
# copies $1.tmp to $1.
ifeq ($(BUILDING_WITH_NINJA),true)
# targets which depend on $1.
define commit-change-for-toc
$(hide) if cmp -s $1.tmp $1 ; then \
rm $1.tmp ; \
@ -2035,12 +2026,6 @@ else \
mv $1.tmp $1 ; \
fi
endef
else
define commit-change-for-toc
@# make doesn't support restat. We always update .toc files so the dependents will always be updated too.
$(hide) mv $1.tmp $1
endef
endif
## Rule to create a table of contents from a .jar file.
## Must be called with $(eval).

View File

@ -161,7 +161,6 @@ $(full_target): \
$(droiddoc) \
$(html_dir_files) \
$(full_java_lib_deps) \
$(LOCAL_MODULE_MAKEFILE_DEP) \
$(LOCAL_ADDITIONAL_DEPENDENCIES)
@echo Docs droiddoc: $(PRIVATE_OUT_DIR)
$(hide) mkdir -p $(dir $@)

View File

@ -42,7 +42,7 @@ endif
# $(my_symlink) doesn't need to depend on $(PRIVATE_SRC_BINARY_NAME): we can generate symlink to nonexistent file.
# If you add the dependency, make would compare the timestamp of a file against that of its symlink:
# they are always equal, because make follows symlink.
$(my_symlink): $(LOCAL_MODULE_MAKEFILE_DEP)
$(my_symlink):
@echo "Symlink: $@ -> $(PRIVATE_SRC_BINARY_NAME)"
@mkdir -p $(dir $@)
@rm -rf $@

View File

@ -16,16 +16,6 @@
# Notice: this works only with Google's Goma build infrastructure.
ifneq ($(filter-out false,$(USE_GOMA)),)
# Check if USE_NINJA is not false because GNU make won't work well
# with goma. Note this file is evaluated twice, once by GNU make and
# once by kati with USE_NINJA=false. We do this check in the former
# pass.
ifndef KATI
ifeq ($(USE_NINJA),false)
$(error USE_GOMA=true is not compatible with USE_NINJA=false)
endif
endif
# Goma requires a lot of processes and file descriptors.
ifeq ($(shell echo $$(($$(ulimit -u) < 2500 || $$(ulimit -n) < 16000))),1)
$(warning Max user processes and/or open files are insufficient)

View File

@ -76,7 +76,6 @@ $(full_classes_compiled_jar): \
$(full_java_lib_deps) \
$(jar_manifest_file) \
$(proto_java_sources_file_stamp) \
$(LOCAL_MODULE_MAKEFILE_DEP) \
$(LOCAL_ADDITIONAL_DEPENDENCIES)
$(transform-host-java-to-package)
@ -126,7 +125,7 @@ $(built_dex): PRIVATE_CLASSES_JACK := $(full_classes_jack)
$(built_dex): PRIVATE_JACK_FLAGS := $(GLOBAL_JAVAC_DEBUG_FLAGS) $(LOCAL_JACK_FLAGS)
$(built_dex): PRIVATE_JACK_VERSION := $(LOCAL_JACK_VERSION)
$(built_dex): $(java_sources) $(java_resource_sources) $(full_jack_deps) \
$(jar_manifest_file) $(proto_java_sources_file_stamp) $(LOCAL_MODULE_MAKEFILE_DEP) \
$(jar_manifest_file) $(proto_java_sources_file_stamp) \
$(LOCAL_ADDITIONAL_DEPENDENCIES) $(JACK) | setup-jack-server
@echo Building with Jack: $@
$(jack-java-to-dex)

View File

@ -48,7 +48,7 @@ $(full_classes_jack): \
PRIVATE_JACK_INCREMENTAL_DIR :=
endif
$(full_classes_jack): $(java_sources) $(java_resource_sources) $(full_jack_deps) \
$(jar_manifest_file) $(layers_file) $(LOCAL_MODULE_MAKEFILE_DEP) \
$(jar_manifest_file) $(layers_file) \
$(LOCAL_ADDITIONAL_DEPENDENCIES) $(LOCAL_JARJAR_RULES) \
$(JACK) | setup-jack-server
@echo Building with Jack: $@

View File

@ -88,6 +88,5 @@ $(full_classes_compiled_jar): \
$(full_java_lib_deps) \
$(jar_manifest_file) \
$(proto_java_sources_file_stamp) \
$(LOCAL_MODULE_MAKEFILE_DEP) \
$(LOCAL_ADDITIONAL_DEPENDENCIES)
$(transform-host-java-to-package)

View File

@ -44,7 +44,6 @@ $(LOCAL_BUILD_MODULE): PRIVATE_HOST_LIBPROFILE_RT := $(my_host_libprofile_rt)
$(LOCAL_BUILT_MODULE): \
$(all_objects) \
$(all_libraries) \
$(LOCAL_MODULE_MAKEFILE_DEP) \
$(LOCAL_ADDITIONAL_DEPENDENCIES)
$(transform-host-o-to-shared-lib)

View File

@ -304,7 +304,6 @@ $(aidl_java_sources): PRIVATE_AIDL_FLAGS := -b $(addprefix -p,$(aidl_preprocess_
$(aidl_java_sources): $(intermediates.COMMON)/src/%.java: \
$(LOCAL_PATH)/%.aidl \
$(LOCAL_MODULE_MAKEFILE_DEP) \
$(LOCAL_ADDITIONAL_DEPENDENCIES) \
$(AIDL) \
$(aidl_preprocess_import)
@ -413,7 +412,6 @@ $(full_classes_compiled_jar): \
$(layers_file) \
$(RenderScript_file_stamp) \
$(proto_java_sources_file_stamp) \
$(LOCAL_MODULE_MAKEFILE_DEP) \
$(LOCAL_ADDITIONAL_DEPENDENCIES)
$(transform-java-to-classes.jar)
@ -665,7 +663,7 @@ $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_JACK_VERSION := $(LOCAL_JACK_VERSION)
jack_all_deps := $(java_sources) $(java_resource_sources) $(full_jack_deps) \
$(jar_manifest_file) $(layers_file) $(RenderScript_file_stamp) $(proguard_flag_files) \
$(proto_java_sources_file_stamp) $(LOCAL_ADDITIONAL_DEPENDENCIES) $(LOCAL_JARJAR_RULES) \
$(LOCAL_MODULE_MAKEFILE_DEP) $(JACK)
$(JACK)
ifeq ($(LOCAL_IS_STATIC_JAVA_LIBRARY),true)
$(full_classes_jack): $(jack_all_deps) | setup-jack-server

View File

@ -96,22 +96,15 @@ include $(BUILD_SYSTEM)/help.mk
# and host information.
include $(BUILD_SYSTEM)/config.mk
relaunch_with_ninja :=
ifneq ($(USE_NINJA),false)
ifndef BUILDING_WITH_NINJA
relaunch_with_ninja := true
endif
ifndef KATI
ifdef USE_NINJA
$(warning USE_NINJA is ignored. Ninja is always used.)
endif
ifeq ($(relaunch_with_ninja),true)
# Mark this is a ninja build.
$(shell mkdir -p $(OUT_DIR) && touch $(OUT_DIR)/ninja_build)
include build/core/ninja.mk
else # !relaunch_with_ninja
ifndef BUILDING_WITH_NINJA
# Remove ninja build mark if it exists.
$(shell rm -f $(OUT_DIR)/ninja_build)
endif
else # KATI
# With these files findleaves.py won't be unnecessarily slower even if
# there is a user creates a copy of $(OUT_DIR).
@ -1120,4 +1113,4 @@ showcommands:
.PHONY: nothing
nothing:
@echo Successfully read the makefiles.
endif # !relaunch_with_ninja
endif # KATI

View File

@ -7,7 +7,7 @@ LOCAL_MODULE_SUFFIX := -timestamp
include $(BUILD_SYSTEM)/base_rules.mk
$(LOCAL_BUILT_MODULE): $(LOCAL_MODULE_MAKEFILE_DEP) $(LOCAL_ADDITIONAL_DEPENDENCIES)
$(LOCAL_BUILT_MODULE): $(LOCAL_ADDITIONAL_DEPENDENCIES)
$(hide) echo "Fake: $@"
$(hide) mkdir -p $(dir $@)
$(hide) touch $@

View File

@ -95,7 +95,7 @@ else # LOCAL_STRIP_MODULE and LOCAL_PACK_MODULE_RELOCATIONS not true
ifdef prebuilt_module_is_a_library
export_includes := $(intermediates)/export_includes
$(export_includes): PRIVATE_EXPORT_C_INCLUDE_DIRS := $(LOCAL_EXPORT_C_INCLUDE_DIRS)
$(export_includes) : $(LOCAL_MODULE_MAKEFILE_DEP)
$(export_includes) :
@echo Export includes file: $< -- $@
$(hide) mkdir -p $(dir $@) && rm -f $@
ifdef LOCAL_EXPORT_C_INCLUDE_DIRS
@ -330,7 +330,7 @@ endif
# We may be building classes.jack from a host jar for host dalvik Java library.
$(intermediates.COMMON)/classes.jack : PRIVATE_JACK_FLAGS:=$(LOCAL_JACK_FLAGS)
$(intermediates.COMMON)/classes.jack : $(my_src_jar) $(LOCAL_MODULE_MAKEFILE_DEP) \
$(intermediates.COMMON)/classes.jack : $(my_src_jar) \
$(LOCAL_ADDITIONAL_DEPENDENCIES) $(JACK) | setup-jack-server
$(transform-jar-to-jack)
@ -341,6 +341,6 @@ $(intermediates.COMMON)/classes.dex.toc: $(intermediates.COMMON)/classes.jack
endif # JAVA_LIBRARIES
$(built_module) : $(LOCAL_MODULE_MAKEFILE_DEP) $(LOCAL_ADDITIONAL_DEPENDENCIES)
$(built_module) : $(LOCAL_ADDITIONAL_DEPENDENCIES)
my_prebuilt_src_file :=

View File

@ -76,7 +76,6 @@ $(linked_module): \
$(all_libraries) \
$(my_target_crtbegin_so_o) \
$(my_target_crtend_so_o) \
$(LOCAL_MODULE_MAKEFILE_DEP) \
$(LOCAL_ADDITIONAL_DEPENDENCIES)
$(transform-o-to-shared-lib)