Contents|Index|Previous|Next
Avoiding recompilation of some files

Sometimes you may have changed a source file but you do not want to recompile all the files that depend on it. For example, suppose you add a macro or a declaration to a header file that many other files depend on. Being conservative, make assumes that any change in the header file requires recompilation of all dependent files, but you know that they do not need to be recompiled and you would rather not waste the time waiting for them to compile.

If you anticipate the problem before changing the header file, you can use the ‘-t’ flag. This flag tells make not to run the commands in the rules, but rather to mark the target up to date by changing its last-modification date.

Use the following procedure.

Use the following procedure.


Top|Contents|Index|Previous|Next