bug-texinfo
[Top][All Lists]
Advanced

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

Re: [bug #43122] texi2dvi does not compile enough times to get toc


From: Eli Zaretskii
Subject: Re: [bug #43122] texi2dvi does not compile enough times to get toc
Date: Thu, 17 Sep 2015 22:20:12 +0300

> From: address@hidden (Vincent Belaïche)
> Cc: Vincent Belaïche <address@hidden> ,
>     Texinfo <address@hidden>, Karl Berry <address@hidden>
> Date: Thu, 17 Sep 2015 18:35:01 +0200
> 
> >> - replace all ${path_sep} or $path_sep by :
> >> - remove the piece of code with uname | grep -iv 'gygwin|mingw|djgpp',
> >>   that sets path_sep, so that there is no longer any path_sep stuff.
> >
> > That will certainly break DJGPP, where this stuff actually used to
> > work at some point.
> 
> Thank you Eli for pointing that this code used to work. But actually I
> think that this code is currently no longer working because
> 
> - it sets path_sep to `:' for cygwin|mingw|djgpp
> - and to `;' otherwise (ie including Linux).

In the beginning there was only 'test -n "$COMSPEC$ComSpec"', and the
comment still says so.  Then someone wanted to exclude Cygwin from
that (since Cygwin is a Posix emulation, so it uses ':' even though
$ComSpec is set, as always on Windows).  But then someone added
"mingw" and "djgpp" to that, which of course is a mistake, since they
don't need the uname test to begin with.

So just leave only cygwin there, and that's it.

> Anyway, if only djgpp is concerned and if it uses `;' as a filename
> separator both for the TeX envvars and for the PATH envvar, then my code
> could be made simpler (close to the original one, with only a few
> remaining `:' replaced by `${path_sep}'). My code is more complex
> because it supports the heterogenous case of texi2dvi running in MSYS
> with TeX engines not being Msys applications. Such a thing is useless
> for MikTeX as I realized experimentally that MikTeX is an MSys
> application, that is why I proposed to simplify the code --- as anyway
> the current one is bogous.

If you want to support MSYS, then it's a mess: MSYS converts ':' to
';' in PATH, but it doesn't do anything about other variables, like
TEXINPUTS.  So if you have an MSYS Bash and MinGW TeX, you are screwed
anyway.

Based on that, I wouldn't recommend the Texinfo project to even try
supporting MSYS, since the probability of having MSYS TeX program on a
Windows machine is close to zero.

> +# and we what to be POSIX compatible.
> +case `if test -n "$COMSPEC$ComSpec" ; then \
> +   uname | $SED -e 
> 's/^.*\([Mm][Ii][Nn][Gg][Ww]\|[Dd][Jj][Gg][Pp][Pp]\).*$/\1/1'; \

Why did you go to Sed instead of Grep?  What's the point of that?

> +else \
> + echo linux; \
> +fi` in
> +  mingw)
> +  path_sep=":"
> +  tex_sep=";"
> +  native_pwd="pwd -W"

How is this going to work?  You effectively assume that PATH will only
be treated by MSYS programs, while TEXINPUTS etc. will only be treated
by MinGW programs.  That assumption is so fragile that even if it
works now, it is going to break soon.

Like I said: I don't think texi2dvi can usefully support MSYS.




reply via email to

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