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

    继续翻译

    2.6 Another Style of Makefile                        
    =============================                        
                            
    When the objects of a makefile are created only by implicit rules, an 
    alternative style of makefile is possible.  In this style of makefile,
    you group entries by their prerequisites instead of by their targets.                        
    Here is what one looks like:                        
                            
         objects = main.o kbd.o command.o display.o \                        
                   insert.o search.o files.o utils.o                        
                            
         edit : $(objects)                        
                 cc -o edit $(objects)                        
                            
         $(objects) : defs.h                        
         kbd.o command.o files.o : command.h                        
         display.o insert.o search.o files.o : buffer.h                        

    2.6 另一种类型的 makefile

    如果一个makefile的目标文件仅仅是由隐式规则所创建,那么另一种类型的makefile 是可能的。

    在这种类型的makefile中,你可以把它们按照前提条件来分组,而不是按他们的目的来分组。

    下面是它可能的样子:

    objects = main.o kbd.o command.o display.o \
    insert.o search.o files.o utils.o

    edit : $(objects)
    cc -o edit $(objects)

    $(objects) : defs.h
    kbd.o command.o files.o : command.h
    display.o insert.o search.o files.o : buffer.h

    后文待续

  • 相关阅读:
    c#剪切板操作
    eclipse mvn build error tips
    Redis Tips
    IntilliJ Idea 使用中的问题与解决方案
    mongo
    python
    SQL Relative
    sybase update
    run current vim file
    git
  • 原文地址:https://www.cnblogs.com/gaojian/p/2683568.html
Copyright © 2011-2022 走看看