I afraid '%p' can't take care about your share mappings and refers to the local project anyway.
I'd propose the following to solve it:
Use a 'Open Project' macro (see Proj. Props->Open-Tab / attachment) to setup the plink (remote) project dir as an env.var, which can be used instead '%p'.
_command void set_plinkdir ()
{
_str pd=_ProjectGet_WorkingDir (_ProjectHandle (_project_name));
if ( pd != '' )
{
pd=absolute (pd,strip_filename (_project_name,'N'));
pd=strip_filename (pd,'D');
// bslash -> slash
pd = stranslate ( pd, "/", "\\", "" );
// message ( "pd = " pd );
set_env( "plinkdir", pd );
}
}
Your Build command can look like this: plink ... make .. %(plinkdir) ..
Hope it works for you,
HS2