GNU Make 4 · Variables and functions
Run a command and capture its output
Store the output of a shell command in a variable.
VERSION := $(shell git describe --tags --always)
Official GNU Make 4 documentation
More variables and functions commands
- Define variables
- Automatic variables
- List files and change extensions
- Use conditionals
- Include another makefile
- Pass variables to commands
All variables and functions commands · GNU Make 4 cheatsheet