Replace engines/RECURSIVE_MAKE with generated rules

This change preserves the same behavior and output as before, except that it
replaces the RECURSIVE_MAKE mechanism with generated rules and prerequisites.
This doesn't eliminate the recursive make, but refactors it so that
eliminating it will be more straightforward when the time comes.