From 44702f12f7efc0b14d918a1c7dcde7f52432a200 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Wed, 12 Feb 2020 21:05:54 +0000 Subject: [PATCH] getopt: use examples installation directory in man page Addresses: https://bugs.debian.org/913049 Signed-off-by: Sami Kerola --- Makefile.am | 1 + misc-utils/.gitignore | 1 + misc-utils/Makemodule.am | 1 + misc-utils/{getopt.1 => getopt.1.in} | 8 +++----- 4 files changed, 6 insertions(+), 5 deletions(-) rename misc-utils/{getopt.1 => getopt.1.in} (99%) diff --git a/Makefile.am b/Makefile.am index 8d94b0811..88943f1e4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -118,6 +118,7 @@ edit_cmd = sed \ -e 's|@datadir[@]|$(datadir)|g' \ -e 's|@sbindir[@]|$(sbindir)|g' \ -e 's|@bindir[@]|$(bindir)|g' \ + -e 's|@docdir[@]|$(docdir)|g' \ -e 's|@includedir[@]|$(includedir)|g' \ -e 's|@runstatedir[@]|$(runstatedir)|g' \ -e 's|@usrlib_execdir[@]|$(usrlib_execdir)|g' \ diff --git a/misc-utils/.gitignore b/misc-utils/.gitignore index db148ba74..c0287917d 100644 --- a/misc-utils/.gitignore +++ b/misc-utils/.gitignore @@ -1,3 +1,4 @@ +getopt.1 uuidd.8 uuidd.rc uuidd.service diff --git a/misc-utils/Makemodule.am b/misc-utils/Makemodule.am index f56a819ac..4d933f1df 100644 --- a/misc-utils/Makemodule.am +++ b/misc-utils/Makemodule.am @@ -202,6 +202,7 @@ endif if BUILD_GETOPT usrbin_exec_PROGRAMS += getopt dist_man_MANS += misc-utils/getopt.1 +PATHFILES += misc-utils/getopt.1 getopt_SOURCES = misc-utils/getopt.c getoptexampledir = $(docdir)/getopt/ dist_getoptexample_SCRIPTS = \ diff --git a/misc-utils/getopt.1 b/misc-utils/getopt.1.in similarity index 99% rename from misc-utils/getopt.1 rename to misc-utils/getopt.1.in index 47e032b7a..1e913ea22 100644 --- a/misc-utils/getopt.1 +++ b/misc-utils/getopt.1.in @@ -417,11 +417,9 @@ if it is called with .SH EXAMPLES Example scripts for (ba)sh and (t)csh are provided with the .BR getopt (1) -distribution, and are optionally installed in -.I /usr/share/getopt/ -or -.I /usr/share/doc/ -in the util-linux subdirectory. +distribution, and are installed in +.I @docdir@/getopt/ +directory. .SH ENVIRONMENT .IP POSIXLY_CORRECT This environment variable is examined by the