Added helpers to copy common modules between items.

Thanks to Andriy Fedorov for the original patch.
Fixed Makefile.dep for new files from last comit.