# closest approximation is to replace all single quotes in the data with the four characters '\''
# and then enclose the data in single quotes. example:

# POSIX
first=1
for arg in "$@"; do
  test "${first}" = 1 && set --
  first=0
  # shellcheck disable=SC2312
  set -- "$@" "'$(printf %s "${arg}" | sed "s/'/'\\\\''/g")'"
done
exec ssh remotehost make "$@"
