我的问题涉及GNU的制作.
如果你有一系列命令可用作多个目标的配方,那么canned recipe就派上用场了.我可能看起来像这样:
- define run-foo
- # Here comes a
- # sequence of commands that are
- # executed line by line
- endef
现在您可以像这样使用罐装配方:
- file1: input1:
- $(run-foo)
- $(pattern) : sub/% : %.inp
- $(run-foo)
等等.我想知道是否可以定义带参数的罐装食谱(或类似的东西),以便我可以像这样执行它们:
- file2: input2
- $(run-foo) specific-parameter2 "additional"
- file3: input3
- $(run-foo) another-parameter3 "text"
这可能吗?任何提示欢迎:)