]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
autopoint: Fix structure of man page.
authorBruno Haible <bruno@clisp.org>
Sat, 21 Aug 2021 22:09:06 +0000 (00:09 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 9 Oct 2022 07:30:42 +0000 (09:30 +0200)
Reported by Michio Matsuyama <michio.matsuyama@gmail.com> in
<https://savannah.gnu.org/bugs/?61065>.

* gettext-tools/misc/autopoint.in (func_version): Accept a boolean argument.
Adjust wording. Bump copyright year.
Accept an undocumented option '--version-without-config'.
* gettext-tools/man/Makefile.am ($(man_MAN1MISC)): When creating autopoint.1,
pass the option --version-without-config instead of --version to 'autopoint'.

gettext-tools/man/Makefile.am
gettext-tools/misc/autopoint.in

index 37d31b4eddec90e58863cd667dde3cd48764a96d..7a6f123301954d6e2321df4306b6c53032dcd526 100644 (file)
@@ -1,5 +1,5 @@
 ## Makefile for the gettext-tools/man subdirectory of GNU gettext
-## Copyright (C) 2001-2003, 2006-2007, 2013-2015, 2018 Free Software Foundation, Inc.
+## Copyright (C) 2001-2003, 2006-2007, 2013-2015, 2018, 2021 Free Software Foundation, Inc.
 ##
 ## This program is free software: you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -120,7 +120,8 @@ recode-sr-latin.1: recode-sr-latin.x ../src/recode-sr-latin.c
 
 $(man_MAN1MISC): help2man $(top_srcdir)/../.version
        progname=`echo $@ | sed -e 's/\.in$$//' -e 's/\.1$$//'`; \
-       IN_HELP2MAN=1 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" \
+       if test "$$progname" = autopoint; then option='--version-option=--version-without-config'; else option=''; fi; \
+       IN_HELP2MAN=1 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN) $$option" \
          ../misc/$${progname}$(EXEEXT) $(srcdir)/$${progname}.x $@
 
 gettextize.1: gettextize.x ../misc/gettextize.in
index 3a24eee5d014524da9770fbf7577d601a2c72458..688e8e93d977ffcd77b0b0db08a1598e28a35972 100644 (file)
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-# Copyright (C) 2002-2020 Free Software Foundation, Inc.
+# Copyright (C) 2002-2021 Free Software Foundation, Inc.
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -201,13 +201,18 @@ Report bugs in the bug tracker at <https://savannah.gnu.org/projects/gettext>
 or by email to <bug-gettext@gnu.org>."
 }
 
-# func_version
+# func_version include_config_details
 # outputs to stdout the --version message.
+# Inputs:
+# - include_config_details   true or false
 func_version ()
 {
   echo "$progname (GNU $package) $version"
-  echo "Uses a versions archive in @ARCHIVE_FORMAT@ format."
-  echo "Copyright (C) 2002-2020 Free Software Foundation, Inc.
+  if $1; then
+    echo "This binary is configured to use a versions archive in @ARCHIVE_FORMAT@ format."
+    echo
+  fi
+  echo "Copyright (C) 2002-2021 Free Software Foundation, Inc.
 License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law."
@@ -261,8 +266,12 @@ unset CLICOLOR_FORCE GREP_OPTIONS
 #      -V*) # Some people omit the space between -V and the version number.
 #        ver=`echo "X$1" | sed -e 's/^X-V//'`
 #        shift ;;
+      --version-without-config )
+        # Print version output without build dependent details.
+        func_version false
+        exit 0 ;;
       --version | --versio | --versi | --vers | --ver | --ve | --v )
-        func_version
+        func_version true
         exit 0 ;;
       -- ) # Stop option prcessing
         shift; break ;;