doc: extensions: domain: fix inventory on incremental builds
Generated objects.inv would not contain e.g. "zephyr:board" entry on
incremental builds, making it impossible to use Intersphinx on other
projects when rebuilding the Zephyr docset.
It can be verified by inspecting inventory like this:
```python
from sphinx.util.inventory import InventoryFile
InventoryFile.loads(open("objects.inv", "rb").read(), uri="")
inv.data.keys()
```
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
1 file changed