There isn't specially setup for this. This "hack" seems pretty
reasonably to me. At least it doesn't require any special conditions to
be added to nant to have it work.
Master.build
<property name="called-from-master" value="true"/>
<nant buildfile="Child.build" inheritall="true"/>
Child.build
<fail unless="${called-from-master}" message="This build file
can only be included from a master build file." />
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]] On
> Behalf Of John Lam
> Sent: Sun, June 23, 2002 7:53 PM
> To: [EMAIL PROTECTED]
> Subject: [nant-dev] Enforcing child-only projects?
>
>
> I just recently discovered the inheritall attribute on the
> NAnt task. This rocks!
>
> Now for the follow-up question: is there a recommended way of
> forcing a NAnt project to be a "child-only" project - that is
> to throw an error if it isn't called from a master project?
>
> I can think of hacks that involve defining properties in the
> master build file and then testing for their presence in
> child build files, but it's hard to catch all possible
> combinations there.
>
> Thanks,
>
> -John
> http://www.iunknown.com
>
>
>
>
> -------------------------------------------------------
> Sponsored by:
> ThinkGeek at http://www.ThinkGeek.com/
> _______________________________________________
> Nant-developers mailing list [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/nant-developers
>
-------------------------------------------------------
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
_______________________________________________
Nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers