• GNU make manual 翻译(六十五)


    继续翻译

    
       This is marginally more exciting, but the true power of this feature only becomes apparent when you discover that secondary expansions  always take place within the scope of the automatic variables for that  target.  This means that you can use variables such as `$@', `$*', etc.  during the second expansion and they will have their expected values,  just as in the recipe.  All you have to do is defer the expansion by  escaping the `$'.  Also, secondary expansion occurs for both explicit  and implicit (pattern) rules.  Knowing this, the possible uses for this feature increase dramatically.  For example:    

    这是更加边缘化更加令人兴奋的,但是这个功能的真正威力只是在于 二次扩展发生在此目的的自动变量的范畴的时候。

    这意味着,你可以使用 诸如 $@, $* 等变量。在二次扩展期间,它们将获得自己在片段中的扩展值。

    所有你需要做的就是用 $来推迟其扩展。

    并且,二次扩展既可对显式也可对隐式规则起作用。

    了解了这一点,对此功能可行的利用大规模扩大了。例如:

    后文待续

  • 相关阅读:
    java 深入技术三(List)
    java 深入技术二(Collection)
    java开发JDBC连接数据库详解
    数据库基础和JDBC
    java 深入技术一
    java入门 第三季4
    java入门 第三季3
    04-1. 水仙花数(20)
    04-0. 求符合给定条件的整数集(15)
    03-4. 成绩转换(15)
  • 原文地址:https://www.cnblogs.com/gaojian/p/2688543.html
Copyright © 2020-2023  润新知