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:    

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

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

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

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

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

    后文待续

  • 相关阅读:
    noip2017逛公园
    [noip模拟赛]小U的女装
    AT2364 Colorful Balls
    关于bitset
    [ZJOI2010]排列计数
    [noip模拟赛]午餐
    [noip2017]列队
    [学习笔记]dsu on a tree(如何远离线段树合并)
    luogu4917天守阁的地板
    线性求素数+莫比乌斯函数+欧拉函数模板
  • 原文地址:https://www.cnblogs.com/gaojian/p/2688543.html
Copyright © 2011-2022 走看看