- Don't do 'mtn list changed' if not in a workspace or not needed

This commit is contained in:
zzz
2011-06-08 20:15:53 +00:00
parent d57925e848
commit c5f04ee9c4
17 changed files with 258 additions and 28 deletions

View File

@ -44,7 +44,7 @@
</javac>
</target>
<target name="jar" depends="builddep, compile, jarUpToDate" unless="jar.uptodate" >
<target name="listChangedFiles" depends="jarUpToDate" if="shouldListChanges" >
<exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" />
<arg value="changed" />
@ -56,6 +56,11 @@
<arg value="[:space:]" />
<arg value="," />
</exec>
</target>
<target name="jar" depends="builddep, compile, jarUpToDate, listChangedFiles" unless="jar.uptodate" >
<!-- set if unset -->
<property name="workspace.changes.tr" value="" />
<jar destfile="./build/streaming.jar" basedir="./build/obj" includes="**/*.class" >
<manifest>
<attribute name="Build-Date" value="${build.timestamp}" />
@ -69,6 +74,14 @@
<uptodate property="jar.uptodate" targetfile="build/streaming.jar" >
<srcfiles dir= "." includes="build/obj/**/*.class" />
</uptodate>
<condition property="shouldListChanges" >
<and>
<not>
<isset property="jar.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target>
<target name="jarTest" depends="jar, compileTest">