*Tags*:
FOUND_FILES= `find ${THE_PATH}` test: echo ${FOUND_FILES}
will yield:
echo `find /home/tong/.../path`
|
Use the `shell' Function
Functions -> Shell Function
The `shell' function is unlike any other function except the `wildcard' function (*note The Function `wildcard': Wildcard Function.) in that it communicates with the world outside of `make'.
The `shell' function performs the same function that backquotes
(`
`') perform in most shells: it does "command expansion". This means
that it takes an argument that is a shell command and returns the
output of the command. The only processing `make' does on the result,
before substituting it into the surrounding text, is to convert each
newline or carriage-return / newline pair to a single space. It also
removes the trailing (carriage-return and) newline, if it's the last
thing in the result.
Here are some examples of the use of the `shell' function:
contents := $(shell cat foo) files := $(shell echo *.c)