Use build_helper to perform the same action.
Make compilation set proper exit code on failures.
Add configure flag to enable debug build.
Add debug parameter to build_helper script.
Propagate debug settings from configure.