继续翻译
`.ONESHELL' If `.ONESHELL' is mentioned as a target, then when a target is built all lines of the recipe will be given to a single invocation of the shell rather than each line being invoked separately (*note Recipe Execution: Execution.). `.POSIX' If `.POSIX' is mentioned as a target, then the makefile will be parsed and run in POSIX-conforming mode. This does _not_ mean that only POSIX-conforming makefiles will be accepted: all advanced GNU `make' features are still available. Rather, this target causes `make' to behave as required by POSIX in those areas where `make''s default behavior differs. In particular, if this target is mentioned then recipes will be invoked as if the shell had been passed the `-e' flag: the first failing command in a recipe will cause the recipe to fail immediately. Any defined implicit rule suffix also counts as a special target if it appears as a target, and so does the concatenation of two suffixes, such as `.c.o'. These targets are suffix rules, an obsolete way of defining implicit rules (but a way still widely used). In principle, any target name could be special in this way if you break it in two and add both pieces to the suffix list. In practice, suffixes normally begin with `.', so these special target names also begin with `.'. *Note Old-Fashioned Suffix Rules: Suffix Rules.
这里要加一句:make 的 3.81 里面没有 ONESHELL 功能。
`.ONESHELL'
If `.ONESHELL' is mentioned as a target, then when a target is
built all lines of the recipe will be given to a single invocation
of the shell rather than each line being invoked separately (*note
Recipe Execution: Execution.).
如果 ONESHELL 被声明为一个目的,那么当一个目的需通过多行片段的执行的,各行会一起激活一个shell来运行,而不是各行各自激活一个shell。(*note Recipe Execution: Execution.)
.POSIX
如果 .POSIX 被作为目的声明,那么 makefile 将在 POSIX-conforming 模式下解析和运行。
这并不意味着 只有 POSIX-conforming 的makefile 才能够被接受:所有高级的GNU make 功能仍然有效。其实,这个目的会导致在 make 的行为和 POSIX 不同的部分,按照 POSIX 方式运行。
在特定场合,如果这个目的被声明,那么片段会被当作仿佛 -e 标志被传递一般: 第一个失败的命令会导致整个 片段立即失败。
任何定义的隐式规则后缀,如果以 目的的身份出现,也可以称为特殊目的。两个后缀的连接也是如此,例如 .c.o。这些目的是后缀规则,一种定义隐式规则的老式的方式。作为原则,如果你把它分解成两个并且追加它们到后缀列表,此种方式下目的名字可以是特殊的。
在实践中,后缀一般开始于 ., 因此这些特殊的目的名字也开始与.。*Note Old-Fashioned Suffix Rules: Suffix Rules。
后文待续
本文转自健哥的数据花园博客园博客,原文链接:http://www.cnblogs.com/gaojian/archive/2012/09/25/2701498.html,如需转载请自行联系原作者