[[bbv2.reference.class.main-target]]
= Class main-target

[source,jam]
----
class main-target : abstract-target {
    rule generate ( property-set )

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

A link:#bbv2.reference.class.main-target[main-target] represents a named
top-level target in a Jamfile.

--
1. [[bbv2.reference.class.main-target.generate]] `rule generate ( property-set )`
+
Overrides
link:#bbv2.reference.class.abstract-target.generate[abstract-target.generate].
Select an alternative for this main target, by finding all alternatives
whose requirements are satisfied by `property-set` and picking the one
with the longest requirements set. Returns the result of calling
link:#bbv2.reference.class.basic-target.generate[generate] on that
alternative.
+
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.
--
