Next: Starting the syntax check process, Previous: Getting the include directories, Up: Flymake Implementation

### 5.5 Locating the buildfile

Flymake can be configured to use different tools for performing syntax checks. For example, it can use direct compiler call to syntax check a perl script or a call to `make` for a more complicated case of a `C/C++` source. The general idea is that simple files, like perl scripts and html pages, can be checked by directly invoking a corresponding tool. Files that are usually more complex and generally used as part of larger projects, might require non-trivial options to be passed to the syntax check tool, like include directories for C++. The latter files are syntax checked using some build tool, like `make` or `Ant`.

All `make` configuration data is usually stored in a file called `Makefile`. To allow for future extensions, flymake uses a notion of buildfile to reference the 'project configuration' file.

Special function, `flymake-find-buildfile` is provided for locating buildfiles. Searching for a buildfile is done in a manner similar to that of searching for possible master files. A customizable variable `flymake-buildfile-dirs` holds a list of relative paths to the buildfile. They are checked sequentially until a buildfile is found. In case there's no build file, syntax check is aborted.

Buildfile values are also cached.