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

    继续翻译

    Now you can say just `make' to remake all three programs, or specify as
    arguments the ones to remake (as in `make prog1 prog3').  Phoniness is
    not inherited: the prerequisites of a phony target are not themselves
    phony, unless explicitly declared to be so.
    
       When one phony target is a prerequisite of another, it serves as a
    subroutine of the other.  For example, here `make cleanall' will delete
    the object files, the difference files, and the file `program':
    
         .PHONY: cleanall cleanobj cleandiff
    
         cleanall : cleanobj cleandiff
                 rm program
    
         cleanobj :
                 rm *.o
    
         cleandiff :
                 rm *.diff

    现在你可以仅仅输入 make 来重新构建所有这三个程序,或者知道指定参数来构建一部分(例如 make prog1 prog2),伪目的不能继承:伪目的的前提条件不能是伪目的,除非明确地进行了如此的宣言。

    当一个伪目的是另一个伪目的的前提条件时,它就像是另一个的子程序一样进行工作。例如,这里的 make cleanall 将删除目标文件,差异文件和 program文件:

    .PHONY: cleanall cleanobj cleandiff

    cleanall : cleanobj cleandiff
    rm program

    cleanobj :
    rm *.o

    cleandiff :
    rm *.diff

    后文待续

  • 相关阅读:
    jQuery Ajax 实例 全解析
    用Javascript评估用户输入密码的强度
    常用网址
    常用的107条Javascript
    根据键盘操作表格
    HTML5吧
    css3动画简介以及动画库animate.css的使用
    jquery插件下载地址
    CEO、COO、CFO、CTO
    springboot与shiro配置
  • 原文地址:https://www.cnblogs.com/gaojian/p/2695293.html
Copyright © 2011-2022 走看看