ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cameron McCormack <...@mcc.id.au>
Subject Using antcall but not re-running dependent targets
Date Sat, 20 Jan 2007 10:59:26 GMT
Hi.

I’ve got a build file that’s structured like this:

  <target name="init">
    <echo message="something"/>
  </target>

  <target name="one" depends="init, something">
    <condition property="suffix" value="mac" else="other">
      <os name="Mac OS X"/>
    </condition>
    <antcall target="two-${suffix}"/>
  </target>

  <target name="two-mac" depends="init">
  </target>

  <target name="two-other" depends="init">
  </target>

  <target name="something">
  </target>

If I run "ant one" I get:

  jet:/tmp $ ant one
  Buildfile: build.xml

  init:
       [echo] something

  something:

  one:

  init:
       [echo] something

  two-other:

  BUILD SUCCESSFUL

but I want it so that the init target doesn’t get run again, because it
has already been run.  Is that just a limitation of antcall (that it
forgets which dependencies have already been run)?  If so, how I else
can I get this sort of flow control?

Thanks,

Cameron

-- 
Cameron McCormack, http://mcc.id.au/
	xmpp:heycam@jabber.org  ▪  ICQ 26955922  ▪  MSN cam@mcc.id.au

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message