当前位置:网站首页>makefile的foreach、filter、filter-out函数
makefile的foreach、filter、filter-out函数
2022-08-09 08:39:00 【浩澜大大】
- 1.$(foreach var,list,text) : 对list中的每一个变量var执行text语句。
例如:
A = a b c B = $(foreach f, $(A), $(f).o) all: @each B = $(B)
输出: B = a.o b.o c.o 这样就能遍历A集合
- 2.$(filter pattern...,text):在text中取出符合pattern格式的值
$(filter-out pattern...,text):在text中取出不符合pattern格式的值。
C = a b c d/ D = $(filter %/,$(C)) E = $(filter-out %/,$(C))
all:
@echo D = $(D)
@echo E = $(E)这里我们使用通配符%来匹配
输出: D = d/ E = a b c
边栏推荐
猜你喜欢
随机推荐
leetcode 36. 有效的数独(模拟题)
Notes on OpenHarmony Open Source Meeting (Nanjing Station)
RDMA
Go语言技巧之正确高效使用slice(听课笔记总结--简单易懂)
The working principle of switch
编程洗衣机:字符串输出后的乱码
eTS UI开发学习
100句话,是否会触动你?
The Servlet,
ctfshow-web入门 文件上传篇部分题解
[漏洞复现]CVE-2018-12613(远程文件包含)
Cookie and Session Details
Process synchronization and mutual exclusion problem
数制之间的转换
get一个小技巧,教你如何在typora写文章上传图片到博客上
scp upload file to remote server
QT program generates independent exe program (pit-avoiding version)
第五届蓝帽杯初赛 misc 赛后复现
nodeMCU(ESP8266)和RC522的接线图
I'm here to advertise








