• 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。

    后文待续

  • 相关阅读:
    pip 更新下载源
    Image-match
    Laravel之事务与锁
    Laravel之vue操作
    html 固定居中
    vue状态管理(vuex)
    vue兄弟组件的相互通讯(vuex方式)
    vue兄弟组件之间的通信(bus.js)方法
    webapi使用过滤器拦截客户端传来的参数
    webapi跨域,服务器上使用session
  • 原文地址:https://www.cnblogs.com/gaojian/p/2684932.html
Copyright © 2020-2023  润新知