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 更加的老式应当废弃,因为 @更加灵活。

    后文待续

  • 相关阅读:
    C# 获取 域(AD) 用户信息
    如何在 MOSS 2007 启用 Session
    安装 卸载 回收 sharepoint 解决方案 moss wss wsp
    [转]挑战Windows极限:物理内存
    霍特卡的 CSLA.Net 3.6 Windows及Silverlight的正式版 昨天发布 同时CSLA.Net 业务对象 2008 英文版图书可以网上订购
    转帖如何在不联网的情况下安装 Silverlight Tools
    jQuery 选择器的使用
    关闭 Windows Server 2008 用户权限控制(UAC)
    jQuery 的第一个例子
    jQuery for Asp.Net 一步一步从入门到精通(附 jQuery API 彩色大图)
  • 原文地址:https://www.cnblogs.com/gaojian/p/2706531.html
Copyright © 2011-2022 走看看