举例分析 Makefile 中的 filter 与 filter-out 函数
$(filter pattern…,text)
Returns all whitespace-separated words in text that do match any of the pattern words, removing any words that do not match. The patterns are written using ‘%’, just like the patterns used in the patsubst function above.
The filter function can be used to separate out different types of strings (such as file names) in a variable. For example:
sources := foo.c bar.c baz.s ugh.h
foo: $(sources)
cc $(filter %.c %.s,$(sources)) -o foo
says that foo depends of foo.c、bar.c、baz.s and ugh.h but only foo.c、bar.c and baz.s should be specified in the command to the compiler.
$(filter-out pattern…,text)
Returns all whitespace-separated words in text that do not match any of the pattern words, removing the words that do match one or more. This is the exact opposite of the filter function.
For example, given:
objects := main1.o foo.o main2.o bar.o
mains := main1.o main2.o
the following generates a list which contains all the object files not in ‘mains’:
$(filter-out $(mains),$(objects))
举例分析 Makefile 中的 filter 与 filter-out 函数的更多相关文章
- 举例分析 Makefile 中的 patsubst、wildcard、notdir 函数
函数简介: 1.wildcard : 扩展通配符 2.notdir :去除路径 3.patsubst :替换通配符 实例: 建立一个 test 目录,在测试目录下建立一个名为 sub 的子目录 $ m ...
- FFmpeg的HEVC解码器源代码简单分析:环路滤波(Loop Filter)
===================================================== HEVC源代码分析文章列表: [解码 -libavcodec HEVC 解码器] FFmpe ...
- FFmpeg的H.264解码器源代码简单分析:环路滤波(Loop Filter)部分
===================================================== H.264源代码分析文章列表: [编码 - x264] x264源代码简单分析:概述 x26 ...
- Web.xml中设置Servlet和Filter时的url-pattern匹配规则
一.servlet容器对url的匹配过程: 当一个请求发送到servlet容器的时候,容器先会将请求的url减去当前应用上下文的路径作为servlet的映射url,比如我访问的是http://loca ...
- JSP中的Servlet及Filter
asp.net中,如果开发人员想自己处理http请求响应,可以利用HttpHandler来满足这一要求:类似的,如果要拦截所有http请求,可以使用HttpMoudle.java的web开发中,也有类 ...
- Asp.net MVC3 中,动态添加filter
Asp.net MVC3 中,动态添加filter filter是attribute,不支持泛型,传入的参数必须是固定的值.总之很受attribute本身的限制. 发现一篇老外的文章,动态设置filt ...
- python中的map、filter、reduce函数
三个函数比较类似,都是应用于序列的内置函数.常见的序列包括list.tuple.str. 1.map函数 map函数会根据提供的函数对指定序列做映射. map函数的定义: map(function ...
- Makefile中export分析
在分析内核启动过程的./arch/arm/Makefile文件里碰到了这样字段 162 export TEXT_OFFSET GZFLAGS MMUEXT 然后在子目录arch/arm/kernel/ ...
- DirectX:在graph自己主动连线中增加自己定义filter(graph中遍历filter)
为客户提供的视频播放的filter的測试程序中,採用正向手动连接的方式(http://blog.csdn.net/mao0514/article/details/40535791).因为不同的视频压缩 ...
随机推荐
- Matlib
>>> name1=input('请输入第一个名字;') 请输入第一个名字;陈汉彬 >>> name2=input('请输入第二个名字;') 请输入第二个名字;钟宇 ...
- ubuntu16 gitlab的简单安装
1.安装好ubuntu的ssh服务,使用xshell登录虚拟机 2.下载安装包: wget -c https://downloads-packages.s3.amazonaws.com/ubuntu ...
- 1.Spring AOP应用
首先咱们来了解一下具体的业务场景(这是个真实的项目的业务场景):具体的业务是这样的,现在系统中有六十多个主档(功能模块),每个主档都有新增.修改.删除功能,当我们在对每个主档做这些操作时需要对其记录日 ...
- Python 字符串十六进制流
字符串转十六进制绕过特征检测SQL注入 Python中内置库与出色第三方库的学习 # 字符串转十六进制 mystr = "hello world" print(":&qu ...
- python+unittest 控制用例的执行顺序
unittest的main()方法执行用例的顺序是按照测试类.测试方法的名字的ASCII顺序来执行测试方法.所以可能执行的顺序和你想要的顺序不一样,可能通过下面两种方法修改执行顺序 1. 通过Test ...
- UltraISO制作CentOS 7.6 U盘引导安装盘
一.制作准备: 1.UltraISO下载安装 2.CentOS镜像文件下载(阿里镜像下载) 二.制作引导盘: 1.电脑插入U盘 2.UltraISO加载镜像文件: 文件->打开->选择对应 ...
- windows10的环境变量path如何列表显示
如果你的变量值以%开头,打开编辑的时候就会显示一串的变量值,不方便查找编辑 所以将变量值更改为以盘符开始,就可以解决这个问题,比如:D:\WorkSoft\app\product\11.2.0\dbh ...
- [转]linux VLAN配置(vconfig)
1.安装vlan(vconfig)和加载8021q模块 #aptitude install vlan #modprobe 8021q 2.使用linux vconfig命令配置vlan #vconfi ...
- 应用篇 = Docker下的Redis
一.工具介绍 1.1 什么是Docker? Docker 最初是 dotCloud 公司创始人 Solomon Hykes 在法国期间发起的一个公司内部项目.使用 Google 公司推出的 Go 语言 ...
- Django项目配置日志
LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'verbose': { 'format': ...