Re: environment variable configuration and documentation
David Allsopp <[email protected]>
| Newsgroups | gmane.comp.tex.miktex |
|---|---|
| Organization | MetaStack Solutions Ltd. |
| Message-ID | <[email protected]> |
Vincent Belaïche wrote: > That's interesting. But it does not work properly. It is working properly - it's just not doing what you want! > Conversion of the TeX > envvars is not as simple as that, there are two things to consider: > > 1) an empty directory in a directory list means "insert here the default > list (meaning root dir config for MikTeX, AFAIU) > > 2) a duplicate tailing / means "look at this directory recursively". And that weird interpretation (i.e. TeX's weird interpretation) of a specific environment variable means that the script needs to handle the conversion itself. It's not a bug in MiKTeX (documentation or otherwise) and it's not a bug in MSYS (which is now unmaintained anyway - although I think all this applies equally with MSYS2). It's the unusual corner-case you appear to doing of using a package compiled from source in MSYS bash trying to call out to native Windows from within MSYS. That's not a normal thing to want or try to do - all the hacks for conversion of PATH, TEXINPUTS, arguments, and so on in MSYS are just designed for the sole purpose of allowing configure scripts just about to work - you're not actually meant to work that way. Cygwin suffers the same problems (even worse, because it only converts PATH). > I compiled display.c, and placed display.exe under /bin > > > Then I tried this: > > > $ export TEXINPUTS='/bin//::/local/bin'; display /bin/display.exe Supplied > argument: c:/Nos_Programmes/msys/bin/display.exe. > TEXINPUTS: c:\Nos_Programmes\msys\bin\;c:\Nos_Programmes\msys\local\bin. This looks fine, and in accordance with Posix - except that technically :: should cause ;.; to be inserted. > Please note that my MSYS root dir is c:\Nos_Programmes\msys > > > The value of TEXINPUTS as converted by MSYS and passed to display.exe is > incorrect, it should have been: > > > c:\Nos_Programmes\msys\bin\\;;c:\Nos_Programmes\msys\local\bin > > look at that ------------^^ > > That makes me think that a function missing in MSYS is some configuration > file where the user tells which variable to convert, and how to convert > them. This file could look like > > > PATH= > > TEXINPUTS=keep all empty up to 1, keep all tailing / up to 2 This would be *horrible* - where would it stop with other programs with their own specific interpretations of other variables? The responsibility of the conversion here from an MSYS (i.e. Unix-world) script calling out to a native Windows program needs to be the script itself, understanding what MSYS can try to do for it (which works for 99% of cases) and knowing when it'll have to do the work itself. > ... > > > > Anyway, it seems that MikTeX does not implement properly reading from > TEXINPUTS, as the cur directory cannot be given less precedence than some > other directory. This may be true, but that's one point (which is worth putting in a bug report) buried in a raft of incorrect documentation updates and assertions about how MiKTeX/MSYS should be behaving! David ------------------------------------------------------------------------------ _______________________________________________ Q: How can I leave the mailing list? A: See http://docs.miktex.org/faq/support.html#leavingml