diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-05-23 09:36:33 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-05-23 09:36:33 +0000 |
commit | 7b4aefcb44a7b8bbb371806fae5b6daaf9a7c555 (patch) | |
tree | 1c681aece33dcb0c3d362d86f690372b93a359b2 | |
parent | ce616e5336dca2d668fbe274dbb9dda9872f9e51 (diff) | |
download | ruby-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.mk | 6 | ||||
-rw-r--r-- | tool/vcs.rb | 5 |
2 files changed, 11 insertions, 0 deletions
@@ -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) |