CML2 already has most of this. It is a mini-language written in Python so that you can create rules for your configuration. Based on your selection of symbols, the configuration rules decide on the visibility and/or value of other symbols. All symbols are gathered in hierarchical menus which are then displayed in the graphical GUI.
We accompany this with python scripts to generate header files, but also extract information from the symbols to drive the build.
CML2 is unfortunately unmaintained and has some limitations.
One other alternative is the linux kernel configuration system, but I don't want to use that as it is based on older scripting methods.
Out of these two I haven't seen anything else to this extent, which is why would like to know how people configure their software for building.