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

Commit 3f3df96b authored by Dan Willemsen's avatar Dan Willemsen Committed by android-build-merger
Browse files

Merge "Only update previous product config when changed" am: 2fcacb5a am:...

Merge "Only update previous product config when changed" am: 2fcacb5a am: 5f381cfc am: 8e77f86d
am: c99f6889

Change-Id: I106fcb5c030a2f9a5241a0763060179eeb0a4077
parents 58bb12ac c99f6889
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -151,6 +151,7 @@ endif # if not ONE_SHOT_MAKEFILE dont_bother
# necessary to keep things consistent.

previous_build_config_file := $(PRODUCT_OUT)/previous_build_config.mk
current_build_config_file := $(PRODUCT_OUT)/current_build_config.mk

current_build_config := \
    $(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT)
@@ -176,15 +177,17 @@ endif # else, this is the first build, so no need to clean.

# Write the new state to the file.
#
ifneq ($(PREVIOUS_BUILD_CONFIG)-$(PREVIOUS_SANITIZE_TARGET),$(current_build_config)-$(current_sanitize_target))
$(shell \
  mkdir -p $(dir $(previous_build_config_file)) && \
  mkdir -p $(dir $(current_build_config_file)) && \
  echo "PREVIOUS_BUILD_CONFIG := $(current_build_config)" > \
      $(previous_build_config_file) \
      $(current_build_config_file) \
 )
endif
$(shell cmp $(current_build_config_file) $(previous_build_config_file) > /dev/null 2>&1 || \
  mv -f $(current_build_config_file) $(previous_build_config_file))

PREVIOUS_BUILD_CONFIG :=
previous_build_config_file :=
current_build_config_file :=
current_build_config :=

#