Edwin,

Another alternative is to unify build/rebuild and decide between them with properties...

<property name="build.clean" value="false" overwrite="false" />

<target name="build.clean"           if="${build.clean}" />
<target name="build.incremental" unless="${build.clean}" />
<target name="build" depends="build.clean, build.incremental" />

<target name="test" depends="build" />


Regards,

-- Troy

    -----Original Message-----
    *From:* [EMAIL PROTECTED]
    [mailto:[EMAIL PROTECTED] Behalf Of
    *Castro, Edwin Gabriel (Firing Systems Engr.)
    *Sent:* Thursday, September 16, 2004 12:21 PM
    *To:* McCullough, Gary; [EMAIL PROTECTED]
    *Subject:* RE: [Nant-users] Target depending on one of two other targets

    Here is the way I was doing it so far:



    <project name=”projectA”>



    <target name=”build” />



    <target name=”rebuild” />



    <target name=”compile>

      <ifnot test=”${target::has-executed(‘build’) or
    target::has-executed(‘rebuild’)}”>

        <call target=”build” />

      </ifnot>

    </target>



    <target name=”test” depends=”compile” />



    </project>



    The solution is not too difficult. I am more curious as to whether
    there is a better way to do this. Thanks!



    --

    Edwin



    ------------------------------------------------------------------------

    *From:* McCullough, Gary [mailto:[EMAIL PROTECTED]
    *Sent:* Thursday, September 16, 2004 9:50 AM
    *To:* Castro, Edwin Gabriel (Firing Systems Engr.);
    [EMAIL PROTECTED]
    *Subject:* RE: [Nant-users] Target depending on one of two other targets



    You could have your dependency projects set a property which your
    dependent could check.



    ------------------------------------------------------------------------

Gary McCullough

    ------------------------------------------------------------------------

    *From:* [EMAIL PROTECTED]
    [mailto:[EMAIL PROTECTED] *On Behalf Of
    *Castro, Edwin Gabriel (Firing Systems Engr.)
    *Sent:* Thursday, September 16, 2004 12:36 PM
    *To:* [EMAIL PROTECTED]
    *Subject:* [Nant-users] Target depending on one of two other targets



    Is there an easy way to have one target depend on one of two (or
    more) other targets?



    I have a build file similar to the following:



    <project name=”projectA”>

    <target name=”build” />

    <target name=”rebuild” />

    <target name=”test” />

    </project>



    I would like my test target to make sure that either build or
    rebuild has been executed (I can set one as default if none has
    executed). I think in the past I had to use another target that
    ensured my dependency and I had test depend on this target.



    --

    Edwin




------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to