ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: TimeStamp dependent target execution
Date Mon, 10 Jul 2000 03:06:15 GMT
Marius Scurtescu writes:
 > Stefan Bodewig wrote:
 > [...]
 > Some more thoughts along these lines. Using a few implicit variables this
 > one-to-one matching can be implemented very elegantly like:
 > <transform command="compile ${src} ${dest}">
 >   <src dir="documentation/docbook">
 >     <include name="**/*.sgml" />
 >   </src>
 >   <dest dir="${folder}">
 >     <include name="**/${name}.rtf" />
 >   </dest>
 > </transform>
 > Where ${folder}, ${name}, ${src} and ${dest} have different value for every single
 > file matched by the <src ...> tag.

So, in some sample run, **/${name}.rtf == **/afile.sgml.rtf ? How does
it know where extension ends and significant filename begins? What you
want is something like:

<transform command="compile ${src} ${dest}">
	<src dir="documentation/docbook">
    <include name="**/*.sgml"/>
  <dest dir="${folder}">
    <include name="`sed s/.sgml$/.rtf/g ${name}`"/>

or even:

$BUILD_DIR/%.class: $SRC_DIR/
        $JAVAC -classpath $COMPILE_CLASSPATH -d $BUILD_DIR "$*.java"

Hmmm, where have I seen that before? ;-) Even make doesn't make that
confusing an assumption about the files it's dealing with.


View raw message