"Dominique Devienne" <[EMAIL PROTECTED]> writes:

> On 1/14/08, Stefan Bodewig <[EMAIL PROTECTED]> wrote:
>> "Dominique Devienne" <[EMAIL PROTECTED]> writes:
>> Having something like before/after/around advices (where around is the
>> same as an override that doesn't change the dependencies list) may
>> suffice and leave overwriting the whole target definition to the worst
>> case.
>
> Thanks for reminding me of this issue Stefan. Indeed, something I
> really didn't like about overriding the whole target, is that you had
> to duplicate the dependency list as well...
>
> Which is why I now remember that I now remember I used 4, not 3
> targets, in the "abstract" build, the forth one being the target's own
> content, separate from its dependency list:

I get away with two, but don't get the nice names you use.

<target name="ready-to-do-foo" depends="bar,baz"/>
<target name="foo" depends="-pre-foo">...</target>

and my overriding targets depend on the imported targets to get in the
correct place in the dependency chain.  I.e. a -post-foo target as you
use it would be

<target name="foo" depends="imported:foo">...</target>

> Note though that unlike before and after, around isn't as
> representative a name.

In my case the names come from their usage in Common Lisp so they do
have some precedent.  I agree that around doesn't really describe what
it does.

> When I thought about this issue a while back, I thought of using a
> magic name such as "super" in the depends attribute to refer to the
> overridden target's dependency list, similar to using <super/> in
> the target's body to refer to the overridden target's task
> list/content.

I don't have any problem with super as a magic target name, but I'm
still not convinced of <super/>.  Hmm, maybe we should spawn of
separate threads for the different topics.

<super/> must in some way be taken into account when setting up the
dependency graph of the whole build file which makes it a different
beast from normal tasks.  With before and after attributes on target
you wouldn't need <super/> anymore.

Stefan
-- 
http://stefan.samaflost.de/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to