delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/01/18/15:23:35

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Tue, 18 Jan 2005 22:18:41 +0200
From: "Eli Zaretskii" <eliz AT gnu DOT org>
To: Eric Blake <ebb9 AT byu DOT net>
Message-ID: <01c4fd9b$Blat.v2.2.2$0c061560@zahav.net.il>
CC: bug-texinfo AT gnu DOT org, dave AT boost-consulting DOT com, cygwin AT cygwin DOT com
In-reply-to: <41ED0F24.80505@byu.net> (message from Eric Blake on Tue, 18 Jan 2005 06:29:08 -0700)
Subject: Re: Fw: bug in texi2dvi, and hack patch
Reply-to: Eli Zaretskii <eliz AT gnu DOT org>
References: <41ED0F24 DOT 80505 AT byu DOT net>

> Date: Tue, 18 Jan 2005 06:29:08 -0700
> From: Eric Blake <ebb9 AT byu DOT net>
> Cc: dave AT boost-consulting DOT com, cygwin AT cygwin DOT com
> 
> This was sent to a cygwin list, but is more properly a texinfo problem in
> the texi2dvi script (version 4.7).  $COMSPEC has meaning in djgpp and
> perhaps mingw, but is just a worthless environment variable when inherited
> into cygwin.

That snippet was never meant to DTRT for Cygwin, so it's not a
surprise it doesn't.

> 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.)

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.

> 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").

> 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.)

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019