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

    继续翻译

    5.2 Recipe Echoing
    ==================
    
    Normally `make' prints each line of the recipe before it is executed.
    We call this "echoing" because it gives the appearance that you are
    typing the lines yourself.
    
       When a line starts with `@', the echoing of that line is suppressed.
    The `@' is discarded before the line is passed to the shell.  Typically
    you would use this for a command whose only effect is to print
    something, such as an `echo' command to indicate progress through the
    makefile:
    
         @echo About to make distribution files
    
       When `make' is given the flag `-n' or `--just-print' it only echoes
    most recipes, without executing them.  *Note Summary of Options:
    Options Summary.  In this case even the recipe lines starting with `@'
    are printed.  This flag is useful for finding out which recipes `make'
    thinks are necessary without actually doing them.
    
       The `-s' or `--silent' flag to `make' prevents all echoing, as if
    all recipes started with `@'.  A rule in the makefile for the special
    target `.SILENT' without prerequisites has the same effect (*note
    Special Built-in Target Names: Special Targets.).  `.SILENT' is
    essentially obsolete since `@' is more flexible.

    5.2 片段显示
    ==================

    通常 make 在执行片段的一行之前,打印出此行。我们成为显示。因为它给出你自己输入的原样。当一行开始于@, 对此行的显示被禁止。在此行被传递给shell的时候,@被去掉。典型地,你可以用这个命令来单纯打印一些东西,比如用 echo 命令来显示 makefile 的进度,例如:

    @echo About to make distribution files

    当运行 make 时,给定了标志 -n 或者 --just-print ,它只显示所有的片段,而不执行它们。*Note Summary of Options: Opitons Summary. 在这种场合下既使是开始于 @ 的行也会被显示。 当想要找出 make 认为哪个片段应当执行而不必执行的时候,是有用的。

    make 的 -s 或者 --silent 标志,禁止所有的显示,就好像素有的片段都开始于@一样。一个带有特殊目的 没有前提条件的.SLIENT 的makefile 也可以达成同样效果(*note Special Built-bin Target Names: Sepcial Targets.)。.SLIENT 更加的老式应当废弃,因为 @更加灵活。

    后文待续

  • 相关阅读:
    Mysql初探:内存数据刷盘机制
    数据管理流程,基础入门简介
    数据分析:复杂业务场景下,量化评估流程
    架构设计:服务自动化部署和管理流程
    Hadoop框架:MapReduce基本原理和入门案例
    架构设计:微服务模式下,实现灰度发布模式
    架构设计:分布式结构下,服务部署发布
    编码风格:Mvc模式下SSM环境,代码分层管理
    开发工具:Mybatis.Plus.插件三种方式的逆向工程
    Hadoop框架:HDFS高可用环境配置
  • 原文地址:https://www.cnblogs.com/gaojian/p/2706531.html
Copyright © 2011-2022 走看看