mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
80000c534c
commit
aaa123591d
2 changed files with 11 additions and 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" \
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue