有没有办法在不创建不需要的空文件 helpA、helpB、helpC 然后删除它们的情况下完成以下 helpAll 规则?
rule helpA:
output: touch("helpA")
shell: "echo 'help on subject <A>'"
rule helpB:
output: touch("helpB")
shell: "echo 'help on subject <B>'"
rule helpC:
output: touch("helpC")
shell: "echo 'help on subject <C>'"
rule helpAll:
input: "helpA","helpB","helpC"
shell: "rm {input}
一个不错的解决方案是以下类型的规则依赖,但这不是有效的蛇码:
rule helpAll:
input: rules.helpA,rules.helpB,rules.helpC
或者:
rule helpAll:
depends_on_rule: helpA,helpB,helpC