Capture shell command output at parse time.
Section: Shell, call, eval, and generated rules
shell function
makefile
makefile
GIT_SHA := $(shell git rev-parse --short HEAD)Explanation
Use sparingly; every call runs during parsing.
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 Shell, call, eval, and generated rules