ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralf Hauser" <>
Subject RE: ant problem under cygwin and questions from a wanna-be Makefile convert
Date Tue, 15 Oct 2002 15:29:00 GMT
a little summary
> -----Original Message-----
> From: Ralf Hauser []
> Sent: Freitag, 11. Oktober 2002 07:00
> Maybe all my questions are already answered:
> 0) Is there some document like "ant for Makefile users?"
it would be great to have some generic suggestions how to deal with Makefile
constructs like
".o.c: dependency.h
Diane - as below: use the apply command.
> 1) path not executed properly under cygwin:
> when I run
>     <exec executable="/bin/sh">
>        <arg line='-c "ls -lart *.??.html"'/>
>     </exec>
> it is converted to \bin\sh which is misunderstood under cygwin and returns
> DOS error=3 (path not found)
apparently, this is a shortcoming in the implementation
- see
> 2) single character wildcard patterns:
> in the manual pages I find lots or "*" but no "?" examples?
> <include name="**/*.jar"/>
>       <dirset dir="${build.dir}">
>         <include name="apps/**/classes"/>
>         <exclude name="apps/**/*Test*"/>
> Can I use "?" inside ant? Or is there only mapper regex?
Diane ( directed me to
> 3) how to show the content of a fileset?
> I built
>   <fileset dir="." casesensitive="yes" >
>     <patternset id="htmlInputFiles" >
>        <include name="*.??.m4"/>
>     </patternset>
>   </fileset>
> where ?? is the 2 character language code (e.g. en or de) and the gnu m4
> pre-processor is used to translate them into *.??.html.
> How can I have ant "echo" the content of the fileset to see whether it
> worked right?
Diane says: <pathconvert> it to a property and <echo> the property.
I tried the below according to
  <fileset id="mySourceFiles" dir="." casesensitive="yes" >
    <patternset id="htmlInputFiles" >
       <include name="*.??.m4"/>
       <!--exclude name="**/*Test*"/-->
  <pathconvert targetos="unix" property="mySourceFilesAsPath"
      <map from="c:" to="/cygdrive/"/>
but I get the error:
build.xml:14: Unexpected element "pathconvert" ??
> 4) dependencies:
> is there a way to iterate through regexed dependencies?
> The Makefile I want to retire basically just did three things:
> i) if there is a *.??.m4 file, run m4 on that file and create the
> corresponding *.??.html output file unless it exists already
Diane: See the last example on the Apply task page in the doc.
This works with a batch script to circumvent the missing stdout redirection
in ant or the missing ouputfile spec of gnu m4
Reported as an enhancement suggestion:
> ii) if a *.??.m4 is younger than the corresponding *.??.html rebuild that
> target
Here, it appears that unfortunately another not so beautiful nor portable
batch script is necessary: it just drops the second argument (i.e. the
non-suppressible srcfile) of <apply>.
> iii) if a file in a list ",," is younger than any
> *.??.html, rebuild that *.??.html from its corresponding *.??.m4 solves that.

I still hope there is a better solution for i) and ii) coming out of the
discussion in or

Many thanks to all who have helped to get me here so far!

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message