Hello,
> For example, assume B uses A (as private) and C
> uses B and A. Then we could either put both B and A in the dependency
> list of C or only put B (since B will depend on A anyway). Which is
> better (if any) and why?
As I was compiling a project I think I answered my own question: One needs to list
*all* dependencies due to modules explicitly, if one uses a "compare module with
old module scheme" as inhttp://www.theochem.uwa.edu.au/fortran/recompile/ (my
makefiles are based on this perl script scheme). This is because the module
information file for module B may not change even though the module information
file for A (which it uses) changes, and then the perl script would think C does not
need recompiling even though it does because of the explicit dependence on module
A.
It is kind of a pain to have these long and repetitious depencies at times, but it
seems they are necessary. If one uses simpler schemes, such as dependencies based
on object files, then make will correctly infer the dependency from above and
recompile C even if A is not explicitly listed in its dependency list.
Thanks,
Aleksandar
--
__________________________________
Aleksandar Donev
Complex Materials Theory Group (http://cherrypit.princeton.edu/)
Princeton Materials Institute & Program in Applied and Computational Mathematics
@ Princeton University
Address:
419 Bowen Hall, 70 Prospect Avenue
Princeton University
Princeton, NJ 08540-5211
E-mail: [log in to unmask]
WWW: http://atom.princeton.edu/donev
Phone: (609) 258-2775
Fax: (609) 258-6878
__________________________________
|