There is an insane amount of indirection...
make sagemath_doc_html
-> sage-spkg -i sagemath_doc_html
-> build/pkgs/sagemath_doc_html/spkg-install
-> make -C src/doc doc-html
-> meson compile -C build/sage-distro doc-html
-> python src/build-docs.py ...
And the (duct tape & spit) dependency tracking across the levels is
failing. I have been dealing with this problem in
https://github.com/sagemath/sage/pull/41610
where I am trying to skip to the last step (just build the F'ing
docs). But even that will not be a perfect solution, because the
documentation depends on the docbuilder, and the docbuilder is part of
the sagelib that you are trying to build documentation for. So even
just the last step must (to avoid problems) depend on all of sage.
I recall Tobias was working on a better solution in
https://github.com/sagemath/sage/pull/41156
but I don't know its current status.