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.
2.
Make the changes in the
header files.
3.
Use the command, ‘make
-t’, to mark all
the object files as up to date. The next time you run make,
the changes in the header files will not cause any recompilation.
If you have already changed the header file at a time when some files do need recompilation, it is too late to do this. Instead, you can use the ‘-o file’ flag which marks a specified file as “old” (Summary of options), meaning that the file itself will not be remade, and nothing else will be remade on its account.
Use the following procedure.
2.
Touch all the object files
with ‘make -t’.