Skip to content

Latest commit

 

History

History
50 lines (44 loc) · 1.63 KB

basic-target.adoc

File metadata and controls

50 lines (44 loc) · 1.63 KB

Class basic-target

class basic-target : abstract-target {
    rule __init__ ( name : project : sources * : requirements * : default-build * : usage-requirements * )
    rule generate ( property-set )
    rule construct ( name : source-targets * : property-set )

    # Methods inherited from abstract-target
    rule name ( )
    rule project ( )
    rule location ( )
    rule full-name ( )
}

Implements the most standard way of constructing main target alternative from sources. Allows sources to be either files or other main targets and handles generation of those dependency targets.

  1. rule init ( name : project : sources * : requirements * : default-build * : usage-requirements * )

    name

    The name of the target

    project

    The project in which the target is declared.

  2. rule generate ( property-set )

    Overrides abstract-target.generate. Determines final build properties, generates sources, and calls construct. This method should not be overridden.

    On success, returns:

    • a property-set with the usage requirements to be applied to dependents

    • a list of produced virtual targets, which may be empty.

  3. rule construct ( name : source-targets * : property-set )

    Constructs virtual targets for this abstract target. Returns a usage-requirements property-set and a list of virtual targets. Should be overridden in derived classes.