Skip to content
Novus Examples
mk

What is a .mk file?

text/x-makefile

A .mk file is a makefile fragment — the same syntax as a Makefile, meant to be pulled in with `include`. Rules pair a target with its prerequisites and a recipe whose lines must be indented with a literal tab, not spaces; variables are assigned with `=` (recursive), `:=` (immediate), or `?=` (conditional) and expanded with `$(...)`; and pattern rules, automatic variables such as `$@` and `$<`, and phony targets round out the language.

How to use a .mk file

Use an example .mk file to test makefile parsers, build-graph extractors, and editor tooling, checking tab-versus-space recipe detection, variable expansion order, pattern-rule matching, and line continuations inside recipes.

Convert a .mk file to another format

← All file formats