2 # shdeps.sh: Generate OS dependency fixups, for `groff' shell scripts
4 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
5 # Written by Keith Marshall (keith.d.marshall@ntlworld.com)
7 # Invoked only by `make', as:
8 # $(SHELL) shdeps.sh "$(RT_SEP)" "$(SH_SEP)" "$(bindir)" > shdeps.sed
10 # This file is part of groff.
12 # groff is free software; you can redistribute it and/or modify it under
13 # the terms of the GNU General Public License as published by the Free
14 # Software Foundation; either version 2, or (at your option) any later
17 # groff is distributed in the hope that it will be useful, but WITHOUT ANY
18 # WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 # You should have received a copy of the GNU General Public License along
23 # with groff; see the file COPYING. If not, write to the Free Software
24 # Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.
27 # shdeps.sed: Script generated automatically by \`make' -- do not modify!
30 /@GROFF_BIN_PATH_SETUP@/c\\
35 # `PATH_SEPARATOR' is `:' both at `groff' run time, and in `make',
36 # implying an implementation which is completely POSIX compliant.
37 # Simply apply the `GROFF_BIN_PATH' and `PATH_SEPARATOR' values
38 # determined by `configure', in all cases.
42 GROFF_RUNTIME="\${GROFF_BIN_PATH=$3}:"
43 /@PATH_SEARCH_SETUP@/d
47 # `PATH_SEPARATOR' is NOT always `:',
48 # which suggests an implementation for a Microsoft platform.
49 # We need to choose the `GROFF_BIN_PATH' format and `PATH_SEPARATOR'
50 # which will suit the user's choice of shell.
52 # Note that some Windows users may specify the `--prefix' path
53 # using backslash characters, instead of `/', preferred by POSIX,
54 # so we will also fix that up.
56 POSIX_BINDIR
=`echo $3 | tr '\\\\' /`
58 # (The value required is dependent on the user's choice of shell,\\
59 # and its associated POSIX emulation capabilities.)\\
63 GROFF_RUNTIME=\${GROFF_BIN_PATH="`
64 case "$POSIX_BINDIR" in
69 /*) POSIX_BINDIR="/$1$2" ;;
70 *) POSIX_BINDIR="/$1/$2" ;;
75 POSIX_BINDIR="$POSIX_BINDIR:$dir"
79 echo "$POSIX_BINDIR"`"}":" ;;\\
81 : \${GROFF_BIN_PATH="\`cygpath -w '$POSIX_BINDIR'\`"}\\
82 GROFF_RUNTIME=\`cygpath "\$GROFF_BIN_PATH"\`":" ;;\\
84 GROFF_RUNTIME=\${GROFF_BIN_PATH="$POSIX_BINDIR"}";" ;;\\
87 # On Microsoft platforms, we may also need to configure
88 # the PATH search function, used in the `pdfroff' script,
89 # to use ';', instead of ':', as the PATH_SEPARATOR.
92 /@PATH_SEARCH_SETUP@/c\\
94 # This implementation is configured for a Microsoft platform.\\
95 # Thus, the default PATH_SEPARATOR is ';', although some shells may\\
96 # use the POSIX standard ':' instead. Therefore, we need to examine\\
97 # the OSTYPE environment variable, to identify which is appropriate\\
98 # to make PATH searches work correctly.\\
104 # These emulate POSIX, and use ':'\\
106 PATH_SEPARATOR=\${PATH_SEPARATOR-':'} ;;\\
110 # For anything else, default to ';'\\
112 PATH_SEPARATOR=\${PATH_SEPARATOR-';'} ;;\\