Re: Conditional dependencies

Lars Ivar Igesund <[email protected]> Thu, 15 Jul 2004 09:41:32 +0100
Newsgroups gmane.comp.tools.aap.devel
Message-ID <[email protected]>
Bram Moolenaar wrote:

> Lars Ivar Igesund wrote:
> 
> 
>>It struck me once that the dependencies found by ddepcheck wasn't 
>>necessarily correct at all times. This is due to the possibility to 
>>conditionally include/exclude parts of the source code using compiler 
>>switches. Correct dependencies for any given compilation run would 
>>therefore need ddepcheck to also look at these switches. I have 
>>implemented this (looks hairy at the moment) on my local copy of 
>>ddepcheck, but there is another problem that might, well, be a problem.
>>
>>If the switches are changed, changing the dependencies, but not the 
>>source code itself, can this be handled by A-A-P? I suppose dependency 
>>checking of C/C++ where includes are conditionally included/excluded by 
>>define might have the same problem.
> 
> 
> There are two ways to do the dependency checking:
> 1. Without looking at conditionals.  Thus more files are found than what
>    is actually used.
> 2. Taking conditionals into account.  Then the list of files is
>    accurate, but may change when the circumstances change.
> 
> In the first case there are no tricks, no need to check the dependencies
> again when you change conditionals.
> 
> In the second case, the build signature should include the
> circumstances.  For C these are the preprocessor symbols.  This should
> already happen, since Aap uses a signature for the build commands.

So as long as the switches that controls this are included in the depend 
action's buildcheck attribute, it will work out alright?

Lars Ivar Igesund


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click