summaryrefslogtreecommitdiff
path: root/doc/Makefile.am
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2010-04-01 09:07:51 +0200
committerJim Meyering <meyering@redhat.com>2010-04-01 09:36:57 +0200
commitbc935b35740f80d65e0f9642f92fd06c7edcaab0 (patch)
treed9ea2dfb445970d8fb7d709639ca2b687cd5a5ec /doc/Makefile.am
parent672146c04b5865e8762d12b84c9c9d649ac77708 (diff)
downloadgrep-bc935b35740f80d65e0f9642f92fd06c7edcaab0.tar.gz
doc: generate grep.1 from template
* doc/Makefile.am (grep.1): New rule. (CLEANFILES): Add grep.1 to the list. * .gitignore: Add /doc/grep.1 * doc/grep.in.1: Replace hard-coded "2.5.1-cvs" with @VERSION@. Update copyright year list. Omit the line-splitting \(co directive so that update-copyright will perform future updates automatically. Egmont Koblinger reported the outdated version string and copyright year list in the man page: http://savannah.gnu.org/bugs/?29390
Diffstat (limited to 'doc/Makefile.am')
-rw-r--r--doc/Makefile.am9
1 files changed, 7 insertions, 2 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index b4d0a2d2..d8f2a8fa 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -21,8 +21,13 @@ grep_TEXINFOS = fdl.texi
man_MANS = grep.1 fgrep.1 egrep.1
-EXTRA_DIST = grep.1
-CLEANFILES = egrep.1 fgrep.1
+EXTRA_DIST = grep.in.1
+CLEANFILES = grep.1 egrep.1 fgrep.1
+
+grep.1: grep.in.1
+ $(AM_V_GEN)rm -f $@ $@-t
+ $(AM_V_AT)sed 's/@''VERSION@/$(VERSION)/' \
+ < $(srcdir)/grep.in.1 > $@-t && chmod 444 $@-t && mv $@-t $@
egrep.1 fgrep.1: Makefile.am
$(AM_V_GEN)inst=`echo grep | sed '$(transform)'`.1 \