enums: don't write generated enum files to src-dir if unchanged
When regenerating an enum file, don't copy it back to the source directory if it hasn't actually changed. This allows using a read- only source directory where the enum header is newer than the generated file, as long as they're not really out of sync. OTOH, *do* touch the generated source-dir file even when unchanged, in order to avoid re-running its recipe on the next build, however, allow this to silently fail (which is harmless).
Showing with 189 additions and 65 deletions