To get additional information from the Wayland compositor we need to use a protocol from the wayland-protocols collection, so we introduce support in the build system for protocol .xml files, and also makedep changes to gracefully handle the case these external sources are missing when the driver is disabled. These changes are introduced on their own in the first commit in the series, but we can squash it with the next commit, where the functionality is first used, if preferred.
I don't think that that sort of thing belongs in makedep, we should never have dependencies to files outside of the source tree. Ideally we'd simply ship the generated files like we do for OpenGL, Vulkan, etc.