I am using Linux (Ubuntu 18.10), cmdstan 2.18.1, with the usual gcc and GNU make setup.
I am aware that one should use the provided makefile to compile programs as
cd cmdstan_location make /some_other_path/model
but I am wondering if I could call it in the directory of the model file somehow, as it would make my workflow more convenient.
So far I tried
make -C cmdstan_location -f cmdstan_location/makefile model
but got an error, eg
$ make -C ~/src/cmdstan-2.18.1/ -f ~/src/cmdstan-2.18.1/makefile model make: Entering directory '/home/tamas/src/cmdstan-2.18.1' make: *** No rule to make target 'model'. Stop. make: Leaving directory '/home/tamas/src/cmdstan-2.18.1'