zoukankan      html  css  js  c++  java
  • GNU make manual 翻译(四十九)

    继续翻译

       If you know that one or more of your makefiles cannot be remade and 
    you want to keep `make' from performing an implicit rule search on
    them, perhaps for efficiency reasons, you can use any normal method of 
    preventing implicit rule lookup to do so.  For example, you can write 
    an explicit rule with the makefile as the target, and an empty recipe 
    (*note Using Empty Recipes: Empty Recipes.).                        
                            
       If the makefiles specify a double-colon rule to remake a file with a  
    recipe but no prerequisites, that file will always be remade (*note 
    Double-Colon::).  In the case of makefiles, a makefile that has a 
    double-colon rule with a recipe but no prerequisites will be remade
    every time `make' is run, and then again after `make' starts over and 
    reads the makefiles in again.  This would cause an infinite loop: 
    `make' would constantly remake the makefile, and never do anything  
    else.  So, to avoid this, `make' will *not* attempt to remake makefiles 
    which are specified as targets of a double-colon rule with a recipe but
    no prerequisites.                        

    如果你知道有一个或多个 makefile没能被重新生成,并且你想要让 make 继续在这些文件上执行隐式规则搜索,也许从效率方面考虑,你可以用普通的方法来防止隐式规则搜索。例如你可以为作为目的的makefile写一个显式规则,和一个空的片段.

    (*note Using Empty Recipes: Empty Recipes)

    如果makefile 指定了一个 双冒号规则来用没有前提条件,只有片段的方式来重新生成一个文件,这个文件将肯定会被重新生成(*note Double-Colon::)

    在这种场合下,一个makefile拥有 双冒号规则,只有片段没有前提条件,则此文件将在每次make 运行的时候,被重新生成。然后,make 启动完毕后再次读入此makefile时再次被重新生成。

    这将会到导致无限循环:make 会不断地重新生成此 makefile,并且永远也干不了其他的事情了。

    为了防止这一点,make 不会试图去 重新生成一个 双冒号规则下的有片段无前提条件的,被定义为目的makefile。

    后文待续

  • 相关阅读:
    Genbank简介
    Asc码与字符互相转化
    Netbeans中文乱码
    弹出警告窗口
    PHP代码执行漏洞总结
    透析SCN
    oracle用户管理的完全恢复4:在ARCHIVELOG 模式(恢复打开的数据库数据库最初是关闭的)
    Oracle用户管理的不完全恢复2:基于取消的恢复
    RMAN备份详解1
    oracle用户管理的完全恢复6:控制文件损坏(控制文件前后内容改变)
  • 原文地址:https://www.cnblogs.com/gaojian/p/2684932.html
Copyright © 2011-2022 走看看