From 07a01edba8369ba4f0d2bcf0e89f765a89bf2bfd Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Sat, 20 Aug 2016 23:54:35 +0200 Subject: [PATCH] docs --- docs/sphinx/featuremap_example.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/sphinx/featuremap_example.txt b/docs/sphinx/featuremap_example.txt index a7a408a8..68993dfc 100644 --- a/docs/sphinx/featuremap_example.txt +++ b/docs/sphinx/featuremap_example.txt @@ -1,10 +1,11 @@ +The feature system enables binding new behaviours to task generators instances by scheduling class methods for execution. The methods are weaved in an order that this specified on the method definition (after/before constraints). One major benefit is that additional behaviours can be weaved onto existing targets without modifying the build scripts. This approach is comparable to the CSS class declations in the web design context. -The Waf features are names linked to specific functions by the decorator -:py:func:`waflib.TaskGen.feature`. The functions -are mapped to the class :py:class:`waflib.TaskGen.task_gen` as methods. +The Waf features are declared by annotating functions with a decorators +:py:func:`waflib.TaskGen.feature`. These functions are then mapped +as class methods onto :py:class:`waflib.TaskGen.task_gen` with the name given. -The association between feature names and methods is *many-to-many*, which means -that a method may be involved in several features, and that a feature may be bound +The association between feature names and methods is *many-to-many*; in other words +a method may be used by in several features, and that a feature may reference to several methods. Here is how to create and use a new feature named **foo**::