Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3bfc095f authored by Dan Willemsen's avatar Dan Willemsen Committed by Gerrit Code Review
Browse files

Merge "Remove USE_NINJA=false"

parents 1888ea5f 1c6dc5b9
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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.
+3 −11
Original line number Diff line number Diff line
@@ -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)
+1 −16
Original line number Diff line number Diff line
@@ -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).
+0 −1
Original line number Diff line number Diff line
@@ -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 $@)
+1 −1
Original line number Diff line number Diff line
@@ -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 $@
Loading