[Omake] Re: Tests

Jason Hickey jyh at cs.caltech.edu
Mon Jun 18 12:12:01 PDT 2007


On Jun 18, 2007, at 12:00 PM, Aleksey Nogin wrote:

> On 14.06.2007 13:41, David Kågedal wrote:
>
>> Done.  I also added another test (targets/Test2) that works with my
>> svn version on linux but fails on the 0.9.8.4 distribution for
>> windows.  Is this something that has been fixed in svn?
>> The problem is that "cd foobar" is lost between two commands in a  
>> rule
>> body.
> This was "by design" - all the commands in rule bodies were  
> considered to be completely separate, their effects would not be  
> inherited by subsequent commands.
>
> I guess the "new" 0.9.8.x changes this. Nothing wrong with that, I  
> guess, but it is a fairly significant incompatibility with previous  
> versions...

I'm confused:(  The policy is:

    - All shell commands in a rule are executed by separate shells  
(just like make).
      This means that the environment, directory, etc. do not persist  
across lines.
    - -Except- in a section.  This isn't actually an exception to the  
rule--the
      section is considered to be a single shell command.

If the "cd .." in the following is getting lost, it is a bug...

foo:
     section
         cd ..
         if $(equal $(CWD), $(d))
             eprintln(Ineffective cd)
             exit(1)

Jason

--
Jason Hickey                  http://www.cs.caltech.edu/~jyh
Caltech Computer Science      Tel: 626-395-6568 FAX: 626-792-4257





More information about the OMake-Devel mailing list