Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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" To: Eric Blake Message-ID: <01c4fd9b$Blat.v2.2.2$0c061560@zahav.net.il> Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=ISO-8859-1 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 References: <41ED0F24 DOT 80505 AT byu DOT net> > Date: Tue, 18 Jan 2005 06:29:08 -0700 > From: Eric Blake > 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/