Allowing deps generation for multi-target.

Fix for #915.