Skip to Content
C语言核心技术(原书第2版)
book

C语言核心技术(原书第2版)

by Peter Prinz, Tony Crawford
August 2017
Intermediate to advanced
798 pages
17h 44m
Chinese
China Machine Press
Content preview from C语言核心技术(原书第2版)
使用
make
构建
C
程序
|
717
使用
make
构建
C
程序
收到某种严重错误的信号),
make
会在退出前删除它正在构建的目标。然而,任何
目标只要被声明为
.PRECIOUS
的依赖条件,在这种情况下就不会被删除。
而且,当
make
通过结合隐式规则构建一个目标时,对于下一个目标,
make
通常会
删除这些通过隐式规则作为依赖条件所建立的中间文件。然而,如果这类文件作
为
.PRECIOUS
的前提(或者匹配作为
.PRECIOUS
依赖条件的模式),则不会被
make
删
除。
.SECONDARY
类似于
.INTERMEDIATE
,不同的地方在于,
make
不会自动删除作为
.SECONDARY
依赖
条件的文件。
也可以把
.SECONDARY
放在
makefile
中,不加任何依赖条件。在这种情况下,
make
会
把所有目标都视为
.SECONDARY
的依赖条件。
一些其他内置目标,功能与运行时的普通选项类似,只要出现在
makefile
中,就会影响
make
的整体行为。具体情况请参见
20.11
节。
20.8 宏
当讨论
make
中的宏时,应该注意它们和变量之间没有实质上的差别。尽管如此,
make
提
供了一个命令,允许定义既有换行符又有其他嵌套变量引用的变量。程序员常常使用这
种方式把多行命令序列封装在一个变量中,因此,称该方式为宏倒也相当恰当。(
GNU
make
手册中称呼它们为“
canned command sequences
”,即命令包。)
如果想定义一个包括多行的变量,必须使用
define
命令。它的语法是:
define
macro_name ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

算法精讲视频课程:24篇系列讲座

算法精讲视频课程:24篇系列讲座

罗伯特·塞奇威克, 凯文·韦恩(Kevin Wayne)

Publisher Resources

ISBN: 9787111562207