Optimize the make-package tool.
Merge pull request #582 from natural-law/master

Optimize the make-package tool.