How can I catch a command error and continue the compilation in a makefile?

Viewed 5821

For instance, an error L6220E would be generated during the compilation (since I am using the ARM compiler, this error flag means out of internal flash memory). What I want to do is to continue the compilation even though the error was generated. Is there any way I can catch the command error and run other commands? Like,

normal_target:
             gcc -o main main.c    (this will generate error)

ifeq($(error),L6220E):
             gcc -o ...

Is there any way to do so?

1 Answers
Related