[Top][All Lists]

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

Re: MSVC/Win32: building the documentation

From: Michael Goffioul
Subject: Re: MSVC/Win32: building the documentation
Date: Fri, 27 Oct 2006 23:35:52 +0200
User-agent: Thunderbird (Windows/20060909)

John W. Eaton a écrit :
| - run-octave failed to recreate the figures because it couldn't
| start the gnuplot process, while pgnuplot was actually in my
| PATH. I identified the cause as the way how gnuplot is invoked
| when use_title_options is true. For some (still unidentified)
| reasons, this does not work. But I could workaround it easily
| by undefining DISPLAY, as in \"DISPLAY= make\". However, and that's
| the funny part, you cannot set COMSPEC to an empty value to
| build the images, as in the second point, otherwise octave is
| unable to start pgnuplot as sub-process. So either you run a
| suite of \"COMSPEC= make\" and \"DISPLAY= make\" up to the next error.
| Or you can use the texi2dvi from the MiKTeX package, which does
| not require COMSPEC set to empty. As a 3rd solution, you can
| simply forget about the COMSPEC setting and just type \"../conf.texi\"
| when texi2dvi/pdf fails to find it.

How about just unsetting COMSPEC when running texinfo and texi2dvi, as
in the patch below?  Does that work for you?

I'll test it tomorrow. In the meantime, I could identify the problem with DISPLAY and COMSPEC and it relates to popen implementation under Win32. The "popen" function requires the program to have a console open and use COMSPEC variable to run the
program; hence COMSPEC needs to be defined.

OTOH, when DISPLAY is set, gnuplot is started as: "pgnuplot" -title "Figure 1". Again the problem is due to the somewhat broken implementation of popen. When such a command is used in popen, it will strips the leading and ending double-quote of the string and send the result to cmd.exe (this is partially explained in "cmd /?"). This resuls in: pgnuplot" -title "Figure1, which is plain wrong; hence the subprocess cannot be started.

One solution would be to prepend any popen command with "call". With the gnuplot command above, it would lead to: call "pgnuplot" -title "Figure 1". This would fix the popen problem, but it does not work for pgnuplot as the Win32 gnuplot version does not know about the "-title" command flag and just fails. So, for the documentation building,
unsetting DISPLAY seems the easiest solution.


reply via email to

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