举例分析 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).因为不同的视频压缩 ...
随机推荐
- Day12 (黑客成长日记) 函数
一.递归函数: 在函数内部,可以调用其他函数.如果一个函数在内部调用自身本身,这个函数就是递归函数. #计算阶乘: def fact(n): if n == 1: return 1 return n ...
- JAVA:简单添加菜单界面(swing)第二版
环境:jdk1.8 package com.le.tool; import java.awt.Color; import java.awt.Container; import java.awt.Flo ...
- mysql的ACID的理解
这是在网上copy下来的ACID的概念,可以直接跳过看后面: 1.原子性(Atomicity):事务开始后所有操作,要么全部做完,要么全部不做,不可能停滞在中间环节.事务执行过程中出错,会回滚到事务开 ...
- VMware安装xp虚拟机
VMware安装xp虚拟机 1.用到的软件: 2.安装VMware: 接受 选择自定义 要等上一小会. 输入密钥:百度一个就可以了. 安装成功: 禁用VMware网卡: 3.安装xp系统: 创建新的 ...
- Centos6.5---samba文件共享服务配置(一)
Linux---------samba文件共享服务配置(一) samba是一个实现不同操作系统之间文件共享和打印机共享的一种SMB协议的免费软件. https://www.cnblogs.com/zo ...
- ubuntu下file_get_contents返回空字符串
ubuntu下file_get_contents返回空字符串 | 浏览:302 | 更新:2014-03-30 10:11 本文起初面临的问题是PHP中SoapClient不好使,最后file_get ...
- [转]SDN与OpenFlow技术简介
http://blog.163.com/s_zhchluo/blog/static/15014708201411144727961/ 本文是2012年文章,对Openflow的发展.规范.应用和SDN ...
- Dubbo 源码分析 - 集群容错之 LoadBalance
1.简介 LoadBalance 中文意思为负载均衡,它的职责是将网络请求,或者其他形式的负载"均摊"到不同的机器上.避免集群中部分服务器压力过大,而另一些服务器比较空闲的情况.通 ...
- Python编程练习:编程实现恺撒密码
问题描述:凯撒密码是古罗马凯撒大帝用来对军事情报进行加解密的算法,它采用了替换方法对信息中的每一个英文字符循环替换为字母表序列中该字符后面的第三个字符,即,字母表的对应关系如下: 原文:A B C D ...
- 微服务中Feign快速搭建
在微服务架构搭建声明性REST客户端[feign].Feign是一个声明式的Web服务客户端.这使得Web服务客户端的写入更加方便 要使用Feign创建一个界面并对其进行注释.它具有可插入注释支持,包 ...