Variable: compilation-finish-function

Function to call when a compilation process finishes.
It is called with two arguments: the compilation buffer, and a string
describing how the process finished.