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  <[EMAIL PROTECTED]>

        * 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,.*/,,'`
+           [EMAIL PROTECTED] `echo '$*' | sed 's,.*/,,'`
+       if sed $(remove_time_stamp) $@ >[EMAIL PROTECTED] 2>/dev/null && \
+          sed $(remove_time_stamp) [EMAIL PROTECTED] | cmp [EMAIL PROTECTED] - 
>/dev/null 2>&1; then \
+               touch $@; \
+       else \
+               mv [EMAIL PROTECTED] $@; \
+       fi
+       rm -f [EMAIL PROTECTED]


Reply via email to