如何处理Makefile中失败的命令?

时间:2018-09-21 06:28:54

标签: if-statement makefile error-handling

如何处理失败的命令或在Makefile中输出错误的命令?

例如

lambda: 
    aws lambda create-function \
        --region $(AWS_REGION) \
        ...
    # the aws command above will output an error that function is already exist and stop the make process
    # need to put an if-statement when the error happens, then run this command to update the function.
    aws lambda update-function-code \
        --region $(AWS_REGION) \
        ...

非常感谢您

0 个答案:

没有答案