zoukankan      html  css  js  c++  java
  • 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:    

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

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

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

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

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

    后文待续

  • 相关阅读:
    Confd+Consul 动态生成配置文件
    Flask实例化的参数 及 对app的配置
    Flask 中的路由系统
    Flask 中内置的 Session
    Flask中的模板语言jinja2
    docker
    windows上使用git
    redis的源码编译安装+发布订阅+RDB持久化
    mariadb安装和mysql主从同步
    nginx负载均衡
  • 原文地址:https://www.cnblogs.com/gaojian/p/2688543.html
Copyright © 2011-2022 走看看