This worked. I had read on the web somewhere that you couldn't set a property twice in the same build file -- that the properties were set before the build ran, so if you did this:
<property name="debug" value="true" /> <property name="debug" value="false" /> The value of debug would be either true or false (I'm not sure if the first or second value wins), but not change along the way. Thus in the above example, for the entire script, the value of debug would be either true or false (depending on precedence) and stay that way for the entire build. Thanks for clearing up my misunderstanding. John > -----Original Message----- > From: Felice Vittoria [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 02, 2004 9:10 PM > To: John Debay; [EMAIL PROTECTED] > Subject: RE: [Nant-users] Debug or release builds, or both > > John, > > I'm not sure how your script it setup but this *is* possible. > > For one, I would change the line: ${projectdir}/debug/bin > to: ${projectdir}/${build.type}/bin > > That would take care for debug/release directories. > > I would also incorporate the same changes in your csc targets. > > From reading your email, I'm assuming that debug,release and all are targets, > correct? If so, you can do something like this: > > <target name="debug"> > <property name="build.type" value="debug"> > <call target="buildwhatever" /> > </target> > <target name="release"> > <property name="build.type" value="release"> > <call target="buildwhatever" /> > </target> > <target name="debug"> > <property name="build.type" value="debug"> > <call target="buildwhatever" /> > <property name="build.type" value="release"> > <call target="buildwhatever" /> > </target> > > HTH, > Felice > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of John Debay > Sent: Thursday, September 02, 2004 6:42 PM > To: [EMAIL PROTECTED] > Subject: [Nant-users] Debug or release builds, or both > > > Hi, > > I want to create a NAnt build script that can easily handle either debug or > release builds, or both. In other words, from the command line, I want to be > able to do any of: > > nant debug // creates debug build > nant release // creates release build > nant all // creates both > > What I do not want to have to do is create two separate targets, each with > its own csc task that must include the same set of files and references, > with the only difference being a boolean flag. I also want to put the > results of these builds into different directories. For example, I want to > put the debug binaries into ${projectdir}/debug/bin and release binaries > into ${projectdir}/release/bin. > > Needless to say, I don't want to have to create clean targets for debug & > release, prepare targets for debug and release, compile targets for debug > and release, and so on. I just want to say ${builddir} = > ${projectdir}/${build.type}/bin, ${debug} = true, and off I go. It doesn't > look like it's possible to set this to one value, then set it to another and > re-run the same tasks. > > What I'm trying to do seems easy enough -- set a flag to true or false, > parameterize a directory -- but I just can't seem to get it to work without > copy-and-pasting chunks of my build file. I can see how to get one or the > other to work, but not both. > > Thanks in advance for any insight provided. > > John > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > Nant-users mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/nant-users ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users