For current source file with the following name pattern:
xxx_test.cpp how do you execute make file with the following patter
xxx.makefile. I tried using
set makeprg=make\ -f\ fnameescape(substitute(expand("%"),"_test.cpp$",".makefile","")))
but it gives me the following output:
/bin/bash: -c: line 0: syntax error near unexpected token `(' /bin/bash: -c: line 0: `make -f fnameescape(substitute(expand( 2>&1| tee /tmp/user/1000/v98gzpR/261'
I am new to VIM, I tried to parse the vim help files, but cannot find an answer on how to have VIM execute the substitution.
EDIT: The right answer is presented by Sato Katsura here: Why is make running against a wrong file?