Thanks to Phil for his answer (I think it was Phil) - my newsfeed has a very
strange purge policy, so now the answer is gone but my posting isnn't..???

Anyway - Phil suggests to use Open3.popen3
And indeed I have had some degree of success with this.
My patience is going to let my finish with it though:
cygwin works very differently on my two machines none very satisfactory and
popen3 uses fork, which I suspect will not work well with a clean Win32
build.

On a more general note:
Why is it so unelegant to execute shell script style code in Ruby?
Ruby can't possibly be a scripting language when you can't script in it.
I'm not saying this is a bad thing - I like Ruby as a programming language.
But for scripting purposes, like replacing .bat files or .sh files depending
on OS I have never had much success with Ruby given my limited patience in
this respect.

Which brings me to the next issue:

> Longer term: I really hate the build tools around. "Ant" is an attempt to
> make something better in Java.

Phil suggests: "Jam".

Yes I actually did look at Jam just before posting. It was a pain to get
make (that I in principle do not have) to build on NT with the supposedly
quite old NT 5.0 the build was last tested with - I could almost get it to
build (have done so before), but then the logic is so twisted and the
documentation so weird, that I'd rather build a decent tool up with Ruby,
going along with my own requirements as they come.

The issue is that I either need to set up custom build rules in Jam, Ant or
in Ruby.
Second, I need custom dependency scanning. The output from "ocamldep" for
instance, do not match Jam's strange "insert space before :" syntax. So I'd
need to pass it through Ruby anyway. Second, Jam's fine, but limited header
scanning logic for include files might as well be done in Ruby as far as I
can see.
The result would be a lot more readable and you could extend and distribute
builds as they go.

Then two things happened - I got tired once more - of Rubys not that great
system features on Windows (or may lack of same). And I discovered
Boost.Build. It's an modified version of jam. (www.boost.org). And they
actually have decent documentation.

Boost.Build has a precompiled binary for NT (and other platforms). It has
extended the syntax with modules, parameter names and many other Ruby
features.

Therefore, I'm currently all for going with Boost.Build.'s version of Jam.
Still I wonder if Ruby wouldn't be a better language for the job?


MikkelFJ