views:

281

answers:

3

So, I have a Makefile which runs different commands of how to build S/W. I execute make from within a MSYS / MinGW enviroment.

I found for example, the sleep <seconds> command, but this only delays the execution. How can I make it wait for a key being pressed, for example?

+3  A: 

You can use the read command. When you are done you press enter and your script/makefile continues. It's a builtin bash command, so it should work also on MinGW.

klez
It does. Thanks
cmdev
then accept please :-) (you get some rep too ;) )
klez
A: 

My proposition doesn't stop execution but halts and resume display on capable terminals:

Use ctrl-S for halting display, and ctrl-Q for resuming.

You don't need to modify your Makefile.

mouviciel
+1  A: 

Pipe the output of the build through more (or less)

e.g.

make <make command line> | more
Mark
this is the correct answer
Pavel Shved