From cd6635963b4e5367dc381931c42667bd3a00dd68 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Mon, 17 Feb 2003 06:58:40 +0000 Subject: [PATCH] Improve comments. [SVN r17473] --- new/generators.jam | 15 +++++++++++++-- v2/build/generators.jam | 15 +++++++++++++-- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/new/generators.jam b/new/generators.jam index 9a4eb93c6..5cb41f9c0 100644 --- a/new/generators.jam +++ b/new/generators.jam @@ -493,6 +493,14 @@ rule generator ( class generator ; +# Generator which is able to produce desired target types from arbitrary number +# of sources, provided they all are of supported times. This is different from +# ordinary generator, which does maps N sources to M targets, where both N and M +# are fixed. For example, compiler takes cpp files and produces object. Linker +# can take any number of objects, and produces one exe. +# +# The generator works by attempting to convert each source into one of the +# allowed target types, and then consuming the result of convertion. rule composing-generator ( id : source-types * : target-types + : requirements * ) { @@ -560,7 +568,8 @@ class composing-generator : generator ; import errors : error ; .generators = ; - + +# Registers new generator instance 'g'. rule register ( g ) { .generators += $(g) ; @@ -575,7 +584,7 @@ rule register ( g ) .generators-for-toolset.$(id:S=) += $(g) ; } - +# Creates new instance of the 'generator' class and registers it. rule register-standard ( id : source-types + : target-types + : requirements * ) { local g = [ new generator $(id) : $(source-types) : $(target-types) @@ -583,6 +592,8 @@ rule register-standard ( id : source-types + : target-types + : requirements * ) register $(g) ; } +# Creates new instance of the 'composing-generator' class and +# registers it. rule register-composing ( id : source-types + : target-types + : requirements * ) { local g = [ new composing-generator $(id) : $(source-types) diff --git a/v2/build/generators.jam b/v2/build/generators.jam index 9a4eb93c6..5cb41f9c0 100644 --- a/v2/build/generators.jam +++ b/v2/build/generators.jam @@ -493,6 +493,14 @@ rule generator ( class generator ; +# Generator which is able to produce desired target types from arbitrary number +# of sources, provided they all are of supported times. This is different from +# ordinary generator, which does maps N sources to M targets, where both N and M +# are fixed. For example, compiler takes cpp files and produces object. Linker +# can take any number of objects, and produces one exe. +# +# The generator works by attempting to convert each source into one of the +# allowed target types, and then consuming the result of convertion. rule composing-generator ( id : source-types * : target-types + : requirements * ) { @@ -560,7 +568,8 @@ class composing-generator : generator ; import errors : error ; .generators = ; - + +# Registers new generator instance 'g'. rule register ( g ) { .generators += $(g) ; @@ -575,7 +584,7 @@ rule register ( g ) .generators-for-toolset.$(id:S=) += $(g) ; } - +# Creates new instance of the 'generator' class and registers it. rule register-standard ( id : source-types + : target-types + : requirements * ) { local g = [ new generator $(id) : $(source-types) : $(target-types) @@ -583,6 +592,8 @@ rule register-standard ( id : source-types + : target-types + : requirements * ) register $(g) ; } +# Creates new instance of the 'composing-generator' class and +# registers it. rule register-composing ( id : source-types + : target-types + : requirements * ) { local g = [ new composing-generator $(id) : $(source-types)