I think the best way to provide such flexibility is to have a single configuration file that can consult available data (e.g., driver name used, host platform, target, etc…) and alter configuration accordingly (frequently via some form of conditional inclusion). Something like:
!if $driver_name ~ *clang
!include clang.cfg
!elif $driver_name ~ *clang-cl
!include clang-cl.cfg
!endif
!if exists($target.cfg)
!include $target.cfg
!endif
!if $host_platform ~ zos* and $target ~ zos*
-L'//SYS1.SCEELIB'
!endif
The benefits of such an approach are:
- Less guessing about which config file(s) are being consulted.
- Support for distribution specific conventions.
- Support for composition (e.g., dropping new .cfg files into the configuration directory.
- Support for future extensions.