makelinks: bail on error

Change-Id: Ie972c6345e1f842072338ca597b098a83c22243f