a little summary > -----Original Message----- > From: Ralf Hauser [mailto:[EMAIL PROTECTED]] > 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 COMPILECOMMAND ..." 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 http://issues.apache.org/bugzilla/show_bug.cgi?id=13524 > > 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 ([EMAIL PROTECTED]) directed me to http://jakarta.apache.org/ant/manual/CoreTypes/mapper.html > > 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 http://jakarta.apache.org/ant/manual/CoreTasks/pathconvert.html <fileset id="mySourceFiles" dir="." casesensitive="yes" > <patternset id="htmlInputFiles" > <include name="*.??.m4"/> <!--exclude name="**/*Test*"/--> </patternset> </fileset> <pathconvert targetos="unix" property="mySourceFilesAsPath" refid="mySourceFiles"> <map from="c:" to="/cygdrive/"/> </pathconvert> 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. http://jakarta.apache.org/ant/manual/CoreTasks/apply.html ---- This works with a batch script to circumvent the missing stdout redirection in ant or the missing ouputfile spec of gnu m4 (http://www.mail-archive.com/ant-user@jakarta.apache.org/msg20937.html). Reported as an enhancement suggestion: http://issues.apache.org/bugzilla/show_bug.cgi?id=13652 > 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>. http://issues.apache.org/bugzilla/show_bug.cgi?id=13654 > iii) if a file in a list "a.inc, b.inc, c.inc" is younger than any > *.??.html, rebuild that *.??.html from its corresponding *.??.m4 http://jakarta.apache.org/ant/manual/CoreTasks/dependset.html solves that.
I still hope there is a better solution for i) and ii) coming out of the discussion in http://www.mail-archive.com/ant-user@jakarta.apache.org/msg20974.html or http://www.mail-archive.com/ant-user@jakarta.apache.org/msg20981.html. Many thanks to all who have helped to get me here so far! -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>