[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
grep.1 vs. outdated version string and copyright year list
From: |
Jim Meyering |
Subject: |
grep.1 vs. outdated version string and copyright year list |
Date: |
Thu, 01 Apr 2010 09:44:13 +0200 |
Egmont Koblinger reported some nits in the man pages
<http://savannah.gnu.org/bugs/?29390>
Egmont, I don't see any problematic dates in --help:
$ src/grep --help|grep 200
$
Here's what I've done:
>From 672146c04b5865e8762d12b84c9c9d649ac77708 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Thu, 1 Apr 2010 09:03:16 +0200
Subject: [PATCH 1/3] doc: prepare to generate grep.1
* doc/grep.1: Rename to...
* doc/grep.in.1: ...this.
---
doc/{grep.1 => grep.in.1} | 0
1 files changed, 0 insertions(+), 0 deletions(-)
rename doc/{grep.1 => grep.in.1} (100%)
diff --git a/doc/grep.1 b/doc/grep.in.1
similarity index 100%
rename from doc/grep.1
rename to doc/grep.in.1
--
1.7.0.3.513.gc8ed0
>From 570956230ce83109609fb3937aaf4d7a975a7f70 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Thu, 1 Apr 2010 09:07:51 +0200
Subject: [PATCH 2/3] 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 @address@hidden
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
---
.gitignore | 1 +
THANKS | 1 +
doc/Makefile.am | 9 +++++++--
doc/grep.in.1 | 7 ++-----
4 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/.gitignore b/.gitignore
index 469dfd5..de560c7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,6 +21,7 @@
/config.status
/configure
/configure.ac
+/doc/grep.1
/doc/grep.aux
/doc/grep.cp
/doc/grep.cps
diff --git a/THANKS b/THANKS
index c960be2..c3406a0 100644
--- a/THANKS
+++ b/THANKS
@@ -22,6 +22,7 @@ David Clissold <address@hidden>
David J MacKenzie <address@hidden>
David O'Brien <address@hidden>
Dmitry V. Levin <address@hidden>
+Egmont Koblinger <address@hidden>
Eli Zaretskii <address@hidden>
Eric Blake <address@hidden>
Florian La Roche <address@hidden>
diff --git a/doc/Makefile.am b/doc/Makefile.am
index b4d0a2d..d8f2a8f 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 $@ address@hidden
+ $(AM_V_AT)sed 's/@''VERSION@/$(VERSION)/' \
+ < $(srcdir)/grep.in.1 > address@hidden && chmod 444 address@hidden &&
mv address@hidden $@
egrep.1 fgrep.1: Makefile.am
$(AM_V_GEN)inst=`echo grep | sed '$(transform)'`.1 \
diff --git a/doc/grep.in.1 b/doc/grep.in.1
index 6c220cf..b3c2141 100644
--- a/doc/grep.in.1
+++ b/doc/grep.in.1
@@ -21,8 +21,7 @@
. \" ISO 8601 date, complete format, extended representation
. ds Dt \\*(Yr-\\*(Mn-\\*(Dy
..
-.Id $Id: grep.1,v 1.39 2008/02/07 03:43:27 taa Exp $
-.TH GREP 1 \*(Dt "GNU grep 2.5.1-cvs" "User Commands"
+.TH GREP 1 \*(Dt "GNU grep @VERSION@" "User Commands"
.hy 0
.
.SH NAME
@@ -1180,9 +1179,7 @@ to use logic that tests for this general condition
instead of strict equality with\ 2.
.
.SH COPYRIGHT
-Copyright \(co
-1998, 1999, 2000, 2002, 2005
-Free Software Foundation, Inc.
+Copyright 1998, 1999, 2000, 2002, 2005-2010 Free Software Foundation, Inc.
.PP
This is free software;
see the source for copying conditions.
--
1.7.0.3.513.gc8ed0
>From 6eb106bb7fbcf70f9aee534cd8da25d4d4d740df Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Thu, 1 Apr 2010 09:27:26 +0200
Subject: [PATCH 3/3] doc: generated files are best made read-only, ...
...to minimize risk of accidentally modifying the generated file
rather than its template. These are tiny, so no risk, but it's
a good to be consistent, so generated files are easier to spot.
* doc/Makefile.am (egrep.1 fgrep.1): When generating these files,
ensure that they too are created read-only.
---
doc/Makefile.am | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/doc/Makefile.am b/doc/Makefile.am
index d8f2a8f..b1a71d9 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -30,5 +30,6 @@ grep.1: grep.in.1
< $(srcdir)/grep.in.1 > address@hidden && chmod 444 address@hidden &&
mv address@hidden $@
egrep.1 fgrep.1: Makefile.am
- $(AM_V_GEN)inst=`echo grep | sed '$(transform)'`.1 \
- && echo ".so man1/$$inst" > address@hidden && mv address@hidden $@
+ $(AM_V_GEN)rm -f $@ address@hidden
+ $(AM_V_AT)inst=`echo grep | sed '$(transform)'`.1 \
+ && echo ".so man1/$$inst" > address@hidden && chmod 444
address@hidden && mv address@hidden $@
--
1.7.0.3.513.gc8ed0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- grep.1 vs. outdated version string and copyright year list,
Jim Meyering <=