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)