NAME

Mpp::Signature::c_compilation_md5 -- a signature class that ignores changes to whitespace and comments

DESCRIPTION

Unlike the usual signature class, this class computes an MD5 checksum of all source files, excluding whitespace and comments. Your source files may change, but if you use this signature class, makepp will be smart enough to realize that certain changes don't matter.

More specifically:

  • Comments are treated as if they were a single space.

  • Multiple spaces and tabs are collapsed to a single space (unless they are inside quoted strings).

  • Spaces and tabs before a newline are ignored.

  • Newlines affect the signature. This means that if you insert some lines in the file, even if they were only comments, recompilation will occur. Strictly speaking, recompilation is not necessary in this case, but makepp will recompile anyway to avoid messing up __LINE__ macros and line numbers in the debugger.

What this means is that you can freely add or change comments in your code, or reindent your code, and as long as you don't affect the line numbers, there will be no recompilation. Line number changes after the last token, e.g. comments with $Log at the end of file, will not cause a recompilation.