summaryrefslogtreecommitdiff
path: root/doc/python10/intro.xml
blob: 016ce78c9b39ef1f35088162fc0209124bae56dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
<?xml version='1.0'?>
<!DOCTYPE sconsdoc [
    <!ENTITY % scons SYSTEM "../scons.mod">
    %scons;
]>

<section id="sect-intro"
         xmlns="http://www.scons.org/dbxsd/v1.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 http://www.scons.org/dbxsd/v1.0/scons.xsd">
<title>Introduction</title>

<!--

  Copyright (c) 2001 - 2017 The SCons Foundation

  Permission is hereby granted, free of charge, to any person obtaining
  a copy of this software and associated documentation files (the
  "Software"), to deal in the Software without restriction, including
  without limitation the rights to use, copy, modify, merge, publish,
  distribute, sublicense, and/or sell copies of the Software, and to
  permit persons to whom the Software is furnished to do so, subject to
  the following conditions:

  The above copyright notice and this permission notice shall be included
  in all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
  KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

-->

<para>

  More than twenty years after its creation, the classic UNIX &Make;
  utility and its descendants are still the dominant way in which
  software is built. &Make; has maintained this position despite the
  fact that the intervening years have revealed many
  shortcomings of the &Make; model for building software:

</para>

<itemizedlist>

  <listitem>
    <para>

      The use of timestamps to decide when a file has been updated is
      imprecise and prone to error, especially across distributed file
      systems such as NFS.

    </para>
  </listitem>

  <listitem>
    <para>

      Builds of typical large software systems still take hours, if not
      days, despite the tremendous advances in CPU and disk speeds over
      recent years.

    </para>
  </listitem>

  <listitem>
    <para>

      &Make; maintains static definitions of dependencies in its
      &Makefiles;. Much effort has been put into
      utilities (<application>mkdepend</application>, <application>gcc
      -M</application>) and schemes (<filename>Makefile.d</filename>
      files) to try to keep &Makefile; dependencies up-to-date,
      but these only confirm that &Make;'s static dependencies are
      inherently fragile.

    </para>
  </listitem>

  <listitem>
    <para>

      The standard recursive use of &Make; for build hierarchies leads
      to incomplete dependency graphs, which must be overcome by
      manually changing the order in which directories are built, or
      through the use of multiple build passes.

    </para>
  </listitem>

</itemizedlist>

<para>

  One need only look at the plethora of helper and wrapper utilities
  (automake, easymake, imake, jmake, makeLib, maketool, mkmed, shake,
  SMake, TMAKE) and complete alternatives to &Make; (Ant, bake, bau,
  bras, Cake, Cons, Cook, Jam, jmk, jus, makeme, mash, MK, nmake, Odin,
  VMake) that have been created over the years to realize that vanilla
  &Make; is not satisfying everyone's build requirements. So why Yet
  Another build tool?

</para>

<section>
  <title>Enter Software Carpentry</title>

  <para>

    Most of the build tools just mentioned
    were written by programmers and for
    programmers. The fact that most programmer-friendly
    utilities do a poor job of fulfilling the needs
    of non-programmers prompted Greg Wilson to
    organize the Software Carpentry competition in January 2000.
    Software Carpentry was an
    open design contest with the express goal of producing a set of
    next-generation utilities, including a build tool, that would be
    accessible
    not only to
    programmers
    but also to computer <emphasis>users</emphasis>
    such as physical scientists.

  </para>

  <para>

    The key to this usability would be that all of
    these utilities, including the build tool, would be
    written in Python.
    This provided the catalyst for actually
    pursuing an idea
    that had been floating around one of the more
    intriguing &Make; alternatives,
    a Perl utility called &Cons;.
    What if the friendlier syntax of Python
    could be married to the
    architectural advantages of &Cons;?

  </para>

  <para>

    The resulting merged design, at that time named &ScCons;,
    won the Software Carpentry build tool competition. CodeSourcery (by
    then the administrators of the competition) ultimately decided not to
    fund development of the build tool, but the seed had been planted and the
    design had taken root.

  </para>

</section>

<section>
  <title>Cons</title>

  <para>

    It helps to know something about &Cons;.
    &Cons; was first released in 1996 by Bob Sidebotham,
    then an employee of Fore Systems,
    and it has a number of
    distinctive features that set it apart from most &Make;-alikes:

  </para>

  <itemizedlist>

    <listitem>
      <para>

        &Cons; "configuration files" are not Yet Another
        invented mini-language, but are actually <emphasis>Perl
        scripts</emphasis>, which means the full power and flexibility of
        a real scripting language can be applied to build problems.

      </para>
    </listitem>

    <listitem>
      <para>

        &Cons; builds everything from a single process at the top of the
        source tree, with a global view of the dependencies.

      </para>
    </listitem>

    <listitem>
      <para>

        &Cons; scans files automatically for dependencies such as
        files specified on <literal>#include</literal> lines.

      </para>
    </listitem>

    <listitem>
      <para>

        &Cons; decides if a file was out-of-date by using MD5 checksums of
        the contents of files, not timestamps.

      </para>
    </listitem>

  </itemizedlist>

  <para>

    Despite all of these intriguing architectural features, the great
    strength of &Cons;&mdash;being written in Perl&mdash;was also one of
    its weaknesses, turning away many potential users due to the
    (real or perceived) steep learning curve of Perl.

  </para>

</section>

<section>
  <title>&SCons;</title>

  <para>

    Through the &ScCons; contest entry,
    &SCons; is the direct descendant of the &Cons; architecture,
    and is currently
    under active, supported development with a growing body of
    users. Its first release was 13 December 2001, under the simple and
    non-restrictive MIT license, and from the outset, the goal of the
    members of the &SCons; project has been to deliver a stable, reliable
    tool that can be used for industrial-strength software builds.

  </para>

  <para>

    The rest of this paper will give an overview of the &SCons; design
    (including its architecture and interface), describe the development
    methodology used, and discuss future directions for &SCons;.

  </para>

</section>

</section>