开发者

How does one catch and handle errors in Make?

开发者 https://www.devze.com 2023-02-04 23:44 出处:网络
I\'m using GNU Make 3.80. Within my Makefile_1, I am invo开发者_如何学Pythonking Makefile_2.In certain circumstances, Makefile_2 \"throws\" an error.

I'm using GNU Make 3.80.

Within my Makefile_1, I am invo开发者_如何学Pythonking Makefile_2. In certain circumstances, Makefile_2 "throws" an error.

Is there a way for me to "catch" and "handle" (within Makefile_1) the error that Makefile_2 might possibly throw?


You have all the shell power you need:

target1:
    ${MAKE} -f Makefile_2 target2; \
    case "$$?" in \
    ... \
    esac;
0

精彩评论

暂无评论...
验证码 换一张
取 消