script for building bugle.
misc minor changes.