GNU make manual 翻译( 一百七十五)
继续翻译
`.DEFAULT_GOAL' Sets the default goal to be used if no targets were specified onthe command line (*note Arguments to Specify the Goals: Goals.).The `.DEFAULT_GOAL' variable allows you to discover the currentdefault goal, restart the default goal selection algorithm byclearing its value, or to explicitly set the default goal. Thefollowing example illustrates these cases:# Query the default goal.ifeq ($(.DEFAULT_GOAL),)$(warning no default goal is set)endif.PHONY: foofoo: ; @echo $@$(warning default goal is $(.DEFAULT_GOAL))# Reset the default goal..DEFAULT_GOAL :=.PHONY: barbar: ; @echo $@$(warning default goal is $(.DEFAULT_GOAL))# Set our own..DEFAULT_GOAL := fooThis makefile prints:no default goal is setdefault goal is foodefault goal is barfooNote that assigning more than one target name to `.DEFAULT_GOAL' isillegal and will result in an error.
`.DEFAULT_GOAL'
设置如果在命令行中没有制定目的场合,缺省的终点(*note Arguments to Specify the Goals :Goals)。
.DEFAULT_GOAL 变量允许你发现当前的缺省的终点,通过清除它的值来重新设置缺省的终点。下面的例子给出了如何操作:
# Query the default goal.
ifeq ($(.DEFAULT_GOAL),)
$(warning no default goal is set)
endif
.PHONY: foo
foo: ; @echo $@
$(warning default goal is $(.DEFAULT_GOAL))
# Reset the default goal.
.DEFAULT_GOAL :=
.PHONY: bar
bar: ; @echo $@
$(warning default goal is $(.DEFAULT_GOAL))
# Set our own.
.DEFAULT_GOAL := foo
这个 makefile 输出:
no default goal is set
default goal is foo
default goal is bar
foo
请注意设置多余一个的目的名给`.DEFAULT_GOAL' 是无效的,会造成错误。
后文待续
本文转自健哥的数据花园博客园博客,原文链接:http://www.cnblogs.com/gaojian/archive/2012/10/05/2712160.html,如需转载请自行联系原作者
GNU make manual 翻译( 一百七十五)相关推荐
- GNU make manual 翻译( 一百二十四)
继续翻译 Note that such a prerequisite constitutes mentioning `main.o' in a makefile, so it can never be ...
- GNU make manual 翻译( 一百六十)
继续翻译 The only restriction on this sort of use of nested variable references is that they cannot spec ...
- GNU make manual 翻译( 一百六十四)
继续翻译 When you add to a variable's value with `+=', `make' acts essentially as if you had included th ...
- GNU make manual 翻译( 一百六十二)
继续翻译 6.5 Setting Variables =====================To set a variable from the makefile, write a line st ...
- GNU make manual 翻译( 一百八十二)
继续翻译 `ifdef VARIABLE-NAME' The `ifdef' form takes the _name_ of a variable as its argument, not a re ...
- GNU make manual 翻译( 一百五十五)
继续翻译 6.2 The Two Flavors of Variables ================================There are two ways that a vari ...
- GNU make manual 翻译( 一百五十四)
继续翻译 6.1 Basics of Variable References =================================To substitute a variable's v ...
- GNU make manual 翻译( 一百五十九)
继续翻译 A computed variable name need not consist entirely of a single variable reference. It can conta ...
- GNU make manual 翻译( 一百四十九)
继续翻译 5.7.4 The `--print-directory' Option ------------------------------------If you use several lev ...
最新文章
- Bash脚本: 根据关键字做替换
- ajax和map返回数据类型,ajax请求后台返回map类型并如何展示
- 关闭Struts2中s:property的HTML自动转码
- opencv镜像_DX200操作要领—PAM与镜像平移变换(三十八)
- APNIC执委赵巍:IPv4向IPv6过渡再无退路
- pomelo中的next
- mysql hive 内置函数_Hive 内置函数
- SpringBoot优点
- javascript基础学习一
- [development][profile][dpdk] KK程序性能调优
- C#LeetCode刷题之#48-旋转图像(Rotate Image)
- pass 软件_以信息化为支撑,合理用药为保障,我院 PASS合理用药系统正式上线!...
- 大数据之-Hadoop之HDFS_hadoop集群中的安全模式_操作案例---大数据之hadoop工作笔记0075
- python与人工智能的关系_广东江门的北大青鸟学校了解到人工智能与Python关系
- 拼题a答案c语言计算整数各位数字之和,这是小白刷的基础题,跪求大佬帮忙!!!题目:读入一个自然数n...
- rabbitmq 消息持久化
- Cannot use v-for on stateful component root element because it renders multiple elements.
- matlab 颜色代码 大全_空客 | 红、绿、蓝、白,各类颜色代码的含义
- 使用 Amazon Lake Formation 和 Amazon Glue 设计数据网格架构
- ESP32 ESP-IDF 获取GPS北斗模块的经纬度和日期时间