[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
man page generation hack to avoid needless updates
From: |
Paul Eggert |
Subject: |
man page generation hack to avoid needless updates |
Date: |
Fri, 10 Jun 2005 11:01:44 -0700 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux) |
I got tired of "cvs diff" always reporting one-line changes in man pages
due to time stamps, so I added the following hack to avoid generating new
man pages simply because the month has changed.
2005-06-10 Paul Eggert <address@hidden>
* man/Makefile.am (MOSTLYCLEANFILES): Add $(srcdir)/*.t.
(.x.1): Ignore the time stamp in the .TH line when deciding whether
to update the man page. That way, we don't have to check in new
man pages every month.
--- man/Makefile.am 14 May 2005 07:00:40 -0000 1.24
+++ man/Makefile.am 10 Jun 2005 17:56:21 -0000 1.25
@@ -47,6 +47,10 @@ $(srcdir)/ifnames.1: $(common_dep) $(
$(srcdir)/config.guess.1: $(top_srcdir)/config/config.guess
$(srcdir)/config.sub.1: $(top_srcdir)/config/config.sub
+remove_time_stamp = 's/^\(\.TH[^"]*"[^"]*"[^"]*\)"[^"]*"/\1/'
+
+MOSTLYCLEANFILES = $(srcdir)/*.t
+
SUFFIXES = .x .1
.x.1:
@@ -65,4 +69,11 @@ SUFFIXES = .x .1
$(HELP2MAN) \
--include=$*.x \
--include=$(srcdir)/common.x \
- --output=$@ `echo '$*' | sed 's,.*/,,'`
+ address@hidden `echo '$*' | sed 's,.*/,,'`
+ if sed $(remove_time_stamp) $@ >address@hidden 2>/dev/null && \
+ sed $(remove_time_stamp) address@hidden | cmp address@hidden -
>/dev/null 2>&1; then \
+ touch $@; \
+ else \
+ mv address@hidden $@; \
+ fi
+ rm -f address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- man page generation hack to avoid needless updates,
Paul Eggert <=