I'm sorry, I didn't notice that you were also specifying runTarget when you made the antcall to router. I suppose in that case what you're doing makes as much sense as anything. The only alternative that springs to mind is putting each antcall to CPPProject in a separate task. Probably simpler but quite a bit longer as well.
-Matt --- Tibor Strausz <[EMAIL PROTECTED]> wrote: > the run proeprty will change because the param > 'runTarget' will change > > > > -----Original Message----- > > From: Matt Benson [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, August 14, 2002 3:41 PM > > To: Ant Users List > > Subject: RE: how can i use a property to > enable/disable a > > general target > > > > > > Since it seems you are checking more than once the > > value of a property which you do not expect to > change, > > you could do it only once: > > > > <target name="buildSources" > depends="checkruntarget" > > if="run" description="Building the > sources."> > > <!-- antcalls calling CPPProject here --> > > </target> > > > > <target name="checkruntarget"> > > <condition property="run"> > > <istrue value="${runTarget}" /> > > </condition> > > </target> > > > > -Matt > > > > --- Tibor Strausz <[EMAIL PROTECTED]> > wrote: > > > yes i want to re-check the same property for now > i > > > have the following wich > > > looks ok to me. > > > but if there is a shorter nicer better way i'm > hapy > > > to hear it :-) > > > > > > > > > > > > <target name="buildSources" > description="Building > > > the sources."> > > > > > > > > > <!--Installers\CustomActions\VC\TDSDialogValidation\TDSDialogV > > alidation.dsp- > > > -> > > > <antcall target="router"> > > > <param name="make" > value="TDSDialogValidation > > > - Win32 Unicode > > > Release"/> > > > <param name="target" value="CPPProject"/> > > > > <param name="project" > > > value="TDSDialogValidation"/> > > > <param name="runTarget" > > > value="${TDSDialogValidation}"/> > > > <param name="projectFile" > > > > > > value="Installers\CustomActions\VC\TDSDialogValidation\TDSDial > > ogValidation.d > > > sp"/> > > > </antcall> > > > > > > > > > <!--Installers\CustomActions\VC\TDSMSMQ\TDSMSMQ.dsp--> > > > <antcall target="router"> > > > <param name="make" value="TDSMSMQ - Win32 > > > Unicode Release"/> > > > <param name="target" value="CPPProject"/> > > > > <param name="project" value="TDSMSMQ"/> > > > <param name="runTarget" > value="${TDSMSMQ}"/> > > > <param name="projectFile" > > > > > > value="Installers\CustomActions\VC\TDSMSMQ\TDSMSMQ.dsp"/> > > > > > > </antcall> > > > > > > > > > <!--Installers\CustomActions\VC\TDSMTSUsr\TDSMTSUsr.dsp--> > > > <antcall target="router"> > > > <param name="make" value="TDSMTSUsr - > Win32 > > > Unicode Release"/> > > > <param name="target" value="CPPProject"/> > > > > <param name="project" value="TDSMTSUsr"/> > > > > <param name="runTarget" > value="${TDSMTSUsr}"/> > > > > > > <param name="projectFile" > > > > > > value="Installers\CustomActions\VC\TDSMTSUsr\TDSMTSUsr.dsp"/> > > > </antcall> > > > [...] > > > > > > </target> > > > > > > <!--======--> > > > <!--router--> > > > <!--======--> > > > <target name="router" description="This will > set > > > the run property if > > > runTarget is true and antcall's the target"> > > > <condition property="run"> > > > <istrue value="${runTarget}" /> > > > </condition> > > > <antcall target="${target}"> > > > </antcall> > > > </target> > > > > > > <!--===================--> > > > <!--=BUILD: CPPProject=if="run"--> > > > <!--===================--> > > > <target name="CPPProject" description="make a > > > CPPProject" if="run"> > > > <echo>Project: ${project} > > > Make: ${make} > > > File: ${projectFile} > > > Log: ${logDir}\${project}.log</echo> > > > <exec executable="${msdevExe}"> > > > <arg line="'${srcDir}\${projectFile}' > /MAKE > > > '${make}' /REBUILD /OUT > > > '${logDir}\${project}.log'"/> > > > </exec> > > > </target> > > > > > > > > > > > > > -----Original Message----- > > > > From: Matt Benson > [mailto:[EMAIL PROTECTED]] > > > > Sent: Tuesday, August 13, 2002 11:31 PM > > > > To: Ant Users List > > > > Subject: RE: how can i use a property to > > > enable/disable a > > > > general target > > > > > > > > > > > > Okay, I'm not sure what you're after. Do you > want > > > to > > > > check for the existence of different > properties in > > > one > > > > run of Ant using only one target? Or are you > > > wanting > > > > to re-check the same property over and over? > I > > > had > > > > the problem of getting the reset property > warning > > > when > > > > the same target was invoked twice, so I did > this: > > > > > > > > <target name="init" unless="init.done"> > > > > <!-- do some stuff --> > > > > <property name="init.done" value="true" /> > > > > </target> > > > > > > > > This allowed me to execute only once, but > would > > > only > > > > be good for checking the value of one property > one > > > > time and using the results throughout the Ant > > > process. > > > > If you need to check multiple properties, the > > > simple > > > > way would be to use a target per each > property, > > > > although some dynamic way might be devised, > quite > > > > possibly involving <antcall>? I dunno... > > > > > > > > -Matt > > > > > > > > --- Tibor Strausz <[EMAIL PROTECTED]> > > > wrote: > > > > > well yes but now the value propset is set > and > > > can't > === message truncated === __________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
