refactoring build files

http://stackoverflow.com/a/24103453/605582
Merge pull request #3008 from xuwei-k/meta-buildinfo

refactoring build files