CITS4407 Open Source Tools and Scripting  
prev
next CITS4407 help4407 CITS4407 schedule  

Dependencies between files

From our pseudo-code:


if (files on which a certain file depends)
       i) do not exist, or
      ii) are not up-to-date
then
     create an up-to-date version;

we are particularly interested in the dependencies between various files - certain files depend on others and, if one changes, it triggers the "rebuidling" of others:

dependencies
  • The executable program prog is dependent on one or more object files (source1.o and source2.o).

  • Each object file is (typically) dependent on one C source file (suffix .c) and, often, on one or more header files (suffix .h).

So:

  • If a header file or a C source file are modified (edited),
    then an object file needs rebuilding (by cc).

  • If one or more object files are rebuilt or modified (by cc),
    then the executable program need rebuilding (by cc).

 

NOTE that the source code files (suffix .c) are not dependent on the header files (suffix .h).

 


CITS4407 Open Source Tools and Scripting, Week 9, p6.