How to interrupt a process in make without interrupting the process
I have this bit from the makefile where I start with the QEMU "debug" rule, but where I need to interrupt QEMU with kill -9, make kill too:
debug: ${BINDIR}/main
${QEMU} -M versatilepb -m 128M -nographic -kernel $^ -s -S
$(MAKE) sane
gdb: ${BINDIR}/main
${GDB} ${BINDIR}/main
sane:
stty sane
how to interrupt process in make without interrupt creation process?
+3
source to share
1 answer
how to interrupt process in make without interrupt creation process?
GNU Make reacts to the exit status of a command. To force Make to ignore the exit status of a command and proceed further, simply prepend a character -
before the command:
debug: ${BINDIR}/main
-${QEMU} -M versatilepb -m 128M -nographic -kernel $^ -s -S
$(MAKE) sane
Now, if you kill QEMU, make
it will still report that the process terminated abnormally, but will continue executing the rest, in this case $(MAKE) sane
.
+1
source to share