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。 写一个不包含%的前提条件模式是可以的,此时这个前提条件名称对所有目的都相同。

    后文待续

  • 相关阅读:
    大数据学习之大数据简介03
    大数据学习之Linux进阶02
    大数据学习之Linux基础01
    连接数据库出现java.sql.SQLException: Unknown system variable 'tx_isolation'
    Linux中伪分布的搭建
    【TCP/IP】入门学习笔记 三
    【TCP/IP】入门学习笔记 二
    【TCP/IP】入门学习笔记 一
    【CentOS】CentOS7 自动同步时间:服务ntp,命令ntpdate
    【Mysql】- pt-online-schema-change在线更新大表字段、加索引
  • 原文地址:https://www.cnblogs.com/gaojian/p/2703319.html
Copyright © 2011-2022 走看看