From: Bruno Haible Date: Sat, 21 Aug 2021 22:09:06 +0000 (+0200) Subject: autopoint: Fix structure of man page. X-Git-Tag: v0.21.1~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d61e74a9e10aa90e9e2900d857ced31fa0205963;p=thirdparty%2Fgettext.git autopoint: Fix structure of man page. Reported by Michio Matsuyama in . * 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'. --- diff --git a/gettext-tools/man/Makefile.am b/gettext-tools/man/Makefile.am index 37d31b4ed..7a6f12330 100644 --- a/gettext-tools/man/Makefile.am +++ b/gettext-tools/man/Makefile.am @@ -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 diff --git a/gettext-tools/misc/autopoint.in b/gettext-tools/misc/autopoint.in index 3a24eee5d..688e8e93d 100644 --- a/gettext-tools/misc/autopoint.in +++ b/gettext-tools/misc/autopoint.in @@ -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 or by email to ." } -# 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 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 ;;