awk in Makefile
If you want to kill a process:
code:Makefile
task:
@ps -ef | grep "java -jar hogehoge.jar" | grep -v grep |awk '{print $$2}' |xargs kill
Use awk '{print $$2}' instead of awk '{print $2}'.
$ is the macro references in Makefile, so you shoud escape $ using $.
As a result, $$2 is the same as $2 in shell script.