In fact, yes, there is a mistake at this line. It should be: targetfile="png/*.png" It is corrected now but the problem is the same.
Here is my file hierarchy: $ tree . |-- build.xml |-- png | `-- icon.png `-- xcf |-- background.xcf `-- icon.xcf Why each time I run ant, my "png" target is executed please? On Fri, 2 Jan 2015 10:40:06 -0500 Harold Putman <hput...@lexmark.com> wrote: > your targetfile attribute on uptodate looks wrong > > targetfile="png/**.*.png > > Should that first dot be a slash? > > invoking ant with -d should give you an idea on why it is always setting > png-uptodate > > On Tue, Dec 30, 2014 at 6:17 PM, YuGiOhJCJ Mailing-List < > yugiohjcj-mailingl...@laposte.net> wrote: > > > Hello, > > > > I have a target that transforms files XCF into PNG by calling the > > "convert" command. > > I would like that this target does not execute if source files (i.e., the > > XCF files ) have changed. > > I have tried with the "uptodate" task but it does not work. > > Each time I run ant, the "convert" command is called. > > > > Any idea ? > > > > Thank you. > > Best regards. > > > > This is my build.xml file: > > <project name="xcf2png" default="png"> > > <target name="png-check"> > > <uptodate property="png-uptodate" > > targetfile="png/**.*.png"> > > <srcfiles dir= "xcf" includes="**/*.xcf"/> > > </uptodate> > > </target> > > <target name="png" depends="png-check" unless="png-uptodate"> > > <mkdir dir="png"/> > > <exec executable="convert"> > > <arg value="-verbose"/> > > <arg value="-alpha"/> > > <arg value="on"/> > > <arg value="-background"/> > > <arg value="none"/> > > <arg value="-layers"/> > > <arg value="merge"/> > > <arg value="xcf/icon.xcf"/> > > <arg value="png/icon.png"/> > > </exec> > > </target> > > <target name="clean"> > > <delete dir="png"/> > > </target> > > </project> > > > > This is the result in the console: > > $ ant > > Buildfile: /home/yugiohjcj/xcf2png/build.xml > > > > png-check: > > > > png: > > [exec] xcf/icon.xcf[0] XCF 32x32 32x32+0+0 8-bit sRGB 1.21KB 0.000u > > 0:00.000 > > [exec] xcf/icon.xcf[0] XCF 6x21 6x21+13+6 8-bit sRGB 0.000u 0:00.000 > > [exec] xcf/icon.xcf=>png/icon-0.png[0] XCF 32x32 32x32+0+0 8-bit sRGB > > 1c 255B 0.000u 0:00.089 > > [exec] xcf/icon.xcf=>png/icon-1.png[1] XCF 6x21 6x21+13+6 8-bit sRGB > > 3c 299B 0.000u 0:00.160 > > > > BUILD SUCCESSFUL > > Total time: 0 seconds > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: user-unsubscr...@ant.apache.org > > For additional commands, e-mail: user-h...@ant.apache.org > > > > > > > -- > Harold PUTMAN > Web Technology Specialist > *Lexmark International, Inc. <http://www.lexmark.com>* > 740 W New Circle Rd. > Lexington, KY 40550 > +1(859) 232-2839 > hput...@lexmark.com --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org