When I run below command on shell, it works properly. but if I write it in a Makefile and call it with “make” command it doesn’t work.
cp wpa_{cli,supplicant,passphrase,event} /usr/local/bin/
error after “make” command:
cp: cannot stat `wpa_{cli,supplicant,passphrase,event}’: No such file
or directory
What can i do to make it work with Makefile? I use Ubuntu 12.04. Same Makefile works on other linux distributions.
Make uses old-school Bourne shell (/bin/sh) by default which does not support brace expansion. Set the SHELL variable in your makefile to /bin/bash if it’s not already set.
Just add a line in the top of your makefile with:
(please confirm your bash path).