diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2019-03-04 13:01:57 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2019-03-04 13:01:57 +0000 |
commit | 71a5911af71b386e3e48cce7bfeee5ad9188c4b9 (patch) | |
tree | fd26cdeb890b0104aae2cc0dfb6d774727832181 /configure | |
parent | 389c86cd15ca2e69509e25f04d7e8dd3e1e0ddf4 (diff) | |
download | mandoc-71a5911af71b386e3e48cce7bfeee5ad9188c4b9.tar.gz |
When the -S option is given to man(1) and the requested manual page
name is not found and the requested architecture is unknown, complain
about the architecture rather than about the manual page name:
$ man -S vax cpu
man: Unknown architecture "vax".
$ man -S sparc64 foobar
man: No entry for foobar in the manual.
Friendlier error message suggested by jmc@, who also OK'ed the patch.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 24 |
1 files changed, 23 insertions, 1 deletions
@@ -2,7 +2,7 @@ # # $Id$ # -# Copyright (c) 2014,2015,2016,2017,2018 Ingo Schwarze <schwarze@openbsd.org> +# Copyright (c) 2014-2019 Ingo Schwarze <schwarze@openbsd.org> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -37,6 +37,7 @@ SOURCEDIR=`dirname "$0"` MANPATH_BASE="/usr/share/man:/usr/X11R6/man" MANPATH_DEFAULT="/usr/share/man:/usr/X11R6/man:/usr/local/man" +OSENUM= OSNAME= UTF8_LOCALE= @@ -219,6 +220,26 @@ get_locale() { return 0; } +# --- operating system ------------------------------------------------- + +if [ -n "${OSENUM}" ]; then + echo "OSENUM specified manually: ${OSENUM}" 1>&2 + echo "OSENUM specified manually: ${OSENUM}" 1>&3 +else + OSDETECT=$(uname) + if [ "X${OSDETECT}" = "XNetBSD" ]; then + OSENUM=MANDOC_OS_NETBSD + elif [ "X${OSDETECT}" = "XOpenBSD" ]; then + OSENUM=MANDOC_OS_OPENBSD + else + OSENUM=MANDOC_OS_OTHER + fi + echo "tested operating system: ${OSDETECT} -> OSENUM=${OSENUM}" 1>&2 + echo "tested operating system: ${OSDETECT} -> OSENUM=${OSENUM}" 1>&3 + unset OSDETECT +fi +echo 1>&3 + # --- compiler options ------------------------------------------------- DEFCFLAGS="-g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter" @@ -419,6 +440,7 @@ echo echo "#define MAN_CONF_FILE \"/etc/${MANM_MANCONF}\"" echo "#define MANPATH_BASE \"${MANPATH_BASE}\"" echo "#define MANPATH_DEFAULT \"${MANPATH_DEFAULT}\"" +echo "#define OSENUM ${OSENUM}" [ -n "${OSNAME}" ] && echo "#define OSNAME \"${OSNAME}\"" [ -n "${UTF8_LOCALE}" ] && echo "#define UTF8_LOCALE \"${UTF8_LOCALE}\"" [ -n "${HOMEBREWDIR}" ] && echo "#define HOMEBREWDIR \"${HOMEBREWDIR}\"" |