<p>Part of the install for an app I am responsible for, compiles some C code libraries. This is done in a console using GNU Make.</p>

<p>So, as part of the install, a console window pops open, you see the make file output wiz by as it compiles and links, when finished the console window closes and the installer continues.</p>

<p>All good, unless there is a compilation error. Then the make file bugs out and the console window closes before you have a chance to figure out what is happening.</p>

<p>So, what I'd like to happen is have the console window pause with a 'press a key to continue' type functionality, if there is an error from the makefile so that the console stays open. Otherwise, just exit as normal and close the console.</p>

<p>I can't work out how to do this in a GNU Makefile or from a batch file that could run the Make. </p>

this should do the trick:
```
```
if not ERRORLEVEL 0 pause
```
```
type
```
help if
```
in DOS for more info on errorlevel usage.