Master file is located in two steps.
First, a list of possible master files is built. A simple name
matching is used to find the files. For a C++ header
Flymake searches for all
.cpp files in the directories whose relative paths are
stored in a customizable variable
usually contains something like
("." "./src"). No more than
flymake-master-file-count-limit entries is added to the master file
list. The list is then sorted to move files with names
Next, each master file in a list is checked to contain the appropriate
include directives. No more than
flymake-check-file-limit of each
file are parsed.
file.h, the include directives to look for are
#include "../file.h", etc. Each
include is checked against a list of include directories
(see Getting the include directories) to be sure it points to the
First matching master file found stops the search. The master file is then patched and saved to disk. In case no master file is found, syntax check is aborted, and corresponding status (!) is reported in the mode line.