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;
精彩评论