举例分析 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).因为不同的视频压缩 ...
随机推荐
- shell编写自动化安装dhcp服务
#!/bin/bash#Auth:Darius#自动化安装dhcp服务#"$1"为测试IP,用来查看IP段是否能通eno=`ifconfig|awk '{print $1}'|he ...
- jsonp(对,通俗易懂)
jsonp是啥玩意儿呢 ?你猜! 此感叹号意味着以下内容要说正事儿了!!!!! 由于浏览器为了安全限制(他要怎样他说了算,此处不扯远了):只能允许来自同服务器,同域名的同端口号下请求数据(同源),是的 ...
- BABOK概述
BABOK概述 BABOK(Business Analysis Body of Knowlodge: 业务[或商业]分析知识体系)是由位于加拿大的IIBA(International Institut ...
- PYTHON进阶(3)
学习内容: 1.Python模块redis 2.Python模块memcach 3.Python模块SQLAlchemy 一.Python模块redis redis介绍 二.Python模块memca ...
- PMP:6.项目进度管理
项目管理包括为项目管理项目按时完成所需的各个过程:
- linux配置gitlab步骤
1.安装git命令 yum install -y git 2.查看安装git的版本 git --version 3.创建用于保存项目的文件夹 mkdir 项目文件夹 4.切换目录到项目文件夹 cd 项 ...
- 疑难杂症:Java中Scanner连续获取int和String型发生错误.
使用Scanner类获取输入,连续获取int类型和String类型数据时候,发生错误. Scanner sc = new Scanner(System.in); System.out.println( ...
- TIME_WAIT状态过多的排查
一.概述 (一)现象 服务器有两个现象,第一是tcp连接数不多,不超过10个,但是time_wait状态的2000.第二个按照以往的性质,在很少用户访问的情况下,服务器的资源几乎没有使用,比如CPU, ...
- Codeforces Round #554 (Div. 2) 1152A - Neko Finds Grapes
学了这么久,来打一次CF看看自己学的怎么样吧 too young too simple 1152A - Neko Finds Grapes 题目链接:"https://codeforces. ...
- 暴走Python之运算符与条件语句
本文原创作者:LoneliNess,本文属i春秋原创奖励计划,未经许可禁止转载 本文来源:i春秋学院 i春秋(ichunqiu.com)网络安全平台能提供专业的网络安全技术.网络渗透技术.网络 ...