Changes between Version 8 and Version 9 of PythonPort/Design


Ignore:
Timestamp:
Nov 9, 2007, 11:16:02 AM (18 years ago)
Author:
ghost
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PythonPort/Design

    v8 v9  
    132132=== Project loading level ===
    133133
    134 Porting is in progress yet. Check back later.
     134[Note that 'project' is basically a directory where either Jamroot or Jamfile is present].
     135Project loading is implemented by the {{{boost.build.build.project}}} module. The {{{ProjectRegistry}}} class maintains all known projects. The {{{Manager.projects()}}} method obtains the project registry for a manager.
     136The {{{ProjectRegistry.load}}} method load a project at specific directory. Each project is associated with a Jam module where
     137the Jamfile code is execute, with a project target, and a attributes object {{{ProjectAttributes}}} -- which keeps things like project requirements.
     138The attributes object is carried over from previous design, and will be eventually merged with the project target.
     139
     140Loading of project follows these steps:
     141 1. Find Jamfile or Jamroot
     142 2. Prepare default attributes object, where all attribute are inherited from parent. Create new project target.
     143 3. Import all functions that must be useable in Jamfile context to Jam module for the new project
     144 4. Actually load the Jamfile.
     145
     146If a Jamfile contains call to the 'project' rule, all specified attributes are passed to the {{{ProjectAttributes}}} object, which
     147adjust attributes. For example, for requirements, the properties specified in the 'project' rule are merged with the properties inherited from parent.
     148
     149The list of functions that must be callable from Jamfile is maintained by the {{{ProjectRules}}} class. It has several method that
     150are automatically imported in Jamfile, as well as the {{{add_rule}}} method that can be called from anywhere. The {{{add_rule}}}
     151method takes a name that must be available in Jamfile, and a callable that will be called. This is the mechanism used to make
     152various main target rules available in Jamfile.
     153
     154The callables imported into Jamfile will be called with exactly parameters passed in Jamfile -- there are no extra parameters implicitly added. While a Jamfile is being loaded, the {{{ProjectRegistry.current}}} method will return project target corresponding to the
     155currently loaded Jamfile. Main target rules should use it to decide in which project targets should be defined.
    135156   
    136157=== Metatargets level ===