decent rebuild of build function to make it more effiecent and provide accurate ordering of sync tasks
Merge pull request #85 from NewSpring/feature-build-enhancement

close #52