to be open, I don't understand your point and need some advice.
What I would like to automate is one part, which always happens to me after we get a new version.
- structure of components is different to older versions.
Therefore we need to include some more headerfiles, libraries and binarys. And remove some others. All of these changes are done in espruino/make/familiy/esp32.make.
Usually I've to search a lot to figure out these changes.
My idea now is, to use all .mk files which are available after compiling components.
Please see attached file, which is a first step to replace a lot assignments to INCLUDE,LIBS and LDFLAGS
If my understanding of your tool is totally wrong, and you are already doing this, please help me out.