Checking Build Dependencies for External Applications

View: New views
2 Messages — Rating Filter:   Alert me  

Checking Build Dependencies for External Applications

by aha-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello All,
  I've been working with NAnt for about a three months now and along the way I've learned a lot, but I've yet to figure out the best way to check build dependencies for external applications.  In a perfect world, I would be able to develop an application in a single language, but I work with a project that needs to compile source code from languages such as C++ and Java. To accomplish this, I use the exec task with build tools such as make, javac, jar, g++, libtool etc...  However, the build is far from efficient, because I have situations where targets have multiple source file dependencies.  The solution that I came up with was to use:

unless="${file::up-to-date(src,target)}"

in the target element to determine if a file needs to be rebuilt.  This works pretty well when there is a one to one dependency, but does not help much in situations where I have targets that have multiple dependencies.  For example, I build a class file from A.java that depends on B.java, C.java and D.java.  In this case I need to check if all the dependencies are up-to-date.  I was considering writing a function that takes a list of dependency files and then check for modifications against the target.  I was also thinking of just writing a target that checks all of the dependencies and then sets a property if a compile needs to happen.  Anyway, before I made a decision I thought I would ask the community for suggestions.  Cheers.

--
Aquil H. Abdullah
aquil.abdullah@...
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
NAnt-users mailing list
NAnt-users@...
https://lists.sourceforge.net/lists/listinfo/nant-users

Parent Message unknown Re: Checking Build Dependencies for External Applications

by Chris Lambrou-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm not sure how you can perform the dependency checking without actually comparing file modification dates. However, the <uptodate/> task makes this a lot easier than the file::up-to-date function, when multiple files are involved. Were you aware of it?
 
Chris


From: nant-users-bounces@... [mailto:nant-users-bounces@...] On Behalf Of Aquil H. Abdullah
Sent: 02 July 2008 15:49
To: nant-users@...
Subject: [NAnt-users] Checking Build Dependencies for External Applications

Hello All,
  I've been working with NAnt for about a three months now and along the way I've learned a lot, but I've yet to figure out the best way to check build dependencies for external applications.  In a perfect world, I would be able to develop an application in a single language, but I work with a project that needs to compile source code from languages such as C++ and Java. To accomplish this, I use the exec task with build tools such as make, javac, jar, g++, libtool etc...  However, the build is far from efficient, because I have situations where targets have multiple source file dependencies.  The solution that I came up with was to use:

unless="${file::up-to-date(src,target)}"

in the target element to determine if a file needs to be rebuilt.  This works pretty well when there is a one to one dependency, but does not help much in situations where I have targets that have multiple dependencies.  For example, I build a class file from A.java that depends on B.java, C.java and D.java.  In this case I need to check if all the dependencies are up-to-date.  I was considering writing a function that takes a list of dependency files and then check for modifications against the target.  I was also thinking of just writing a target that checks all of the dependencies and then sets a property if a compile needs to happen.  Anyway, before I made a decision I thought I would ask the community for suggestions.  Cheers.

--
Aquil H. Abdullah
aquil.abdullah@...
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
NAnt-users mailing list
NAnt-users@...
https://lists.sourceforge.net/lists/listinfo/nant-users