I'm looking for a mode or hook that automatically opens a generated in read-only and auto-revert-mode mode alongside an associated with a source file. For instance when calling dmd -vgc-ast on a .d-file or calling the C preprocessor (cpp) on a .c file.
The mode should be configured via a set of mappings between source file name regexps and generated file regexps.
dmdandcpp?M-x compile? Something different? Please add details.