OSDN Git Service

resolved conflicts for merge of c576c08f to mnc-dev-plus-aosp
authorDan Willemsen <dwillemsen@google.com>
Wed, 12 Aug 2015 01:21:43 +0000 (18:21 -0700)
committerDan Willemsen <dwillemsen@google.com>
Wed, 12 Aug 2015 01:21:43 +0000 (18:21 -0700)
Change-Id: I2d28518ac5a26de7c5df9a2e3a1902e880155101

1  2 
core/Makefile
core/config.mk
core/main.mk
core/version_defaults.mk
tools/buildinfo.sh

diff --cc core/Makefile
@@@ -77,13 -75,7 +77,13 @@@ $(INSTALLED_DEFAULT_PROP_TARGET): $(int
                echo "#" >> $@;
        $(hide) $(foreach line,$(ADDITIONAL_DEFAULT_PROPERTIES), \
                echo "$(line)" >> $@;)
 -      build/tools/post_process_props.py $@
 +      $(hide) echo "#" >> $@; \
 +              echo "# BOOTIMAGE_BUILD_PROPERTIES" >> $@; \
 +              echo "#" >> $@;
-       $(hide) echo ro.bootimage.build.date=`date`>>$@
-       $(hide) echo ro.bootimage.build.date.utc=`date +%s`>>$@
++      $(hide) echo ro.bootimage.build.date=`date -d "$(BUILD_DATETIME_FROM_FILE)"`>>$@
++      $(hide) echo ro.bootimage.build.date.utc=`date -d "$(BUILD_DATETIME_FROM_FILE)" +%s`>>$@
 +      $(hide) echo ro.bootimage.build.fingerprint="$(BUILD_FINGERPRINT_FROM_FILE)">>$@
 +      $(hide) build/tools/post_process_props.py $@
  
  # -----------------------------------------------------------------
  # build.prop
diff --cc core/config.mk
@@@ -162,10 -155,23 +162,27 @@@ endi
  # are specific to the user's build configuration.
  include $(BUILD_SYSTEM)/envsetup.mk
  
 +# Pruned directory options used when using findleaves.py
 +# See envsetup.mk for a description of SCAN_EXCLUDE_DIRS
 +FIND_LEAVES_EXCLUDES := $(addprefix --prune=, $(OUT_DIR) $(SCAN_EXCLUDE_DIRS) .repo .git)
 +
+ # ---------------------------------------------------------------
+ # Allow the C/C++ macros __DATE__ and __TIME__ to be set to the
+ # build date and time, so that a build may be repeated.
+ # Write the date and time to a file so that the command line
+ # doesn't change every time, which would cause ninja to rebuild
+ # the files.
+ $(shell mkdir -p $(OUT_DIR) && \
+     date -d "$(BUILD_DATETIME)" "+%b %_d %Y" > $(OUT_DIR)/build_c_date.txt && \
+     date -d "$(BUILD_DATETIME)" +%T > $(OUT_DIR)/build_c_time.txt)
+ BUILD_DATETIME_C_DATE := $$(cat $(OUT_DIR)/build_c_date.txt)
+ BUILD_DATETIME_C_TIME := $$(cat $(OUT_DIR)/build_c_time.txt)
+ ifeq ($(OVERRIDE_C_DATE_TIME),true)
+ COMMON_GLOBAL_CFLAGS += -Wno-builtin-macro-redefined -D__DATE__="\"$(BUILD_DATETIME_C_DATE)\"" -D__TIME__=\"$(BUILD_DATETIME_C_TIME)\"
+ COMMON_GLOBAL_CPPFLAGS += -Wno-builtin-macro-redefined -D__DATE__="\"$(BUILD_DATETIME_C_DATE)\"" -D__TIME__=\"$(BUILD_DATETIME_C_TIME)\"
+ endif
  # The build system exposes several variables for where to find the kernel
  # headers:
  #   TARGET_DEVICE_KERNEL_HEADERS is automatically created for the current
diff --cc core/main.mk
Simple merge
Simple merge
Simple merge