Makefiles -- .c and .h

Guy Harris guy at auspex.auspex.com
Tue Nov 20 06:57:57 AEST 1990


>  How does the SunOs make figure out which files were included by each source
>file?  Does it do a "cc -E" on the source file, or something similar?

"Something similar".  Basically, it provokes the compiler into producing
a dependency list as it compiles.

>If so, isn't that (a) slow since it has to do it again each time the .c
>file changes,

Well, if the ".c" file changes, it has to compile it in any case.  There
is some extra overhead in getting the compiler (in particular, the "C
preprocessor" phase of the compiler) to produce the dependency list as
it compiles.



More information about the Comp.unix.programmer mailing list