如何在仅订购先决条件内调用函数? [英] How to call functions within order-only prerequisites?

查看:74
本文介绍了如何在仅订购先决条件内调用函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

给出Makefile的这一点:

Given this bit of Makefile:

# for pattern matching
$(OBJDIR) := build

# just to see if a level of indirection will work
my_dir = $(dir $(1))

$(OBJECTS) : $(OBJDIR)/% : $(HEADERS) $(SRCDIR)/% | % $(dir %) $(call my_dir,%)
  @echo output-only = $|

这是静态模式规则,其中仅订购的先决条件.

考虑目标"build/utility/debug.js".上面规则的输出将是这样:

Consider the target "build/utility/debug.js". The output of the above rule will be this:

output-only = utility/debug.js ./

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆