Well, here is something which I have done using Make. It's very complex and a bit contrived but I was wondering how would this be done in ANT.
First, a brief overview of my problem:
I wanted to build
prog (which is written in C) based on all of its dependencies. However, some commands (or tasks) should always run and Make should decide whether to rebuild prog. I made use of
The double colon of Make.
The task involved of building two dynamic header files based on information in an Oracle database! This allowed "prog" to be built based on meta-data. One rule always ran which refreshed (or replaced) the header file if it was necessary. If there was a change in the header file then Make would run the second rule.
I really had to do some arm twisting (as you will see) to get this done. I am just wondering how much easier this would have been with ANT.
Here's the snippet from the Makefile:
<code>update_header</code> is a Shell script:
As you can see update_header regards to the first param as a script. Both <code>create_define_file.sh</code> and <code>create_map_file.sh</code> do the same thing: they query the database and return a complete header file.
I will just show the more complicated of the two: create_map_file.sh
A lot of arm twisting I think so! How would this be achieved with ANT?
Thanks,
Leslie
[ March 12, 2003: Message edited by: Leslie Chaim ]