⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 make.jam

📁 C++的一个好库。。。现在很流行
💻 JAM
字号:
#  Copyright (C) Vladimir Prus 2002. Permission to copy, use, modify, sell and
#  distribute this software is granted provided this copyright notice appears in
#  all copies. This software is provided "as is" without express or implied
#  warranty, and with no claim as to its suitability for any purpose.

#  This module defines the 'make' main target rule.

import targets ;
import "class" : new ;
import property ;
import errors : error ;
import type : type ;
import regex ;
import property-set ;
import project ;

class make-target-class : basic-target
{
    import type regex virtual-target ;    
    import "class" : new ;
    
    rule __init__ ( name : project : sources * : requirements * 
        : make-rule + : default-build * )
    {     
        basic-target.__init__ $(name) : $(project) : $(sources) : $(requirements) 
          : $(default-build) ;
       
        self.make-rule = $(make-rule) ;    
    }
        
    rule construct ( name : source-targets * : property-set )
    {
        local a = [ new action $(source-targets) : $(self.make-rule) 
                    : $(property-set) ] ;
        local t = [ new file-target $(self.name) exact 
          : [ type.type $(self.name) ] : $(self.project) : $(a) ] ;        
        return [ property-set.empty ] [ virtual-target.register $(t) ] ;
    }   
}

# Declares the 'make' main target.
rule make ( target-name : sources * : generating-rule + : requirements * 
            : caller ? )
{
    caller ?= [ project.current ] ;
    caller-module = [ $(caller).project-module ] ;
    local rules = [ RULENAMES $(caller-module) ] ;
    if $(generating-rule[1]) in $(rules)
    {
        # This is local rule, make it global
        local n = $(caller-module).$(generating-rule[1]) ;
        IMPORT $(caller-module) : $(generating-rule[1]) : : $(n) ;
        generating-rule = $(n) $(generating-rule[2-]) ;
    }
    
   targets.main-target-alternative
     [ new make-target-class $(target-name) : $(caller)
       : [ targets.main-target-sources $(sources) : $(target-name) ] 
       : [ targets.main-target-requirements $(requirements) : $(caller) ] 
       : $(generating-rule) 
       : [ targets.main-target-default-build : $(caller) ] 
     ] ;
         
}

IMPORT $(__name__) : make : : make ;


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -