[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fw: bug in texi2dvi, and hack patch
From: |
Eric Blake |
Subject: |
Re: Fw: bug in texi2dvi, and hack patch |
Date: |
Wed, 19 Jan 2005 05:36:26 -0700 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
[cross-posted to autoconf, thread starts at
http://lists.gnu.org/archive/html/bug-texinfo/2005-01/msg00016.html]
According to Eli Zaretskii on 1/18/2005 1:18 PM:
>>Date: Tue, 18 Jan 2005 06:29:08 -0700
>>From: Eric Blake <address@hidden>
>>Cc: address@hidden, address@hidden
>>
>>Instead of using $COMSPEC for determining the path
>>separator, you should use autoconf's approach (look at any recent
>>configure script generated by autoconf 2.59 for this snippet):
>>
>>if test "${PATH_SEPARATOR+set}" != set; then
>> echo "#! /bin/sh" >conf$$.sh
>> echo "exit 0" >>conf$$.sh
>> chmod +x conf$$.sh
>> if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
>> PATH_SEPARATOR=';'
>> else
>> PATH_SEPARATOR=:
>> fi
>> rm -f conf$$.sh
>>fi
>
>
> If this is what Autoconf 2.59 really does (i.e., no typos etc. in this
> snippet), then Autoconf 2.59 is broken, at least for DJGPP, because it
> will always produce PATH_SEPARATOR=:. This is because it invalidates
> PATH, and therefore defeats the DJGPP magic that looks for sh.exe
> along PATH if /bin/sh.exe does not exist. (And /bin/sh.exe does not
> exists on almost every DJGPP installation.)
If this is true about DJGPP, then autoconf needs to revisit how
PATH_SEPARATOR is calculated.
>
> Instead of such complicated jumps through the hoops, I'd suggest to
> keep the original test, but augment it with something specific to
> Cygwin. Is there some environment variable, like OSTYPE or something,
> whose value shows that a Cygwin Bash is being run? If there is such a
> variable, we could look at it in addition to COMSPEC.
There is always the uname utility, although I'm not sure it is the best
approach:
case `uname` in
CYGWIN*) path_sep=: ;;
esac
>>Additionally, according to autoconf, `test -x' is not portable.
>
> But needed for DJGPP/MinGW, where "test -f tex" does not find tex.exe,
> but "test -x tex" does.
>
> So if this is changed to not use "test -x", the non-Posix systems will
> still need "test -x" (which is okay for those systems, since the
> ported Bash supports "test -x").
CVS Autoconf also tackled this issue, see
http://lists.gnu.org/archive/html/autoconf-patches/2004-12/msg00057.html
>
>
>>Your best bet may be to make texi2dvi a generated file from
>>texi2dvi.in, and let autoconf determine @PATH_SEPARATOR@ and even
>>the location of tex up front at configure time
>
>
> Again, doing the latter (i.e. determining the location of TeX at
> configure time) might be okay on Posix systems, but not on
> DJGPP/MinGW, since it is _very_ customary on those systems to download
> pre-compiled binaries, and thus configure-time settings are usually
> invalid. (Actually, I think Cygwin users will not like your
> suggestion either, since AFAIK they, too, tend to download binaries.)
>
But on cygwin downloads, they tend to be to a normalized path (ie the
cygwin installation point is normalized to /, all pre-compiled cygwin
binaries are put in /bin, and /usr/bin is mounted to /bin), so even if the
tex executable is downloaded to something as outrageous as 'q:\my
hairy\windows\path\cygwin\bin', the precompiled binary still sees it at
/usr/bin because of the PATH normalization going on.
- --
Life is short - so eat dessert first!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFB7lRJ84KuGfSFAYARApVkAJ9V5cXc+tq9E/ePBMeclrXYFBXHBQCgwuoF
j2/HYvYy48SqMN+4v6MaA5c=
=BK5I
-----END PGP SIGNATURE-----
- Fw: bug in texi2dvi, and hack patch, Eric Blake, 2005/01/18
- Re: Fw: bug in texi2dvi, and hack patch, Karl Berry, 2005/01/18
- Re: Fw: bug in texi2dvi, and hack patch, Eli Zaretskii, 2005/01/18
- Re: Fw: bug in texi2dvi, and hack patch,
Eric Blake <=
- Re: Fw: bug in texi2dvi, and hack patch, Eli Zaretskii, 2005/01/19
- Re: Fw: bug in texi2dvi, and hack patch, Stepan Kasal, 2005/01/20
- Re: Fw: bug in texi2dvi, and hack patch, Karl Berry, 2005/01/20
- Re: Fw: bug in texi2dvi, and hack patch, Stepan Kasal, 2005/01/20
- Re: Fw: bug in texi2dvi, and hack patch, Karl Berry, 2005/01/20
- Re: bug in texi2dvi, and hack patch, Akim Demaille, 2005/01/21
- Re: bug in texi2dvi, and hack patch, Stepan Kasal, 2005/01/21
- Re: bug in texi2dvi, and hack patch, Akim Demaille, 2005/01/21
- Re: Fw: bug in texi2dvi, and hack patch, Eli Zaretskii, 2005/01/20
- Re: Fw: bug in texi2dvi, and hack patch, Ben Pfaff, 2005/01/20