GNU Make with patsubst:需要两次替换 [英] GNU Make with patsubst: need two substitutions

查看:66
本文介绍了GNU Make with patsubst:需要两次替换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在替换变量时,我需要两次引用词干:

I need to reference the stem twice in the replacement for a variable substitution:

O23=$(OROOTS:%=$(ODIR)/overx-%2wk-%3wk.mlb)

我需要使用相同的词干执行两次替换,但是替换使用的是patsubst,它只执行第一个.我们怎样才能做到?

I need to perform two replacements with the same stem, but the substitution uses patsubst which only does the first. How can we accomplish both?

推荐答案

通过kludgery:

By kludgery:

O23=$(join $(OROOTS:%=$(ODIR)/overx-%2wk), $(OROOTS:%=-%3wk.mlb))

这篇关于GNU Make with patsubst:需要两次替换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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