sorry to not be clear - see this how it works in makefile. It is part of the target -
bash-4.1$ cat Makefile a1: trap 'USER_INT=1; /bin/echo "terminating, please wait...."' INT; \ sleep 100 bash-4.1$ make trap 'USER_INT=1; /bin/echo "terminating, please wait...."' INT; \ sleep 100 ^Cterminating, please wait.... make: *** [a1] Error 130 see this ? When make was executing sleep 100 , I gave ctrl+c and got my message " terminating, please wait". It did not go to fatal_error_signal at all. Please check.. thanks Nikhil On Mon, Oct 21, 2019 at 9:32 PM Paul Smith <psm...@gnu.org> wrote: > On Mon, 2019-10-21 at 21:26 +0530, nikhil jain wrote: > > I handle SIGINT (ctrl+c) like this in the makefile - > > > > trap 'USER_INT=1; /bin/echo "terminating, please wait...."' INT; > > That is not valid makefile syntax. If you put that directly into a > makefile, by itself, you'll get a syntax error: > > $ cat Makefile > trap 'USER_INT=1; /bin/echo "terminating, please wait...."' INT; > > $ make > Makefile:1: *** missing separator. Stop. > > Please provide the full context of what you're doing otherwise we can't > help. > > _______________________________________________ Help-make mailing list Help-make@gnu.org https://lists.gnu.org/mailman/listinfo/help-make