gpt4 book ai didi

ant - 如果 makefile 失败则停止 ant 构建

转载 作者:行者123 更新时间:2023-12-03 01:31:02 26 4
gpt4 key购买 nike

我有一个执行 makefile 的 ant 构建文件

        <target name="jni">
<exec executable="make">
<arg line="-f jni/Makefile"/>
</exec>
</target>

但是,如果 make 失败,依赖于该规则的其他规则将执行

如果 jni 规则失败,如何停止 ant?

最佳答案

使用failonerror属性,默认为false:

<target name="jni">
<exec executable="make" failonerror="true">
<arg line="-f jni/Makefile"/>
</exec>
</target>

我一直想知道为什么默认情况下它不是真的...... See the docs.

关于ant - 如果 makefile 失败则停止 ant 构建,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13351992/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com