<br><br><div class="gmail_quote">2011/11/22 Peter Collingbourne <span dir="ltr"><<a href="mailto:peter@pcc.me.uk">peter@pcc.me.uk</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im">On Fri, Nov 18, 2011 at 10:02:54AM +0100, Nicolas Desprès wrote:<br>
> On Wed, Nov 16, 2011 at 3:05 PM, OKUMURA Yuki <<a href="mailto:mjt@cltn.org">mjt@cltn.org</a>> wrote:<br>
><br>
> > (Sorry Bill, i repost here..)<br>
> ><br>
> > 2011/11/16 Bill Hoffman <<a href="mailto:bill.hoffman@kitware.com">bill.hoffman@kitware.com</a>>:<br>
> > - snip -<br>
> > > What type of evolution will Ninja need?   I suppose it could use cmake<br>
> > > scripts and exectue_process which can do && type things pretty easy.<br>
> ><br>
> > Why not insert "cmd /c" everywhere? :)<br>
> > Anyway, i had tried this in early this month,<br>
> ><br>
> > <a href="https://github.com/okuoku/CMake/commit/db19df03606684f313c9e86b313218feee9cce3f" target="_blank">https://github.com/okuoku/CMake/commit/db19df03606684f313c9e86b313218feee9cce3f</a><br>
> > but it didn't work well.<br>
<br>
</div>How so?  Was there an escaping issue?  The cmd.exe documentation seems<br>
to indicate that this will work.<br>
<br>
<a href="http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_shelloverview.mspx#EBG" target="_blank">http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_shelloverview.mspx#EBG</a><br>


<div class="im"><br>
> ><br>
> > I think almost all use of "&&" is just "chdir /d $workdir &&<br>
> > compile/link-command." So, adding $workdir<br>
> > specifier to target syntax of Ninja might work for many cases.<br>
> ><br>
><br>
> That's right. I just had a look at the build.ninja file generated by the<br>
> Ninja Generator and it actually uses && only for changing the working<br>
> directory.  I will suggest a patch to Ninja to support working directory<br>
> for each build statement.<br>
<br>
</div>That's not the only thing that the Ninja generator uses && for.<br>
It also uses && to prepend/append PRE_BUILD, PRE_LINK and POST_BUILD<br>
commands to the link command, and to concatenate multiple custom<br>
command lines.<br></blockquote><div><br></div><div>True. I realized that. Actually, it seems that cmd.exe have some sort of support for && and || so maybe it would work. I have to try.</div><div><br></div><div>Cheers,</div>

<div><br></div></div>-- <br>Nicolas Desprès<br><br>