【发布时间】:2021-01-13 23:15:59
【问题描述】:
我有一个有点像这样的makefile。 我需要生成一个文件并将其作为 abc.cpp 移动(基本上去掉下划线后的任何内容,包括下划线
xyz:= abc_def
$(xyz):
(some commands here which generates a file)
mv file /tmp/$(patsubst _%,"",$@)
However this does not work. In fact it doesn't ever match the underscore "_" in $@
mv file /tmp/abc.cpp is what i want
“%”通配符在 patsusbst 中如何工作?
【问题讨论】:
标签: makefile wildcard gnu-make gnu