$(shell)
$(shell) is a special function in gmake that runs an external command and captures the output for use in the makefile.
For example, you could get the current working directory like this:
CWD=$(shell pwd)
all:
@echo This makefile lives in $(CWD).
轉載自https://www.electric-cloud.com/blog/2009/03/23/makefile-performance-shell/