TS-1929: fix sphinx documentation build

The sphinx documentation was using GNU make extensions for recursive
variable expansion. Recent versions of automake were detecting that
as an error. We can work around it by doing the expansion in the
shell.