diff options
author | wl <wl> | 2005-05-18 07:03:06 +0000 |
---|---|---|
committer | wl <wl> | 2005-05-18 07:03:06 +0000 |
commit | e8cd3d70d5dcec0e8e40429830a372a40f9c9ffa (patch) | |
tree | 36aeb813187b8602cf13db6f0140fcd23894958e /arch/misc | |
parent | d5e77458ec0d21272384a78180946518fe350b7d (diff) | |
download | groff-e8cd3d70d5dcec0e8e40429830a372a40f9c9ffa.tar.gz |
Miscellaneous script portability enhancements.
* aclocal.m4: (GROFF_CSH_HACK): Add space in shebang prototype for
generated conftest.sh script, conforming to portability
recommendation in autoconf docs.
* configure: Likewise, for code generated by GROFF_CSH_HACK.
* contrib/eqn2graph/eqn2graph.sh: Add space in shebang, conforming
to portability recommendation in autoconf docs.
* contrib/gdiffmk/gdiffmk.sh: Likewise.
* contrib/gdiffmk/tests/runtests.in: Likewise.
* contrib/grap2graph/grap2graph.sh: Likewise.
* contrib/groffer/groffer.sh: Likewise.
* contrib/mm/mmroff.pl: Likewise.
* contrib/mom/momdoc/appendices.html: Likewise.
* contrib/pic2graph/pic2graph.sh: Likewise.
* font/devps/generate/afmname: Likewise.
* src/devices/xditview/ad2c: Likewise.
* src/preproc/eqn/neqn.sh: Likewise.
* src/roff/grog/grog.pl: Likewise.
* src/roff/grog/grog.sh: Likewise.
* src/roff/nroff/nroff.sh: Likewise.
* PROBLEMS: Likewise, in embedded script examples.
Improve portability of `pdfroff' shell script.
* arch/misc/shdeps.sh: Add space in shebang, conforming to
portability guidelines in `autoconf' docs.
(PATH_SEARCH_SETUP): New substitution; emits PATH_SEPARATOR
initialization code. Used by contrib/pdfmark/pdfroff.sh's
`searchpath' function.
Diffstat (limited to 'arch/misc')
-rw-r--r-- | arch/misc/shdeps.sh | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/arch/misc/shdeps.sh b/arch/misc/shdeps.sh index 623f7a55..133aea5e 100644 --- a/arch/misc/shdeps.sh +++ b/arch/misc/shdeps.sh @@ -1,7 +1,7 @@ -#!/bin/sh +#! /bin/sh # shdeps.sh: Generate OS dependency fixups, for `groff' shell scripts # -# Copyright (C) 2004 Free Software Foundation, Inc. +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. # Written by Keith Marshall (keith.d.marshall@ntlworld.com) # # Invoked only by `make', as: @@ -40,6 +40,7 @@ then cat << ETX \\ GROFF_RUNTIME="\${GROFF_BIN_PATH=$3}:" +/@PATH_SEARCH_SETUP@/d ETX else @@ -83,6 +84,34 @@ case "\$OSTYPE" in\\ GROFF_RUNTIME=\${GROFF_BIN_PATH="$POSIX_BINDIR"}";" ;;\\ esac ETX + # On Microsoft platforms, we may also need to configure + # the PATH search function, used in the `pdfroff' script, + # to use ';', instead of ':', as the PATH_SEPARATOR. + + cat << ETX +/@PATH_SEARCH_SETUP@/c\\ +#\\ +# This implementation is configured for a Microsoft platform.\\ +# Thus, the default PATH_SEPARATOR is ';', although some shells may\\ +# use the POSIX standard ':' instead. Therefore, we need to examine\\ +# the OSTYPE environment variable, to identify which is appropriate\\ +# to make PATH searches work correctly.\\ +#\\ + case "\$OSTYPE" in\\ +#\\ + msys | cygwin)\\ + #\\ + # These emulate POSIX, and use ':'\\ + #\\ + PATH_SEPARATOR=\${PATH_SEPARATOR-':'} ;;\\ +#\\ + *)\\ + #\\ + # For anything else, default to ';'\\ + #\\ + PATH_SEPARATOR=\${PATH_SEPARATOR-';'} ;;\\ + esac +ETX fi |