Browse Source

Ticket #2237: Automatic date and version substitution for man pages

Currently the date and the version of Midnight Commander in the man
pages has to be changed manually every release. This is being done
sporadically and as the result, the man pages shipped for e.g. 4.7.2
release contain the 4.7.0-pre1 signature, which is quite confusing.

With this patch, the version is substituted with @DISTR_VERSION@ for all
the man pages  and the date is automatically updated to the English man
pages. Other man pages still have the manually updated date of the last
translation.

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
Yury V. Zaytsev 14 years ago
parent
commit
f32184fd25
10 changed files with 12 additions and 9 deletions
  1. 3 0
      configure.ac
  2. 1 1
      doc/man/es/mc.1.in
  3. 1 1
      doc/man/hu/mc.1.in
  4. 1 1
      doc/man/it/mc.1.in
  5. 1 1
      doc/man/mc.1.in
  6. 1 1
      doc/man/mcedit.1.in
  7. 1 1
      doc/man/mcview.1.in
  8. 1 1
      doc/man/pl/mc.1.in
  9. 1 1
      doc/man/ru/mc.1.in
  10. 1 1
      doc/man/sr/mc.1.in

+ 3 - 0
configure.ac

@@ -521,6 +521,9 @@ AC_SUBST(LIBS)
 dnl Libraries used only when building the mc binary
 AC_SUBST(MCLIBS)
 
+MAN_DATE=$(LC_ALL=C date "+%B %Y")
+AC_SUBST(MAN_DATE)
+
 AM_CONDITIONAL(USE_MAINTAINER_MODE, [test x"$USE_MAINTAINER_MODE" = xyes])
 AM_CONDITIONAL(USE_SCREEN_SLANG, [test x"$with_screen" = xslang])
 AM_CONDITIONAL(USE_EDIT, [test -n "$use_edit"])

+ 1 - 1
doc/man/es/mc.1.in

@@ -5,7 +5,7 @@
 .\"	David H. Martín Alonso <dmartina@excite.com>
 .\"
 .\"TOPICS "Índice de Contenidos:"
-.TH MC 1 "Octubre de 2009" "MC Versión 4.7.0\-pre3" "GNU Midnight Commander"
+.TH MC 1 "Octubre de 2009" "MC Versión @DISTR_VERSION@" "GNU Midnight Commander"
 .\"SKIP_SECTION"
 .SH "NOMBRE"
 mc \- Entorno visual para sistemas tipo Unix.

+ 1 - 1
doc/man/hu/mc.1.in

@@ -1,5 +1,5 @@
 .\"TOPICS "Tartalomjegyzék"
-.TH MC 1 "January 2003" "MC Version 4.6.0" "GNU Midnight Commander"
+.TH MC 1 "January 2003" "MC Version @DISTR_VERSION@" "GNU Midnight Commander"
 .\"SKIP_SECTION"
 .SH "NÉV"
 mc \- Fájlkezelő Unix típusú rendszerekhez

+ 1 - 1
doc/man/it/mc.1.in

@@ -20,7 +20,7 @@
 .\" Prego mantenere la linea di traduzione generale (per quanto possibile).
 .\"
 .\"TOPICS "Indice degli argomenti:"
-.TH MC 1 "January 2003" "MC Version 4.6.0" "GNU Midnight Commander"
+.TH MC 1 "January 2003" "MC Version @DISTR_VERSION@" "GNU Midnight Commander"
 .\"SKIP_SECTION"
 .SH "NOME"
 mc \- interfaccia visuale per sistemi tipo Unix.

+ 1 - 1
doc/man/mc.1.in

@@ -1,5 +1,5 @@
 .\"TOPICS "Topics:"
-.TH MC 1 "June 2010" "MC Version 4.7.3" "GNU Midnight Commander"
+.TH MC 1 "@MAN_DATE@" "MC Version @DISTR_VERSION@" "GNU Midnight Commander"
 .\"SKIP_SECTION"
 .SH "NAME"
 mc \- Visual shell for Unix\-like systems.

+ 1 - 1
doc/man/mcedit.1.in

@@ -1,4 +1,4 @@
-.TH MCEDIT 1 "August 2009" "MC Version 4.7.0\-pre1" "GNU Midnight Commander"
+.TH MCEDIT 1 "@MAN_DATE@" "MC Version @DISTR_VERSION@" "GNU Midnight Commander"
 .SH NAME
 mcedit \- Internal file editor of GNU Midnight Commander.
 .SH USAGE

+ 1 - 1
doc/man/mcview.1.in

@@ -1,4 +1,4 @@
-.TH MCVIEW 1 "August 2009" "MC Version 4.7.0\-pre1" "GNU Midnight Commander"
+.TH MCVIEW 1 "@MAN_DATE@" "MC Version @DISTR_VERSION@" "GNU Midnight Commander"
 .SH NAME
 mcview \- Internal file viewer of GNU Midnight Commander.
 .SH USAGE

+ 1 - 1
doc/man/pl/mc.1.in

@@ -1,5 +1,5 @@
 .\"Przetłumaczone przez by Macieja Wojciechowskiego    wojciech@staszic.waw.pl
-.TH MC 1 "January 2003" "MC Version 4.6.0" "GNU Midnight Commander"
+.TH MC 1 "January 2003" "MC Version @DISTR_VERSION@" "GNU Midnight Commander"
 .\"SKIP_SECTION"
 .SH NAZWA
 mc \- wizualny interpetator poleceń dla systemów Unixopodobnych

+ 1 - 1
doc/man/ru/mc.1.in

@@ -1,6 +1,6 @@
 .\"TOPICS "Разделы помощи:"
 .\" TODO: Перевести раздел EXTernal File System
-.TH MC "14 Июля 2010" "MC Version 4.7.4" "GNU Midnight Commander"
+.TH MC "14 Июля 2010" "MC Version @DISTR_VERSION@" "GNU Midnight Commander"
 .\"SKIP_SECTION"
 .SH "НАИМЕНОВАНИЕ"
 mc \- Визуальная оболочка для Unix\-подобных систем.

+ 1 - 1
doc/man/sr/mc.1.in

@@ -1,5 +1,5 @@
 .\"TOPICS "Теме:"
-.TH ПН 1 "јануар 2003." "ПН верзија 4.6.0" "ГНУ\-ов поноћни наредник"
+.TH ПН 1 "јануар 2003." "ПН верзија @DISTR_VERSION@" "ГНУ\-ов поноћни наредник"
 .\"SKIP_SECTION"
 .SH "НАЗИВ"
 mc \- Визуална љуска за Униксолике системе.