How to create .pot file from source code

I just learned how to create a .pot from

Checkout WordPress development branch via SVN which has a script for creating .pot file.

cd /tmp
svn co wordpress-svn
php wordpress-svn/tools/i18n/makepot.php wp-plugin PATH_TO_PLUGIN PATH_TO_PLUGIN/language/PLUGIN_NAME.pot

makepot.php help

Usage: php makepot.php PROJECT DIRECTORY [OUTPUT]

Generate POT file from the files in DIRECTORY [OUTPUT]
Available projects: generic, wp-frontend, wp-admin, wp-network-admin, wp-tz, wp-plugin, wp-theme, glotpress, rosetta, wporg-bb-forums, wporg-themes, wporg-plugins, wporg-forums, wordcamporg

Converting gettext .po files to binary .mo files via command line

Updated a WP plugin and translation needed fixation. I edited the .po file, but no change was on the site. I needed to convert it to .mo file.
Thanks to Joss Crowcroft and his post I was able to convert.

$ msgfmt -cv -o wp-content/plugins/woocommerce/i18n/languages/ wp-content/plugins/woocommerce/i18n/languages/woocommerce-sk_SK.po
1939 translated messages, 2 untranslated messages.