forked from openkylin/platform_build
resolved conflicts for merge of c576c08f
to mnc-dev-plus-aosp
Change-Id: I2d28518ac5a26de7c5df9a2e3a1902e880155101
This commit is contained in:
commit
33f46daa22
|
@ -80,8 +80,8 @@ $(INSTALLED_DEFAULT_PROP_TARGET): $(intermediate_system_build_prop)
|
||||||
$(hide) echo "#" >> $@; \
|
$(hide) echo "#" >> $@; \
|
||||||
echo "# BOOTIMAGE_BUILD_PROPERTIES" >> $@; \
|
echo "# BOOTIMAGE_BUILD_PROPERTIES" >> $@; \
|
||||||
echo "#" >> $@;
|
echo "#" >> $@;
|
||||||
$(hide) echo ro.bootimage.build.date=`date`>>$@
|
$(hide) echo ro.bootimage.build.date=`date -d "$(BUILD_DATETIME_FROM_FILE)"`>>$@
|
||||||
$(hide) echo ro.bootimage.build.date.utc=`date +%s`>>$@
|
$(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) echo ro.bootimage.build.fingerprint="$(BUILD_FINGERPRINT_FROM_FILE)">>$@
|
||||||
$(hide) build/tools/post_process_props.py $@
|
$(hide) build/tools/post_process_props.py $@
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ ifeq (,$(strip $(BUILD_FINGERPRINT)))
|
||||||
ifneq ($(filter eng.%,$(BUILD_NUMBER)),)
|
ifneq ($(filter eng.%,$(BUILD_NUMBER)),)
|
||||||
# Trim down BUILD_FINGERPRINT: the default BUILD_NUMBER makes it easily exceed
|
# Trim down BUILD_FINGERPRINT: the default BUILD_NUMBER makes it easily exceed
|
||||||
# the Android system property length limit (PROPERTY_VALUE_MAX=92).
|
# the Android system property length limit (PROPERTY_VALUE_MAX=92).
|
||||||
BF_BUILD_NUMBER := $(USER)$(shell date +%m%d%H%M)
|
BF_BUILD_NUMBER := $(USER)$(shell date -d "$(BUILD_DATETIME)" +%m%d%H%M)
|
||||||
else
|
else
|
||||||
BF_BUILD_NUMBER := $(BUILD_NUMBER)
|
BF_BUILD_NUMBER := $(BUILD_NUMBER)
|
||||||
endif
|
endif
|
||||||
|
@ -205,6 +205,7 @@ endif
|
||||||
PRIVATE_BUILD_DESC="$(PRIVATE_BUILD_DESC)" \
|
PRIVATE_BUILD_DESC="$(PRIVATE_BUILD_DESC)" \
|
||||||
BUILD_ID="$(BUILD_ID)" \
|
BUILD_ID="$(BUILD_ID)" \
|
||||||
BUILD_DISPLAY_ID="$(BUILD_DISPLAY_ID)" \
|
BUILD_DISPLAY_ID="$(BUILD_DISPLAY_ID)" \
|
||||||
|
BUILD_DATETIME="$(BUILD_DATETIME_FROM_FILE)" \
|
||||||
BUILD_NUMBER="$(BUILD_NUMBER_FROM_FILE)" \
|
BUILD_NUMBER="$(BUILD_NUMBER_FROM_FILE)" \
|
||||||
BOARD_BUILD_SYSTEM_ROOT_IMAGE="$(BOARD_BUILD_SYSTEM_ROOT_IMAGE)" \
|
BOARD_BUILD_SYSTEM_ROOT_IMAGE="$(BOARD_BUILD_SYSTEM_ROOT_IMAGE)" \
|
||||||
PLATFORM_VERSION="$(PLATFORM_VERSION)" \
|
PLATFORM_VERSION="$(PLATFORM_VERSION)" \
|
||||||
|
@ -268,8 +269,8 @@ $(INSTALLED_VENDOR_BUILD_PROP_TARGET): $(INSTALLED_BUILD_PROP_TARGET)
|
||||||
@echo Target vendor buildinfo: $@
|
@echo Target vendor buildinfo: $@
|
||||||
@mkdir -p $(dir $@)
|
@mkdir -p $(dir $@)
|
||||||
$(hide) echo > $@
|
$(hide) echo > $@
|
||||||
$(hide) echo ro.vendor.build.date=`date`>>$@
|
$(hide) echo ro.vendor.build.date=`date -d "$(BUILD_DATETIME_FROM_FILE)"`>>$@
|
||||||
$(hide) echo ro.vendor.build.date.utc=`date +%s`>>$@
|
$(hide) echo ro.vendor.build.date.utc=`date -d "$(BUILD_DATETIME_FROM_FILE)" +%s`>>$@
|
||||||
$(hide) echo ro.vendor.build.fingerprint="$(BUILD_FINGERPRINT_FROM_FILE)">>$@
|
$(hide) echo ro.vendor.build.fingerprint="$(BUILD_FINGERPRINT_FROM_FILE)">>$@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -166,6 +166,23 @@ include $(BUILD_SYSTEM)/envsetup.mk
|
||||||
# See envsetup.mk for a description of SCAN_EXCLUDE_DIRS
|
# See envsetup.mk for a description of SCAN_EXCLUDE_DIRS
|
||||||
FIND_LEAVES_EXCLUDES := $(addprefix --prune=, $(OUT_DIR) $(SCAN_EXCLUDE_DIRS) .repo .git)
|
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
|
# 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
|
||||||
|
|
|
@ -132,7 +132,7 @@ droiddoc := \
|
||||||
|
|
||||||
$(full_target): PRIVATE_DOCLETPATH := $(HOST_OUT_JAVA_LIBRARIES)/jsilver$(COMMON_JAVA_PACKAGE_SUFFIX):$(HOST_OUT_JAVA_LIBRARIES)/doclava$(COMMON_JAVA_PACKAGE_SUFFIX)
|
$(full_target): PRIVATE_DOCLETPATH := $(HOST_OUT_JAVA_LIBRARIES)/jsilver$(COMMON_JAVA_PACKAGE_SUFFIX):$(HOST_OUT_JAVA_LIBRARIES)/doclava$(COMMON_JAVA_PACKAGE_SUFFIX)
|
||||||
$(full_target): PRIVATE_CURRENT_BUILD := -hdf page.build $(BUILD_ID)-$(BUILD_NUMBER_FROM_FILE)
|
$(full_target): PRIVATE_CURRENT_BUILD := -hdf page.build $(BUILD_ID)-$(BUILD_NUMBER_FROM_FILE)
|
||||||
$(full_target): PRIVATE_CURRENT_TIME := -hdf page.now "$$(date "+%d %b %Y %k:%M")"
|
$(full_target): PRIVATE_CURRENT_TIME := -hdf page.now "$$(date -d "$(BUILD_DATETIME_FROM_FILE)" "+%d %b %Y %k:%M")"
|
||||||
$(full_target): PRIVATE_CUSTOM_TEMPLATE_DIR := $(LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR)
|
$(full_target): PRIVATE_CUSTOM_TEMPLATE_DIR := $(LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR)
|
||||||
$(full_target): PRIVATE_IN_CUSTOM_ASSET_DIR := $(LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR)/$(LOCAL_DROIDDOC_CUSTOM_ASSET_DIR)
|
$(full_target): PRIVATE_IN_CUSTOM_ASSET_DIR := $(LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR)/$(LOCAL_DROIDDOC_CUSTOM_ASSET_DIR)
|
||||||
$(full_target): PRIVATE_OUT_ASSET_DIR := $(out_dir)/$(LOCAL_DROIDDOC_ASSET_DIR)
|
$(full_target): PRIVATE_OUT_ASSET_DIR := $(out_dir)/$(LOCAL_DROIDDOC_ASSET_DIR)
|
||||||
|
|
|
@ -102,8 +102,11 @@ else # !USE_NINJA
|
||||||
# Write the build number to a file so it can be read back in
|
# Write the build number to a file so it can be read back in
|
||||||
# without changing the command line every time. Avoids rebuilds
|
# without changing the command line every time. Avoids rebuilds
|
||||||
# when using ninja.
|
# when using ninja.
|
||||||
$(shell mkdir -p $(OUT_DIR) && echo -n $(BUILD_NUMBER) > $(OUT_DIR)/build_number.txt)
|
$(shell mkdir -p $(OUT_DIR) && \
|
||||||
|
echo -n $(BUILD_NUMBER) > $(OUT_DIR)/build_number.txt && \
|
||||||
|
echo -n "$(BUILD_DATETIME)" > $(OUT_DIR)/build_date.txt)
|
||||||
BUILD_NUMBER_FROM_FILE := $$(cat $(OUT_DIR)/build_number.txt)
|
BUILD_NUMBER_FROM_FILE := $$(cat $(OUT_DIR)/build_number.txt)
|
||||||
|
BUILD_DATETIME_FROM_FILE := $$(cat $(OUT_DIR)/build_date.txt)
|
||||||
|
|
||||||
# CTS-specific config.
|
# CTS-specific config.
|
||||||
-include cts/build/config.mk
|
-include cts/build/config.mk
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
# DEFAULT_APP_TARGET_SDK
|
# DEFAULT_APP_TARGET_SDK
|
||||||
# BUILD_ID
|
# BUILD_ID
|
||||||
# BUILD_NUMBER
|
# BUILD_NUMBER
|
||||||
|
# BUILD_DATETIME
|
||||||
#
|
#
|
||||||
|
|
||||||
# Look for an optional file containing overrides of the defaults,
|
# Look for an optional file containing overrides of the defaults,
|
||||||
|
@ -106,6 +107,12 @@ ifeq "" "$(BUILD_ID)"
|
||||||
BUILD_ID := UNKNOWN
|
BUILD_ID := UNKNOWN
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq "" "$(BUILD_DATETIME)"
|
||||||
|
# Used to reproduce builds by setting the same time. Must be in a
|
||||||
|
# format understood by `date`
|
||||||
|
BUILD_DATETIME := $(shell date)
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq "" "$(BUILD_NUMBER)"
|
ifeq "" "$(BUILD_NUMBER)"
|
||||||
# BUILD_NUMBER should be set to the source control value that
|
# BUILD_NUMBER should be set to the source control value that
|
||||||
# represents the current state of the source code. E.g., a
|
# represents the current state of the source code. E.g., a
|
||||||
|
@ -116,5 +123,5 @@ ifeq "" "$(BUILD_NUMBER)"
|
||||||
# If no BUILD_NUMBER is set, create a useful "I am an engineering build
|
# If no BUILD_NUMBER is set, create a useful "I am an engineering build
|
||||||
# from this date/time" value. Make it start with a non-digit so that
|
# from this date/time" value. Make it start with a non-digit so that
|
||||||
# anyone trying to parse it as an integer will probably get "0".
|
# anyone trying to parse it as an integer will probably get "0".
|
||||||
BUILD_NUMBER := eng.$(USER).$(shell date +%Y%m%d.%H%M%S)
|
BUILD_NUMBER := eng.$(USER).$(shell date -d "$(BUILD_DATETIME)" +%Y%m%d.%H%M%S)
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -11,8 +11,8 @@ echo "ro.build.version.preview_sdk=$PLATFORM_PREVIEW_SDK_VERSION"
|
||||||
echo "ro.build.version.codename=$PLATFORM_VERSION_CODENAME"
|
echo "ro.build.version.codename=$PLATFORM_VERSION_CODENAME"
|
||||||
echo "ro.build.version.all_codenames=$PLATFORM_VERSION_ALL_CODENAMES"
|
echo "ro.build.version.all_codenames=$PLATFORM_VERSION_ALL_CODENAMES"
|
||||||
echo "ro.build.version.release=$PLATFORM_VERSION"
|
echo "ro.build.version.release=$PLATFORM_VERSION"
|
||||||
echo "ro.build.date=`date`"
|
echo "ro.build.date=`date -d \"$BUILD_DATETIME\"`"
|
||||||
echo "ro.build.date.utc=`date +%s`"
|
echo "ro.build.date.utc=`date -d \"$BUILD_DATETIME\" +%s`"
|
||||||
echo "ro.build.type=$TARGET_BUILD_TYPE"
|
echo "ro.build.type=$TARGET_BUILD_TYPE"
|
||||||
echo "ro.build.user=$USER"
|
echo "ro.build.user=$USER"
|
||||||
echo "ro.build.host=`hostname`"
|
echo "ro.build.host=`hostname`"
|
||||||
|
|
Loading…
Reference in New Issue