Reputation: 85
Inside Makefile:
generate:
touch file{1..10}
run it with make
and I get a single file name file{1..10} and not 10 different files.
The touch
commands works properly on the shell.
Why?
Upvotes: 1
Views: 954
Reputation: 15186
Make invokes shell as specified in the variable called SHELL
. The default value for *nix systems is SHELL=/bin/sh
.
Set SHELL=/bin/bash
(or whatever) to make it working.
Note: unlike other make's variables, SHELL
's value is never imported from an environment (if running under POSIX OS; this is not true for native Windows builds).
Upvotes: 2