Skip to content
Novus Examples
mk491 B

Makefile with Space Indentation, Intentionally Invalid

An intentionally invalid Makefile whose recipe lines are indented with four spaces instead of the required TAB. This is the most common Makefile defect there is, and it is invisible in most editors — which is exactly why it belongs in a fixture set.

Preview — first 15 linesmk
# INTENTIONALLY INVALID Makefile. The recipe lines below are indented with SPACES, not the TAB
# character make requires, so make reports "missing separator". This is the single most common
# Makefile defect and the reason .mk fixtures have to control whitespace byte for byte.
BUILD_DIR := build

.PHONY: all
all: build

build:
    @echo "this line starts with four spaces, not a tab"
    @echo "make will stop here with: *** missing separator.  Stop."

clean:
    @echo "same fault again"

Specifications

Variant
intentionally invalid
Recipe Indent
4 spaces (should be TAB)
Expected Error
missing separator
Affected Lines
4

Testing contract

Expected to fail
Scenario
Detect a Makefile recipe indented with spaces where a TAB is required
Expected result
make reports "*** missing separator. Stop." on the first space-indented recipe line rather than executing it

What is a .mk file?

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 this 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.

How to use this file for testing

“Makefile with Space Indentation, Intentionally Invalid” is a deterministic Novus Examples fixture for Error handling, Config parsing, Schema validation. Deliberately corrupt and invalid files, clearly labelled, for testing how your tool fails.

Documented properties for this file: MK · 491 bytes. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.

Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.

Pipeline and infrastructure fixtures are inert configuration: steps reference fictional images and scripts, and nothing here executes. Run your linter, schema validator, migrator, or policy engine against them, and expect the deprecated-syntax and intentionally invalid variants to be rejected.

Generated by generation/pipelines.py. Free for any use, no attribution required — license.