提交 87f662b9 编写于 作者: O ohair

6631003: Add hg tip changeset to build image

Reviewed-by: mduigou
上级 87c822a7
......@@ -3,3 +3,4 @@
/nbproject/private/
^make/netbeans/.*/build/
^make/netbeans/.*/dist/
^.hgtip
......@@ -1118,6 +1118,10 @@ endef
MINIMUM_OS_NAME := $(REQUIRED_OS_NAME)
MINIMUM_OS_VERSION := $(REQUIRED_OS_VERSION)
MINIMUM_OS_ARCH := $(ARCH)
ALL_SOURCE_TIPS = $(shell \
if [ -f $(SOURCE_TIPS) ] ; then \
$(CAT) $(SOURCE_TIPS) ; \
fi)
$(JDK_INFO_FILE): FRC
$(prep-target)
......@@ -1125,6 +1129,7 @@ $(JDK_INFO_FILE): FRC
$(call info-file-item, "OS_NAME", "$(MINIMUM_OS_NAME)")
$(call info-file-item, "OS_VERSION", "$(MINIMUM_OS_VERSION)")
$(call info-file-item, "OS_ARCH", "$(MINIMUM_OS_ARCH)")
$(call info-file-item, "SOURCE", "$(ALL_SOURCE_TIPS)")
# Create release file to identify this image
identify-image-jdk:: $(JDK_INFO_FILE)
......@@ -1135,6 +1140,7 @@ $(JRE_INFO_FILE): FRC
$(call info-file-item, "OS_NAME", "$(MINIMUM_OS_NAME)")
$(call info-file-item, "OS_VERSION", "$(MINIMUM_OS_VERSION)")
$(call info-file-item, "OS_ARCH", "$(MINIMUM_OS_ARCH)")
$(call info-file-item, "SOURCE", "$(ALL_SOURCE_TIPS)")
# Create release file to identify this image
identify-image-jre:: $(JRE_INFO_FILE)
......
......@@ -110,6 +110,7 @@ GDB = $(UTILS_USR_BIN_PATH)gdb
GREP = $(UTILS_COMMAND_PATH)grep
GUNZIP = $(UTILS_COMMAND_PATH)gunzip
HEAD = $(UTILS_USR_BIN_PATH)head
HG = hg
ID = $(UTILS_COMMAND_PATH)id
ISAINFO = $(UTILS_COMMAND_PATH)isainfo
KSH = $(UTILS_COMMAND_PATH)ksh
......
......@@ -612,6 +612,44 @@ else
COPYRIGHT_YEAR = $(shell $(DATE) '+%Y')
endif
# Create file with source information
SOURCE_TIPS=$(ABS_OUTPUTDIR)/source_tips
# The source tips can come from the Mercurial repository, or in the files
# $(HGTIP_FILENAME) which contains the tip but is also positioned in the same
# directory as the original $(HGDIR) directory.
# These should not be := assignments, only used from the root Makefile.
HG_VERSION = $(shell $(HG) version 2> $(DEV_NULL))
HG_DIRECTORY=.hg
HGTIP_FILENAME=.hgtip
HG_SEARCH = ./REPO ./*/REPO ./*/*/REPO ./*/*/*/REPO
REPO_LIST = $(patsubst ./%,%,$(patsubst %/,%,$(sort $(dir \
$(shell ( $(LS) -d $(HG_SEARCH:%/REPO=%/$(HG_DIRECTORY)) ; \
$(LS) $(HG_SEARCH:%/REPO=%/$(HGTIP_FILENAME)) ) \
2> $(DEV_NULL))))))
# Emit the repo:tip pairs to $@
define GetSourceTips
for i in $(REPO_LIST) IGNORE ; do \
if [ "$${i}" = "IGNORE" ] ; then \
continue; \
elif [ -d $${i}/$(HG_DIRECTORY) -a "$(HG_VERSION)" != "" ] ; then \
$(PRINTF) " %s:%s" \
"$${i}" `$(HG) tip --repository $${i} --template '{node|short}\n'` ; \
elif [ -f $${i}/$(HGTIP_FILENAME) ] ; then \
$(PRINTF) " %s:%s" \
"$${i}" `$(CAT) $${i}/$(HGTIP_FILENAME)` ; \
fi; \
done >> $@
$(PRINTF) "\n" >> $@
endef
# Create the HGTIP_FILENAME file
define CreateHgTip
$(HG) tip --repository $1 --template '{node|short}\n' > $1/$(HGTIP_FILENAME)
$(ECHO) $1/$(HGTIP_FILENAME)
endef
# Get the compiler specific settings (will run the compiler to find out)
# NOTE: COMPILER_PATH must be set by this time.
# Up until we include this file, we don't know what specific compiler
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册