2005-06-10 Paul Eggert <eggert@cs.ucla.edu>
+ * 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.
+
* lib/m4sugar/m4sh.m4 (AS_VAR_TEST_SET): Work even if $1 contains
quotes and backslashes. Patch from Derek Price.
$(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:
$(HELP2MAN) \
--include=$*.x \
--include=$(srcdir)/common.x \
- --output=$@ `echo '$*' | sed 's,.*/,,'`
+ --output=$@.t `echo '$*' | sed 's,.*/,,'`
+ if sed $(remove_time_stamp) $@ >$@a.t 2>/dev/null && \
+ sed $(remove_time_stamp) $@.t | cmp $@a.t - >/dev/null 2>&1; then \
+ touch $@; \
+ else \
+ mv $@.t $@; \
+ fi
+ rm -f $@*.t