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

    后文待续

  • 相关阅读:
    小米6刷机开启root权限
    C标准库堆内存函数
    UE4打印到HUD的Stat命令
    Blueprint Stats插件
    PC与Mobile硬件架构对比
    atomic原子编程中的Memory Order
    Windows10下开启D3D11的Debug Layer
    【数据结构】树存储结构
    【数据结构】哈希表
    【算法】查找算法
  • 原文地址:https://www.cnblogs.com/gaojian/p/2695293.html
Copyright © 2011-2022 走看看