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

    继续翻译

       By declaring the subdirectories as phony targets (you must do this as
    the subdirectory obviously always exists; otherwise it won't be built)
    you can remove these problems:
    
         SUBDIRS = foo bar baz
    
         .PHONY: subdirs $(SUBDIRS)
    
         subdirs: $(SUBDIRS)
    
         $(SUBDIRS):
                 $(MAKE) -C $@
    
         foo: baz
    
       Here we've also declared that the `foo' subdirectory cannot be built
    until after the `baz' subdirectory is complete; this kind of
    relationship declaration is particularly important when attempting
    parallel builds.

    通过把子目录宣布为伪目标(如果子目录明显存在,你必须这么做,否则就无法运行),你可以避免前述问题:

    SUBDIRS = foo bar baz

    .PHONY: subdirs $(SUBDIRS)

    subdirs: $(SUBDIRS)

    $(SUBDIRS):
      $(MAKE) -C $@

    foo: baz

    这里我们也声明了 foo 子目录要在 baz 子目录处理完毕后再处理;这种关系在并行编译的时候很重要。

    后文待续

  • 相关阅读:
    idea自定义servlet模板
    jsp基础-指令,内置对象,动作,EL表达式,JSTL技术
    cookie和session
    HttpServletRequest
    IO字符流
    IO字节流
    递归
    File 类
    JDBC数据库连接
    Map接口
  • 原文地址:https://www.cnblogs.com/gaojian/p/2695184.html
Copyright © 2011-2022 走看看