[Omake] Recursive invocation of omake

Aleksey Nogin nogin at cs.caltech.edu
Sat Jun 10 09:41:50 PDT 2006


On 10.06.2006 08:14, Benjamin Pierce wrote:

> I've been trying to figure out how to make one .PHONY target invoke  
> another one.  Specifically, what I (think I) want is something like
> 
>    .PHONY: junk
>    junk: testdir/test
> 
> so that, while in one directory, I can easily cause something to  happen 
> in another directory.  But I don't see how to do this: the  lines above 
> don't seem to work, and the trick suggested by Aleksey's  message
> 
>    .PHONY: junk
>    junk: .PHONY/testdir/test
> 
> doesn't either.  

It's actually supposed to work in most cases. But the testdit needs to 
be a part of the project and should actually have a phony target "test" 
(either declared there, or inherited via ".SIBDIRS").

% cat OMakefile
.PHONY: foo

foo: .PHONY/bar/xyz

.SUBDIRS: bar

.DEFAULT: foo
% cat bar/OMakefile
.PHONY: xyz

xyz:
     echo "This is xyz"
% omake
*** omake: reading OMakefiles
*** omake: finished reading OMakefiles (0.1 sec)
- build bar <xyz>
+ echo "This is xyz"
This is xyz
*** omake: done (0.2 sec, 0/0 scans, 1/1 rules, 0/37 digests)

But if I delete the SUBDIRS line, then running omake would not do 
anything (this is weird even to me, but this ".PHONY/..." syntax is 
still an experimental feature).

-- 
Aleksey Nogin

Home Page: http://nogin.org/
E-Mail: nogin at cs.caltech.edu (office), aleksey at nogin.org (personal)
Office: Moore 04, tel: (626) 395-2200


More information about the Omake mailing list