zoukankan      html  css  js  c++  java
  • GNU make manual 翻译( 一百一十七)

    继续翻译

       The TARGET-PATTERN and PREREQ-PATTERNS say how to compute the
    prerequisites of each target.  Each target is matched against the
    TARGET-PATTERN to extract a part of the target name, called the "stem".
    This stem is substituted into each of the PREREQ-PATTERNS to make the
    prerequisite names (one from each PREREQ-PATTERN).
    
       Each pattern normally contains the character `%' just once.  When the
    TARGET-PATTERN matches a target, the `%' can match any part of the
    target name; this part is called the "stem".  The rest of the pattern
    must match exactly.  For example, the target `foo.o' matches the
    pattern `%.o', with `foo' as the stem.  The targets `foo.c' and
    `foo.out' do not match that pattern.
    
       The prerequisite names for each target are made by substituting the
    stem for the `%' in each prerequisite pattern.  For example, if one
    prerequisite pattern is `%.c', then substitution of the stem `foo'
    gives the prerequisite name `foo.c'.  It is legitimate to write a
    prerequisite pattern that does not contain `%'; then this prerequisite
    is the same for all targets.

    The TARGET-PATTERN and PREREQ-PATTERNS say how to compute the
    prerequisites of each target. Each target is matched against the
    TARGET-PATTERN to extract a part of the target name, called the "stem".
    This stem is substituted into each of the PREREQ-PATTERNS to make the
    prerequisite names (one from each PREREQ-PATTERN).

    目的模式(TARGET-PATTERN)和前提模式(PREREQ-PATTERN)指出如何为每一个目的计算前提条件。每个目的都通过目的模式来解析出一部分目的名来进行匹配,成为枝干。这个枝干会被替换成每一个前提模式以生成前提条件名称(一个 前提模式一个)

    上述每个模式同行都只包含%符号一次。当目的模式匹配了一个目的,%能够匹配任何目的名的部分,这个部分称为 枝干。剩余的模式必须精确匹配。例如,目的 foo.o 匹配模式 %.o, foo为枝干。目的 foo.c 和 foo.out 并不匹配此模式。

    每个目的的前提条件名通过在前提条件模式中为%替换枝干部分形成。例如,如果一个前提条件的模式是 %.c, 那么对枝干 foo的替换给出了前提条件名 foo.c。 写一个不包含%的前提条件模式是可以的,此时这个前提条件名称对所有目的都相同。

    后文待续

  • 相关阅读:
    存储过程与函数
    12个非常实用的JavaScript小技巧
    用JS获取地址栏参数的方法
    sql server split函数
    Matplotlib 保存图片、图画接口和显示中文的使用方法
    pandas 分组操作
    pandas 字符串相关操作以及数据间的合并与重塑
    pandas 分层索引
    pandas 轴索引的重命名,离散化,异常值的处理与随机方法
    pandas 缺失值、重复值的处理与值的替换
  • 原文地址:https://www.cnblogs.com/gaojian/p/2703319.html
Copyright © 2011-2022 走看看