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.
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.
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.
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.
I can’t work out how to do this in a GNU Makefile or from a batch file that could run the Make.
this should do the trick:
type
help ifin DOS for more info on errorlevel usage.