I want the :make command to execute normally if there is a Makefile present. Otherwise I want it to execute a custom script, say, called compile. If neither file is present, I’d like it to fail gracefully (ideally not leave the editing screen).
I’m aware of this thread, which presents a bash expression I was able to adapt to suit my needs. EXCEPT I sometimes need to run a shell other than bash. Is there a shell-independent way to do this?
makeprgcan be set to the name of any executable. Make a shell script that runsmakeif there is a Makefile, otherwise runcompile, or else return.