Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: tiwag on October 10, 2006, 04:18:16 pm

Title: Info about "Targets Dependencies"
Post by: tiwag on October 10, 2006, 04:18:16 pm

when i go to

Project->Properties->[Targets Tab]->[select one of the Build targets]->[Dependencies Button]

then i have an "External dependencies" dialog with two panes:

* Additional output files
and
* External dependency files

what is the difference between them ?
could you please explain me, how i should use them correctly ?


i would have expected one pane, where i can select any of the other Targets as dependency
and another pane where i can select any files.


thx, tiwag
Title: Re: Info about "Targets Dependencies"
Post by: MortenMacFly on October 10, 2006, 05:18:18 pm
IMHO...

* Additional output files
Addition al object files (*.o, *.obj) not compiled by your project, but maybe an additional script.

* External dependency files
Basically the same, but when they differ in the date (e.g. newer than the last compilation of your project) a re-link is triggered.

With regards, Morten.
Title: Re: Info about "Targets Dependencies"
Post by: mandrav on October 10, 2006, 05:22:17 pm
Read the help text there carefully:

Quote from: text in that dialog
If the target's output, or any of the additional files, is older than any of the external dependencies,
a target re-link is forced.

So, the external dependencies are our time-references.


The additional files box is useful for targets that auto-generate files other than their output. For example, if a target must re-generate a header file (a) when another file (b) is updated, then you would put file (a) in "additional files" and file (b) in "external dependencies". This way, if file (b) is newer than file (a) the target would be re-linked.
Is that clearer now?
Title: Re: Info about "Targets Dependencies"
Post by: tiwag on October 10, 2006, 05:30:46 pm
So, the external dependencies are our time-references.
  • If the target's output file is older than the dependencies, the target is re-linked.
  • If any of the additional files is older than the dependencies, the target is re-linked.


The additional files box is useful for targets that auto-generate files other than their output. For example, if a target must re-generate a header file (a) when another file (b) is updated, then you would put file (a) in "additional files" and file (b) in "external dependencies". This way, if file (b) is newer than file (a) the target would be re-linked.
Is that clearer now?

clear now, thanks !