aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-23 09:36:33 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-23 09:36:33 +0000
commit7b4aefcb44a7b8bbb371806fae5b6daaf9a7c555 (patch)
tree1c681aece33dcb0c3d362d86f690372b93a359b2
parentce616e5336dca2d668fbe274dbb9dda9872f9e51 (diff)
downloadruby-7b4aefcb44a7b8bbb371806fae5b6daaf9a7c555.tar.gz
common.mk: update-man-date
* common.mk (update-man-date): update last date in man pages. * tool/vcs.rb (VCS#modified): returns last modified time. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--common.mk6
-rw-r--r--tool/vcs.rb5
2 files changed, 11 insertions, 0 deletions
diff --git a/common.mk b/common.mk
index 839eba3c13..3ee4ae05f2 100644
--- a/common.mk
+++ b/common.mk
@@ -1023,6 +1023,12 @@ yes-test-all: sudo-precheck
sudo-precheck: PHONY
@$(SUDO) echo > $(NULL)
+update-man-date: PHONY
+ -$(Q) $(BASERUBY) -I"$(srcdir)/tool" -rvcs -i -p \
+ -e 'BEGIN{@vcs=VCS.detect(ARGV.shift)}' \
+ -e '$$_.sub!(/^(\.Dd ).*/){$$1+@vcs.modified(ARGF.path).strftime("%B %d, %Y")}' \
+ "$(srcdir)" "$(srcdir)"/man/*.1
+
help: PHONY
$(MESSAGE_BEGIN) \
" Makefile of Ruby" \
diff --git a/tool/vcs.rb b/tool/vcs.rb
index 4c0dcce4b0..e38d1cfc56 100644
--- a/tool/vcs.rb
+++ b/tool/vcs.rb
@@ -130,6 +130,11 @@ class VCS
return last, changed, modified, *rest
end
+ def modified(path)
+ last, changed, modified, *rest = get_revisions(path)
+ modified
+ end
+
def relative_to(path)
if path
srcdir = File.realpath(@srcdir)