1 Star 0 Fork 22

鄙人常乃超不擅奔跑/tzdata

forked from src-openEuler/tzdata 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-Use-better-fallback-for-unknown-VERSION.patch 1.41 KB
一键复制 编辑 原始数据 按行查看 历史
From 78422f077abeb56e2be8fd6852eb95361398c008 Mon Sep 17 00:00:00 2001
From: Paul Eggert <[email protected]>
Date: Thu, 22 Oct 2020 13:39:01 -0700
Subject: [PATCH 3/6] Use better fallback for unknown $(VERSION)
Problem reported by Carlos Jimenez in:
https://mm.icann.org/pipermail/tz/2020-October/029380.html
* Makefile (version): If $(VERSION) is unknown, reuse contents
of existing version file and append "-dirty" if they do not
already end in "-dirty".
---
Makefile | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 3b9d59e..a0b6aeb 100644
--- a/Makefile
+++ b/Makefile
@@ -583,11 +583,19 @@ INSTALL: ALL install date.1
cp date '$(DESTDIR)$(BINDIR)/.'
cp -f date.1 '$(DESTDIR)$(MANDIR)/man1/.'
+# Calculate version number from git, if available.
+# Otherwise, use $(VERSION) unless it is "unknown" and there is already
+# a 'version' file, in which case reuse the existing 'version' contents
+# and append "-dirty" if the contents do not already end in "-dirty".
version: $(VERSION_DEPS)
{ (type git) >/dev/null 2>&1 && \
V=`git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \
--abbrev=7 --dirty` || \
- V='$(VERSION)'; } && \
+ if test '$(VERSION)' = unknown && V=`cat $@`; then \
+ case $$V in *-dirty);; *) V=$$V-dirty;; esac; \
+ else \
+ V='$(VERSION)'; \
+ fi; } && \
printf '%s\n' "$$V" >[email protected]
--
1.8.3.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/shenkaii/tzdata.git
[email protected]:shenkaii/tzdata.git
shenkaii
tzdata
tzdata
master

搜索帮助