I recently created the first public release of FDBuild, a tool that I have been using over the last years to build all the things I needed to easily switch between hacking on Mesa, Wayland, XServer, etc.
I believe it offers a very convenient workflow for that because you basically only need to remember a single command "fdbuild" and you are able to rebuild many projects or only a single one. You can get the tool easily with pip: https://pypi.org/project/fdbuild/ And you can read more about it in this blog post: https://subdiff.org/blog/2023/fdbuild-01-released