1 Star 0 Fork 81

hust_yangjing/openjdk-1.8.0

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Support-Git-commit-ID-in-the-SOURCE-field-of-the-release.patch 2.33 KB
一键复制 编辑 原始数据 按行查看 历史
Noah 提交于 2020-09-11 18:42 . Add several patches
From 9945034658585ea943e6326340c06b5932af8d67 Mon Sep 17 00:00:00 2001
Date: Thu, 5 Dec 2019 10:29:18 +0000
Subject: [PATCH] Support 'Git commit ID' in the SOURCE field of the release
file.
Summary: <make>:Support 'Git commit ID' in the SOURCE field of the release file.
LLT: NA
Bug url: NA
---
common/autoconf/spec.gmk.in | 1 +
make/common/MakeBase.gmk | 29 +++++++++++++++++------------
2 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/common/autoconf/spec.gmk.in b/common/autoconf/spec.gmk.in
index 88f9f539..506cf617 100644
--- a/common/autoconf/spec.gmk.in
+++ b/common/autoconf/spec.gmk.in
@@ -578,6 +578,7 @@ READELF:=@READELF@
EXPR:=@EXPR@
FILE:=@FILE@
HG:=@HG@
+GIT:=@GIT@
OBJCOPY:=@OBJCOPY@
SETFILE:=@SETFILE@
XATTR:=@XATTR@
diff --git a/make/common/MakeBase.gmk b/make/common/MakeBase.gmk
index 9e5e704b..9b7ad702 100644
--- a/make/common/MakeBase.gmk
+++ b/make/common/MakeBase.gmk
@@ -308,18 +308,23 @@ REPO_LIST = $(patsubst ./%,%,$(patsubst %/,%,$(sort $(dir \
# Emit the repo:id pairs to $@
define GetSourceTips
- $(CD) $(SRC_ROOT) ; \
- 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) id -i --repository $${i}` ; \
- elif [ -f $${i}/$(HGTIP_FILENAME) ] ; then \
- $(PRINTF) " %s:%s" \
- "$${i}" `$(CAT) $${i}/$(HGTIP_FILENAME)` ; \
- fi; \
- done >> $@
+ $(if $(and $(HG), $(wildcard $(TOPDIR)/.hg)), \
+ $$($(CD) $(SRC_ROOT) ; \
+ 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) id -i --repository $${i}` ; \
+ elif [ -f $${i}/$(HGTIP_FILENAME) ] ; then \
+ $(PRINTF) " %s:%s" \
+ "$${i}" `$(CAT) $${i}/$(HGTIP_FILENAME)` ; \
+ fi; \
+ done >> $@), \
+ $(if $(and $(GIT), $(wildcard $(TOPDIR)/.git)), \
+ $(PRINTF) ".:git:%s%s\n" \
+ "$$(git log -n1 --format=%H | cut -c1-12)" \
+ "$$(if test -n "$$(git status --porcelain)"; then printf '+'; fi)" >> $@, ))
$(PRINTF) "\n" >> $@
endef
--
2.19.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hust-yangjing/openjdk-1.8.0.git
git@gitee.com:hust-yangjing/openjdk-1.8.0.git
hust-yangjing
openjdk-1.8.0
openjdk-1.8.0
master

搜索帮助