Makefile目标太贪婪
我有两个目标共享一个共同的模式,即%是makefile的* 但不幸的是,这个模式太贪婪了,不允许我使用这些目标 事实上,我得到了这个错误:xxx是deps/%/可能值之一Makefile目标太贪婪,makefile,target,rule,greedy,Makefile,Target,Rule,Greedy,我有两个目标共享一个共同的模式,即%是makefile的* 但不幸的是,这个模式太贪婪了,不允许我使用这些目标 事实上,我得到了这个错误:xxx是deps/%/可能值之一 deps/%/: git clone something into deps/$*/ deps/%/ebin/: deps/%/ compile things and put them into newly-created deps/$*/ebin/ 在Makefile中,偏离规则顺序并不重
deps/%/:
git clone something into deps/$*/
deps/%/ebin/: deps/%/
compile things and put them into newly-created deps/$*/ebin/
在Makefile中,偏离规则顺序并不重要,所以我想知道您是否知道解决这个问题的方法。我已经运行了几次文档,没有发现任何关于贪婪、指定顺序或丑陋的黑客行为的信息
这里的问题是一样的:
warning: overriding recipe for target `xxx'
warning: ignoring old recipe for target `xxx'
规则顺序在makefile中并不重要。另外,您使用的make版本是什么?@EtanReisner GNU make 3.81在OSX上。
deps: ‹depends on deps/*/ebin/ wildcarded› | deps/
deps/:
mkdir deps/