[Omake] Testing whether a target has been defined
Jason Hickey
jyh at cs.caltech.edu
Tue Jun 20 17:44:40 PDT 2006
malc wrote:
> rule(p1, p2, p3, p4, p5, p6) =
> new-body =
> append-body()
> apply($(fun $(p6)))
> old-rule($(p1), $(p2), $(p3), $(p4), $(p5), $(new-body))
> export
...
> Now this will only work if we substitute $(new-body) with $(p6), why?
Well... In the end I would say that is all not very well worked out:/
I do feel that the ability to add rule-wrappers is a reasonable idea,
but it should be very clearly defined (unlike now).
BTW, I tried your example. The reason it doesn't work centers around
binding. Basically, in $(fun $(p6)), "$(p6)" is the function body--not
the value of p6, but the literal expression "$(p6)". So all of these
functions have the same body, which is of course crazy.
I like your example, I think it can help clarify the scoping issue.
For now I can't offer any help, but I think you've given us something to
work with.
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
mailing list