Changeset 27270

Timestamp:
Feb 9, 2005, 11:51:33 AM (18 years ago)
Author:
Vladimir Prus
Message:

Cleanup generators interaction with derived types.

Say we have PYTHON_EXTENSION type derived from SHARED_LIB, and
no generators are explicitly defined for PYTHON_EXTENSION. We would
like to inherit generators for the SHARED_LIB type. The previous
code would run a generator for SHARED_LIB type. Since it will produce
a target of type SHARED_LIB, after calling the generator the type of target
was "fixed" to PYTHON_EXTENSION.

This was unly. Also, the <tag> functionality did no work as expected --
it would compute the name of python extensions as if they were a regular
libraries.

Now, when we try to generate PYTHON_EXTENSION, we clone generators
for SHARED_LIB and change SHARED_LIB to PYTHON_EXTENSION in the generator's
list of target type.

  • build/generators.jam (generator.clone-and-change-target-type): New method. (base-to-derived-type-conversion): Remove. (find-viable-generators-aux): First find a type which has

any generators defined, then match generators against property
set.

  • build/virtual-target.jam (abstract-file-target.set-type): Remove.
(No files)

Note: See TracChangeset for help on using the changeset viewer.