Expanding a simple list to a collection of file names
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Dick_Cowan
Posted On:   Monday, January 12, 2004 11:50 PM

I've been using Ant nicely to build a collection of C files using Windows, GreenHills, and Tornado tools. I haven't been able to devise a simple scheme to handle the different collections of object files used by the various linkers. Basically I want to map a list of simple names to a collection of object files. In each subdirectory of the source tree I have a very simple build script which dictates under which tools this given node should be compiled. Example: (Here using square rather than angle brackets so as not to mess up this HTML message) [target name="build"] [ant antfile="${build}/windows.xml" target="${target}"/] [ant antfile="${build}/tornado.xml" t   More>>

I've been using Ant nicely to build a collection of C files using Windows, GreenHills, and Tornado tools. I haven't been able to devise a simple scheme to handle the different collections of object files used by the various linkers. Basically I want to map a list of simple names to a collection of object files. In each subdirectory of the source tree I have a very simple build script which dictates under which tools this given node should be compiled.


Example: (Here using square rather than angle brackets so as not to mess up this HTML message)


			
[target name="build"]
[ant antfile="${build}/windows.xml" target="${target}"/]
[ant antfile="${build}/tornado.xml" target="${target}"/]
[/target]


For this particular node I'd like to indicate in as simple a manner as possible which other object directories need to be scanned for files to link with. So I'd like to be able to say something like:


[property name="link.dirs" value="util,log"/]


Note that this isn't a list of directories.


Then when the windows build script is invoked it would link with those .obj files it finds in the directories ${project.home}/software/obj/util/windows, and ${project.home}/software/obj/log/windows.


The tornado script would link with those .o files found in the directories ${project.home}/software/obj/util/tornado and ${project.home}/software/obj/log/tornado.


I've experimented with pathconvert, filelist, and mapper but haven't been able to get a simple working solution. I'm certain there is some simple way to take a list of simple names and use them with a regular expression and includes of some sort.


Any ideas?


Thanks in advance for any assistance!


Regards,


Dick

   <<Less

Re: Expanding a simple list to a collection of file names

Posted By:   Anonymous  
Posted On:   Wednesday, January 14, 2004 03:12 AM

Maybe the ant-contrib project (http://ant-contrib.sourceforge.net/) can help you out with there tasks.
About | Sitemap | Contact