First of all, there is absolutely no reason to build Godot yourself. Simply pick a build from our spine-godot documentation:
https://esotericsoftware.com/spine-godot
Secondly, there's no "official" way to do Godot engine modules. We need to keep it outside the Godot source tree so we can actually have it snuggly sitting in our spine-runtimes repository, without having to pull in all of Godot as well.
This is a common thing for 3rd party modules, and I posit that it's the only sane way to do it. There's a reason the Godot build system has the custom_modules
flag which allows you to pull in directories outside the Godot source tree.
We've written extensive documentation on how to compile Godot with the spine-godot runtime yourself, if you absolutely need to do that (you don't, download it from our site):
https://esotericsoftware.com/spine-godot#Compiling-the-Godot-editor-and-export-templates-from-source
If you still want to compile things yourself, you will also have to compile export templates for the platforms you support. That's a major pain, as you need to setup build infra for those platforms. E.g. you can not cross-compile for macOS and iOS from Windows or Linux. We've thus also provided a GitHub workflow, which lets you build everything on GitHub, using their build runners for all operating systems. This is also documented in the documentation.