2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-16 13:22:11 +00:00
Files
build/new/make.jam
Vladimir Prus 27268e2ba7 Work on the issue 578618. Moved all the data out of jamfile modules.
* new/project.jam (project-attributes): New class to keep all the
        project related data. (attritutes, attribute): New rules to access
        the project attributes. (target): New rule to access the project
        target for a jamfile module.
        (initialize): Store attribute in project-attributes instance.
        (project): Moved to jamfile module.
        (assign-option): Moved with modifications to project-attributes.get.
    * new/targets.jam, new/project-root.jam, new/make.jam,
      new/build-system.jam: Induced changes.


[SVN r14362]
2002-07-09 07:56:51 +00:00

49 lines
1.7 KiB
Plaintext

# 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' rule and associated class, derived from
# 'basic-target'.
import targets ;
import class : class new ;
rule make-target-class ( name : project : sources * : requirements *
: make-rule + : default-build )
{
basic-target.__init__ $(name) : $(project) : $(sources) : $(requirements)
: $(default-build) ;
self.make-rule = $(make-rule) ;
rule construct ( source-targets * : properties * )
{
local t = [ new virtual-target $(self.name)
: $(self.project) : $(properties) ] ;
local a = [ new action $(t) : $(source-targets) : $(self.make-rule)
: $(properties) ] ;
$(t).action $(a) ;
return $(t) ;
}
}
class make-target-class : basic-target ;
rule make ( target-name : sources * : generating-rule : requirements * )
{
local project-module = [ CALLER_MODULE ] ;
local location = [ project.attribute $(project-module) location ] ;
local ptarget = [ project.target $(location) ] ;
local default-build = [ project.attribute $(project-module) default-build ] ;
local target = [ $(ptarget).main-target $(target-name) ] ;
$(target).add-alternative
[ new make-target-class $(target-name) : $(project-module) : $(sources)
: $(requirements) : $(generating-rule) : $(default-build) ] ;
}
IMPORT $(__name__) : make : : make ;