Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typescript/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Makefile目标太贪婪_Makefile_Target_Rule_Greedy - Fatal编程技术网

Makefile目标太贪婪

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中,偏离规则顺序并不重

我有两个目标共享一个共同的模式,即%是makefile的* 但不幸的是,这个模式太贪婪了,不允许我使用这些目标

事实上,我得到了这个错误:xxx是deps/%/可能值之一

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/