Просмотр исходного кода

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.


[SVN r27270]
Vladimir Prus 21 лет назад
Родитель
Сommit
b4e6364bac
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      tools/build

+ 1 - 1
tools/build

@@ -1 +1 @@
-Subproject commit 58ec98e9ea023b710be57bc8f003711bfce27c8c
+Subproject commit f0c580113aef3b15dbeaa64f6ee2c3455f2821a1

粤ICP备19079148号