Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/tools/build/v2/hacking.txt @ 32

Last change on this file since 32 was 29, checked in by landauf, 17 years ago

updated boost from 1_33_1 to 1_34_1

File size: 5.0 KB
Line 
1Copyright 2003, 2006 Vladimir Prus
2Distributed under the Boost Software License, Version 1.0.
3(See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
4
5
6             ----------------------------------
7             Boost.Build contributor guidelines
8             ----------------------------------
9
10Boost.Build is an open-source project. This means that we welcome and
11appreciate all contributions --- be it ideas, bug reports, or patches.
12This document contains guidelines which helps to assure that development
13goes on smoothly, and changes are made quickly.
14
15The guidelines are not mandatory, and you can decide for yourself which one
16to follow. But note, that 10 mins that you spare writing a comment, for
17example, might lead to significally longer delay for everyone.
18
19Before contributing, make sure you are subscribed to our mailing list
20
21   boost-build@lists.boost.org
22
23Additional resources include
24
25   - The issue tracker
26     http://zigzag.cs.msu.su/boost.build
27
28   - commits mailing list:
29     boost-build@lists.sourceforge.net
30     http://sourceforge.net/mailarchive/forum.php?forum_id=9097
31
32
33BUGS and PATCHES
34
35Both bugs and patches can be send to our mailing list.
36
37When reporting a bug, please try to provide the following information.
38
39   - What you did. A minimal reproducible testcase is very much appreciated.
40     Shell script with some annotations is much better than verbose description of
41     the problem. A regression test is the best (see test/test_system.html).
42   - What you got.
43   - What you expected.
44   - What version of Boost.Build and Boost.Jam did you use. If possible,
45     please try to test with the CVS HEAD state.
46
47When submitting a patch, please:
48
49  - make a single patch for a single logical change
50  - follow the policies and coding conventions below,
51  - send patches in unified diff format,
52    (using either "cvs diff -u" or "diff -u")
53  - provide a log message together with the patch
54  - put the patch and the log message as attachment to your email.
55
56The purpose of log message serves to communicate what was changed, and
57*why*. Without a good log message, you might spend a lot of time later,
58wondering where a strange piece of code came from and why it was necessary.
59
60The good log message mentions each changed file and each rule/method, saying
61what happend to it, and why. Consider, the following log message
62
63    Better direct request handling.
64     
65     * new/build-request.jam
66       (directly-requested-properties-adjuster): Redo.
67       
68     * new/targets.jam
69       (main-target.generate-really): Adjust properties here.
70     
71     * new/virtual-target.jam
72       (register-actual-name): New rule.
73       (virtual-target.actualize-no-scanner): Call the above, to detected bugs,
74       where two virtual target correspond to one Jam target name.
75 
76The log messages for the last two files are good. They tell what was
77changed. The change to the first file is clearly undercommented.
78
79It's OK to use terse log messages for uninteresting changes, like
80ones induces by interface changes elsewhere.
81
82
83POLICIES.
84
851. Testing.
86
87All serious changes must be tested. New rules must be tested by the module
88where they are declared. Test system (test/test_system.html) should be used
89to verify user-observable behaviour.
90
912. Documentation.
92
93It turns out that it's hard to have too much comments, but it's easy to have
94too little. Please prepend each rule with a comment saying what the rule does
95and what arguments mean. Stop for a minute and consider if the comment makes
96sense for anybody else, and completely describes what the rules does. Generic
97phrases like "adjusts properties" are really not enough.
98
99When applicable, make changes to the user documentation as well.
100
101
102CODING CONVENTIONS.
103
104    1. All names of rules and variables are lowercase with "-" to separate
105    words.
106
107        rule call-me-ishmael ( ) ...
108
109    2. Names with dots in them are "intended globals". Ordinary globals use
110    a dot prefix:
111
112        .foobar
113        $(.foobar)
114
115    3. Pseudofunctions or associations are <parameter>.<property>:
116
117        $(argument).name = hello ;
118        $($(argument).name)
119
120    4. Class attribute names are prefixed with "self.":
121
122        self.x
123        $(self.x)
124
125    5. Builtin rules are called via their ALL_UPPERCASE_NAMES:
126
127        DEPENDS $(target) : $(sources) ;
128
129    6. Opening and closing braces go on separate lines:
130
131        if $(a)
132        {
133            #
134        }
135        else
136        {
137            #
138        }
139
140HTML DOCUMENTATION.
141
142    Please pass HTML files though HTML Tidy (http://tidy.sf.net) before
143    comitting. This has to important purposes:
144    - detecting bad HTML
145    - converting files to uniform indentation style, which inverses effect
146      of different editors and makes differences between revisions much
147      smaller and easy for review.
148
149    Alas, the way Tidy indents HTML differs between version. Please use
150    the version awailable at
151
152       http://tidy.sourceforge.net/src/old/tidy_src_020411.tgz
153
154    and "-i -wrap 78" command line parameters.
Note: See TracBrowser for help on using the repository browser.