Makefile Functions & Text Processing/Define whitespace helpers

Create reusable space or comma variables.

Section: Useful function recipes

Define whitespace helpers

makefile
makefile
empty :=
space := $(empty) $(empty)
comma := ,
Explanation

Useful in advanced text generation scenarios.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Useful function recipes
Self-documenting help target
Extract target comments from the current makefile.
OpenIn sheetmakefilesame section
Use MAKECMDGOALS
Inspect requested goals.
OpenIn sheetmakefilesame section
Current makefile name
Get the most recently parsed makefile path.
OpenIn sheetmakefilesame section
subst replace text
Replace every occurrence of one string with another.
OpenIn sheetmakefile
if function
Select one of two expansions based on non-empty condition text.
OpenIn sheetmakefile
shell function
Capture shell command output at parse time.
OpenIn sheetmakefile