如果我有以下bash命令:
for i in ./ x ; do ls $i ; done && echo OK@H_301_3@执行“ls ./”,然后执行“ls x”,失败(缺少x)并且不打印OK. @H_301_3@如果
for i in x ./ ; do ls $i ; done && echo OK@H_301_3@然后即使“ls x”失败,因为for循环中的最后一个语句成功,然后打印OK.在makefile中使用shell for循环时,这是一个问题:
x: for i in $(LIST) ; do \ cmd $$i ;\ done@H_301_3@如果cmd的任何单独执行失败,如何使make失败?