makefile dependencies (again)
well, no one answered my question sufficiently enough on the C++ board to quench my thirst for knowledge, so I thought I'd ask it here (hope you dont mind)...
if main.cc includes input.h in its dependency list, and input.h includes io.h in its dependency list, should main.cc also include io.h in its dependency list (assuming io.h is just some random header file, not the io.h included with the compiler). Note that main.cc contains no references to anything defined in io.h, just input.h.
If so, then why. It seems to me that since main.cc doesn't contain any references to anything defined/declared in io.h, then it shouldn't include io.h in its dependency list.
[main.o] --> [input.o] --> [io.o]
the only time that main.c should be recompiled is if the "interface" of the functions and classes change in input.o (ie. input.h changes). But since main.o references nothing in io.h/io.o, there is no need for main.o to be recompiled if the io.h changes
If I'm wrong about this, i would like to know why.