This issue has been fixed with the release of Xcode 5.1.1. the release notes contained 2 obscure references to 2 bug fixes in the 'Build System', which I suppose fixes the problem.
Updates should occur automatically. If you donβt go to the application store and install the command line tools update and the latest Xcode.

source share