groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] Re: MSYS Shell -- Path Separator Nuisances


From: MARSHALL Keith
Subject: Re: [Groff] Re: MSYS Shell -- Path Separator Nuisances
Date: Thu, 4 Mar 2004 15:40:06 +0000

Jeff Conrad wrote:
>> 3. In src/roff/nroff/nroff.sh, GROFF_BIN_PATH is set to the BINDIR 
string, 
>>    set at configure time, which for MinGW has got to be in Windows 
format. 
>>    This is then prepended to the shell's own $PATH, using a semicolon 
as the 
>>    separator, when running groff; the semicolon here is seen as a 
command 
>>    separator, truncating the $PATH to just $GROFF_BIN_PATH, and the 
original 
>>    $PATH, prefixed to the following groff command, causes a syntax 
error.
>
> What about test-groff.sh?

I presume you actually mean test-groff.in, which both builds and functions
correctly.  It does not use configure's @BINDIR@ replacement text, and 
uses
@PATH_SEPARATOR@ for the separator char, which an MSYS configure 
translates
as a colon, so all is well.

On the other hand, nroff.sh *does* use @BINDIR@, which gives the correct 
path
name in native Windows format, but doesn't conform to the heuristic POSIX 
to
Windows mapping used by the MSYS implementation of bash.  Furthermore, it
get the path separator character from a makefile variable defined in the 
top
level Makefile, and is configured from @GROFF_PATH_SEPARATOR@, becoming a
semicolon, where the MSYS bash requires a colon.

Further investigation suggests that neqn.sh is affected in the same 
manner,
but I could find no other instances of this problem.

Thanks for this hint, Jeff.  Examining the differences between nroff and
test-groff have led me quickly to a partial solution.  (Of course, I 
should
have remembered the distinction between the two configuration variables,
@PATH_SEPARATOR@ and @GROFF_PATH_SEPARATOR@, since I added the latter to
the autoconf configuration script myself ;-)

Werner Lemberg wrote:
> If I understand you correctly, we need two variables for separators,
> say, $COMPILE_SEP and $RUNTIME_SEP.

Yes. Providing two variables gets around the colon/semicolon conflict, as
in the attached patch. I think, however, that they need to be makefile
variables, rather than shell variables. (You will note that, for the sake
of compactness, I have used the shortened names $(SH_SEP) and $(RT_SEP)
respectively -- please feel free to substitute these with your preferred
alternatives).

This still leaves the issue of the difference in the naming convention
for @BINDIR@, between the shell and the internal form needed by groff,
to be resolved. I have some ideas on this, but would like some time to
develop them more fully, before putting them out for general comment.

Best regards,
Keith.

Attachment: sep.patch.bz2
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]