当前位置:网站首页>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
边栏推荐
猜你喜欢
黑马2022最新redis课程笔记知识点(面试用)
scp upload file to remote server
XCTF College War "Epidemic" Network Security Sharing Competition Misc wp
Static routing principle and configuration
BUUCTF MISC Writing Notes (1)
Dark Horse 2022 latest redis course notes and knowledge points (for interview)
【MySQL】mysql:解决[Err] 1093 - You can‘t specify target table ‘表名‘ for update in FROM clause问题
requests爬取百度翻译
账号和权限管理
Some of the topics in VNCTF2021 are reproduced
随机推荐
OpenHarmony开源见面会(南京站)相关笔记
Euclid and the game
系统安全及应用
Introduction to Network Layer Protocols
sizeof 结构体问题
XCTF高校战“疫”网络安全分享赛Misc wp
ctf misc picture questions knowledge points
Use of prepareStatement
欧几里和游戏
【CNN】白话迁移学习中域适应
Routing configuration forwarding and experiment
Different styles of Flask-restful
File Handling (IO)
QT程序生成独立exe程序(避坑版)
交换机的工作原理
The Servlet,
Matlab, and nonlinear equations solving linear equations
Account and Permission Management
[V&N2020 Open] Memory Forensics
204. 数素数