#include like facility
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Tuesday, June 25, 2002 09:05 AM

In my project some the source files will be created by using the C preprocessor first, which replaces the #include directives with the content of the referenced file. In my Ant task I'm executing an external script which calls cpp. Obviously this requires a UNIX environment. Is Ant able to perform this OS independent? There's a replace task which replaces a given string with another. If I could define a property to carry the contents of a file as its value, then replace would help. (I don't need a parameterized #include). Another solution would be if Ant had something like Thanks, Oliver    More>>

In my project some the source files will be created by
using the C preprocessor first, which replaces the
#include directives with the content of the referenced file.
In my Ant task I'm executing an external script which calls
cpp. Obviously this requires a UNIX environment.


Is Ant able to perform this OS independent?


There's a replace task which replaces a given string with
another. If I could define a property to carry the contents
of a file as its value, then replace would help.
(I don't need a parameterized #include).


Another solution would be if Ant had something like

			



Thanks, Oliver

   <<Less

Re: #include like facility

Posted By:   Erik_Hatcher  
Posted On:   Tuesday, June 25, 2002 07:28 PM

There is a task in Ant 1.5 that would do the trick.

Re: #include like facility

Posted By:   Roseanne_Zhang  
Posted On:   Tuesday, June 25, 2002 05:02 PM

Write a small customized ant task will easily accomplish your goal. Remember, ant tasks are just a Java program with an excute() method. It is a lot easier than you write a shell script. It will be platform independent and a lot easier to maintain too.
About | Sitemap | Contact