Give the subst logic its own SCons.Subst module. It's big enough.
[scons.git] / src / RELEASE.txt
1 # __COPYRIGHT__
2 # __FILE__ __REVISION__ __DATE__ __DEVELOPER__
3
4
5                  SCons - a software construction tool
6
7                             Release Notes
8
9
10 This is a beta release of SCons, a tool for building software (and other
11 files).  SCons is implemented in Python, and its "configuration files"
12 are actually Python scripts, allowing you to use the full power of a
13 real scripting language to solve build problems.  You do not, however,
14 need to know Python to use SCons effectively.
15
16 So that everyone using SCons can help each other learn how to use it
17 more effectively, please sign up for the scons-users mailing list at:
18
19     http://lists.sourceforge.net/lists/listinfo/scons-users
20
21
22
23 RELEASE 0.97 - XXX
24
25   This is a pre-release for testing the eighth beta release of SCons.
26   Please consult the CHANGES.txt file for a list of specific changes
27   since last release.
28
29   Please note the following important changes since release 0.96:
30
31     --  DIRECTORY TREES ARE NO LONGER AUTOMATICALLY SCANNED FOR CHANGES
32
33         Custom builders and Command() calls that accept directories as
34         source arguments no longer scan entire on-disk directory trees
35         by default.  This means that their targets will not be
36         automatically rebuilt if a file changes on disk, and SCons does
37         *not* already know about.  Note that the targets will still be
38         rebuilt correctly if a file changes that SCons already knows
39         about due to a Builder or other call.
40
41         The existing behavior of scanning on-disk directory trees for
42         any changed file can be maintained by passing the new DirScanner
43         global directory scanner as the source_scanner keyword argument
44         to the Builder call:
45
46             bld = Builder("build < $SOURCE > $TARGET",
47                           source_scanner = DirScanner)
48
49         The same keyword argument can also be supplied to any Command()
50         calls that need to scan directory trees on-disk for changed files:
51
52             env.Command("archive.out", "directory",
53                         "archiver -o $TARGET $SOURCE",
54                         source_scanner = DirScanner)
55
56         This change was made because scanning directories by default
57         could cause huge slowdowns if a configurable directory like /usr
58         or /usr/local was passed as the source to a Builder or Command()
59         call, in which case SCons would scan the entire directory tree.
60
61     --  SIGNATURES ARE NOW STORED IN AN SConsignFile() BY DEFAULT,
62         CAUSING LIKELY REBUILDS; SPECIAL NOTE CONCERNING INTERACTION
63         WITH REPOSITORIES
64
65         The default behavior has been changed to store signature
66         information in a single .sconsign.dblite file in the top-level
67         SConstruct file.  This will cause rebuilds on upgrade to 0.97,
68         unless you were already calling the SConsignFile() function in
69         your SConscript files.
70
71         The previous default behavior was to store signature information
72         in a .sconsign file in each directory that contained target
73         files that SCons knew about.  The old behavior may be preserved
74         by specifying:
75
76               SConsignFile(None)
77
78         in any SConscript file.
79
80         If you are using the Repository feature, are not already using
81         the SConsignFile() function in your build, you *must* add
82         SConsignFile(None) to your build to keep interoperating with an
83         existing Repository that uses the old behavior of a .sconsign
84         file in each directory.  Alternatively, you can rebuild the
85         Repository with the new default behavior.
86
87     --  OTHER SIGNATURE CHANGES WILL CAUSE LIKELY REBUILDS AFTER UPGRADE
88
89         This release adds several changes to the signature mechanism that
90         will cause SCons to rebuild most configurations after upgrading
91         (and when switching back to an earlier release from 0.97).
92         These changes are:
93
94           --  NORMALIZED PATHS IN SConsignFile() DATABASES ON WINDOWS
95
96               When using an SConsignFile() database, instead of individual
97               .sconsign files in each directory, the path names are
98               stored in normalized form with / (forward slash) separating
99               the elements.  This may cause rebuilds on Windows systems
100               with hierarchical configurations.
101
102           --  STORED DEPENDENCY PATHS ARE NOW RELATIVE TO THE TARGET
103
104               SCons used to store the paths of all source files and
105               dependencies relative to the top-level SConstruct directory.
106               It now stores them relative to the directory of the
107               associated target file.  This makes it possible to use
108               content signatures to subdivide a dependency tree without
109               causing unnecessary rebuilds due to an intermediate file in
110               one build being treated as a source file in a nother build.
111
112               This a step towards making it possible to write a hierarchy
113               of SConstruct files that allow developers to build just
114               one portion of a tree wherever there's an SConstruct file.
115               (Note that this would still require some specific code at
116               the top of each SConstruct file, but we hope to make this
117               an easier/more naturally supported thing in the future.)
118
119           --  PYTHON FUNCTION ACTION SIGNATURES HAVE CHANGED TO AVOID
120               FUTURE REBUILDS AND REBUILDS BETWEEN PYTHON VERSIONS
121
122               SCons Actions for Python functions use the functions byte
123               code to generate their signature.  The byte code in older
124               versions of Python includes indications of the line numbers
125               at which the function's code appeared in its original
126               source file, which means that changes in the location of
127               an otherwise unmodified Python function would trigger
128               rebuilds.  The line number byte codes are now removed
129               from the signature, which will cause any targets built by
130               Python function Actions (including various pre-supplied
131               SCons Actions) be rebuilt.
132
133           --  REMOVED CONVERSION FROM PRE-0.96 .sconsign FORMATS
134
135               Because this release involves so many other signature
136               changes that cause rebuilds, the support for automatically
137               converting signature information from .sconsign files
138               written by SCons versions prior to 0.96 has been removed.
139
140           --  ORDER OF -o FLAGS ON CERTAIN LINK COMMAND LINES HAS CHANGED
141
142               The -o flag that specifies an output file has been moved on
143               certain linker command lines to place it consistently after
144               the link command itself.  This will cause recompilation
145               of target files created by these changed lines.
146
147     --  F95 AND F90 COMPILERS ARE NOW PREFERRED OVER F77
148
149         SCons now searches for Fortran 95 and Fortran 90 compilers first
150         in preference to Fortran 77.  This may result in a different
151         Fortran compiler being used by default, although as Fortran 95 and
152         Fortran 90 are backwards compatible with Fortran 77, this should
153         not cause problems for standards-compliant Fortran programs.
154         On systems that have multiple versions of Fortran installed,
155         the Fortran 77 compiler may be explicitly selected by specifying
156         it when creating the construction environment:
157
158             env = Environment(tools = ['default', 'f77'])
159
160     --  SOLARIS DEFAULT SHARED OBJECT PREFIXES AND SUFFIXES HAVE CHANGED
161
162         On Solaris, SCons now builds shared objects from C and C++ source
163         files with a default prefix of "so_" and a default suffix of ".o".
164         The previous default suffix of ".os" caused problems when trying
165         to use SCons with Sun WorkShop.
166
167     --  CACHED Configure() RESULTS ARE STORED IN A DIFFERENT FILE
168
169         The Configure() subsystem now stores its cached results in a
170         different file.  This may cause configuration tests to be re-run
171         the first time after you install 0.97.
172
173     --  setup.py INSTALLS VERSION-NUMBERED SCRIPTS AND DIRS BY DEFAULT
174
175         The setup.py script has been changed to always install SCons in
176         a version-numbered directory (e.g. /usr/local/lib/scons-0.97
177         or D:\Python23\scons-0.97) and with a version-numbered script
178         name (scons-0.97) in addition to the usual installation of an
179         "scons" script name.  A number of new setup.py options allow
180         control over what does or does not get installed, and where.
181         See the README.txt or README files for additional information.
182
183     --  setup.py NOW INSTALLS MAN PAGES ON UNIX AND Linux SYSTEMS
184
185         The SCons setup.py script now installs the "scons.1" and
186         "sconsign.1" man pages on UNIX and Linux systems.  A
187         new --no-install-man
188
189     --  ParseConfig() METHOD ADDS LIBRARY FILE NAMES TO THE $LIBS VARIABLE
190
191         The ParseConfig() method now adds library file names returned
192         by the specified *-config command to the $LIBS construction
193         variable, instead of returning them (the same way it handles
194         the -l option).
195
196     --  ParseConfig() METHOD DOESN'T ADD DUPLICATES TO CONSTRUCTION VARIABLES
197
198         By default, the ParseConfig() method now avoids adding duplicate
199         entries to construction variables.  The old behavior may be
200         specified using a new "unique=0" keyword argument.
201
202     --  WINDOWS %TEMP% and %TMP% VARIABLES ARE PROPAGATED AUTOMATICALLY
203
204         The %TEMP% and %TMP% external environment variables are now
205         propagated automatically to the command execution environment on
206         Windows systems.
207
208     --  VISUAL STUDIO ATL AND MFC DIRECTORIES NOT ADDED BY DEFAULT
209
210         When compiling with Microsoft Visual Studio, SCons no longer
211         adds the ATL and MFC directories to the INCLUDE and LIB
212         environment variables by default.  If you want these directories
213         included in your environment variables, you should now set the
214         $MSVS_USE_MFC_DIRS *construction* variable when initializing
215         your environment:
216
217             env = Environment(MSVS_USE_MFC_DIRS = 1)
218
219     --  BUILDERS RETURN A LIST-LIKE OBJECT, NOT A REGULAR LIST
220
221         Builders calls now return an object that behaves like a list
222         (and which provides some other functionality), not an underlying
223         Python list.  In general, this should not cause any problems,
224         although it introduces a subtle change in the following behavior:
225
226                 obj += env.Object('foo.c')
227
228         If "obj" is a list, Python will no longer update the "obj" in
229         place, because the return value from env.Object() is no longer
230         the same type.  Python will instead allocate a new object and
231         assign the local variable "obj" to it.  If "obj" is defined in
232         an SConscript file that calls another SConscript file containing
233         the above code, "obj" in the first SConscript file will not
234         contain the objects.
235
236         You can guarantee that a list will be updated in place regardless
237         of which SConscript file defines it and which adds to it by
238         using the list append() method as follows:
239
240                 obj.append(env.Object('foo.c'))
241
242     --  OUTPUT OF Configure() SUBSYSTEM CHANGED SLIGHTLY
243
244         The Configure() subsystem now reports tests results as "yes" and
245         "no" instead of "ok" and "failed."  This might interfere with any
246         scripts that automatically parse the Configure() output from SCons.
247
248     --  DEPRECATED GLOBAL FUNCTIONS HAVE BEEN REMOVED
249
250         The following deprecated global functions have been removed:
251         ParseConfig(), SetBuildSignatureType(), SetContentSignatureType(),
252         SetJobs() and GetJobs().
253
254     --  DEPRECATED "validater" KEYWORD HAS BEEN REMOVED
255
256         The deprecated "validater" keyword to the Options.Add() method
257         has been removed.
258
259     --  INTERNAL FUNCTIONS AND CLASSES HAVE MOVED FROM SCons.Util
260
261         All internal functions and classes related to string substitution
262         have been moved out of the SCons.Util module into their own
263         SCons.Subst module.  The following classes have been moved:
264
265                 Literal
266                 SpecialAttrWrapper
267                 NLWrapper
268                 Targets_or_Sources
269                 Target_or_Source
270
271         And the following functions have moved:
272
273                 quote_spaces()
274                 escape_list()
275                 subst_dict()
276                 scons_subst()
277                 scons_subst_list()
278                 scons_subst_once()
279
280         If your SConscript files have been using any of these function
281         directly from the SCons.Util module (which they ultimately should
282         not be!), you will need to modify them.
283
284   Please note the following important changes since release 0.95:
285
286     --  BUILDERS NOW ALWAYS RETURN A LIST OF TARGETS
287
288         All Builder calls (both built-in like Program(), Library(),
289         etc. and customer Builders) now always return a list of target
290         Nodes.   If the Builder only builds one target, the Builder
291         call will now return a list containing that target Node, not
292         the target Node itself as it used to do.
293
294         This change should be invisibile to most normal uses of the
295         return values from Builder calls.  It will cause an error if the
296         SConscript file was performing some direct manipulation of the
297         returned Node value.  For example, an attempt to print the name
298         of a target returned by the Object() Builder:
299
300               target = Object('foo.c')
301               # OLD WAY
302               print target
303
304         Will now need to access the first element in the list returned by
305         the Object() call:
306
307               target = Object('foo.c')
308               # NEW AY
309               print target[0]
310
311         This change was introduced to make the data type returned by Builder
312         calls consistent (always a list), regardless of platform or number
313         of returned targets.
314
315     --  DEFAULT SConsignFile() DATABASE SCHEME HAS CHANGED
316
317         The SConsignFile() function now uses an internally-supplied
318         SCons.dblite module as the default DB scheme for the .sconsign file.
319         If you are using the SConsignFile() function without an explicitly
320         specified dbm_module argument, this will cause all of your targets
321         to be recompiled the first time you use SCons 0.96.  To preserve the
322         previous behavior, specify the "anydbm" module explicitly:
323
324             import anydbm
325             SConsignFile('.sconsign_file_name', anydbm)
326
327     --  INTERNAL .sconsign FILE FORMAT HAS CHANGED
328
329         The internal format of .sconsign files has been changed.  This might
330         cause warnings about "ignoring corrupt .sconsign files" and rebuilds
331         when you use SCons 0.96 for the first time in a tree that was
332         previously built with SCons 0.95 or earlier.
333
334     --  INTERFACE CHANGE OF scan_check FUNCTION TO CUSTOM SCANNERS
335
336         The scan_check function that can be supplied to a custom Scanner now
337         must take two arguments, the Node to be checked and a construction
338         environment.  It previously only used the Node as an argument.
339
340     --  DEFAULT SCANNERS NO LONGER HEED INTERNAL Scanner.add_skey() METHOD
341
342         The internal Scanner.add_skey() method no longer works for the
343         default scanners, which now use construction variables to hold their
344         lists of suffixes.  If you had a custom Tool specification that was
345         reaching into the internals in this way to add a suffix to one of
346         the following scanner, you must now add the suffix to a construction
347         environment through which you plan to call the scanner, as follows:
348
349             CScan.add_skey('.x')       => env.Append(CPPSUFFIXES = ['.x'])
350             DScan.add_skey('.x')       => env.Append(DSUFFIXES = ['.x'])
351             FortranScan.add_skey('.x') => env.Append(FORTRANSUFFIXES = ['.x'])
352
353     --  KEYWORD ARGUMENTS TO Builder() HAVE BEEN REMOVED
354
355         The "node_factory" and "scanner" keyword arguments to the Builder()
356         function have been removed.  In their place, the separate and more
357         flexible "target_factory," "source_factory," "target_scanner" and
358         "source scanner" keywords should be used instead.
359
360     --  ALL-DIGIT FILE "EXTENSIONS" ARE NOW PART OF THE FILE BASENAME
361
362         SCons now treats file "extensions" that contain all digits (for
363         example, "file.123") as part of the file basename, for easier
364         handling of version numbers in the names of shared libraries
365         and other files.  Builders will now add their file extensions to
366         file names specified with all-digit extensions.  If you need to
367         generate a file with an all-digit extension using a Builder that
368         adds a file extension, you can preserve the previous behavior by
369         wrapping the file name in a File() call.
370
371     --  Append()/Prepend() METHODS CHANGED WHEN USING UserList OBJECTS
372
373         The behavior of the env.Append() and env.Prepend() methods has
374         changed when appending a string value to a UserList, or vice versa.
375         They now behave like normal Python addition of a string to
376         a UserList.  Given an initialization and an env.Append() call like:
377
378             env = Environment(VAR1=UserList(['foo']), VAR2='foo')
379             env.Append(VAR1='bar', VAR2=UserList(['bar'])
380
381         The resulting values of $VAR1 and $VAR2 will now be ['foo', 'b',
382         'a', 'r'] and ['f', 'o', 'o', 'bar'], respectively.  This is because
383         Python UserList objects treat strings as sequences of letters when
384         adding them to the value of the UserList.
385
386         The old behavior of yielding $VAR1 and $VAR2 values of ['foo',
387         'bar'] when either variable is a UserList object now requires that
388         the string variables be enclosed in a list:
389
390             env = Environment(VAR1=UserList(['foo']), VAR2=['foo'])
391             env.Append(VAR1='bar', VAR2=UserList(['bar']))
392
393         Note that the SCons behavior when appending to normal lists has
394         *not* changed, and the behavior of all of the default values that
395         SCons uses to initialize all construction variables has *not*
396         changed.  This change *only* affects any cases where you explicitly
397         use UserList objects to initialize or append to a variable.
398
399   Please note the following planned, future changes:
400
401     --  SCANNER NAMES HAVE BEEN DEPRECATED AND WILL BE REMOVED
402
403         Several internal variable names in SCons.Defaults for various
404         pre-made default Scanner objects have been deprecated and will
405         be removed in a future revision.  In their place are several new
406         global variable names that are now part of the publicly-supported
407         interface:
408
409             NEW NAME              DEPRECATED NAME
410             --------              ----------------------------
411             CScanner              SCons.Defaults.CScan
412             DSCanner              SCons.Defaults.DScan
413             SourceFileScanner     SCons.Defaults.ObjSourceScan
414             ProgramScanner        SCons.Defaults.ProgScan
415
416         Of these, only ObjSourceScan was probably used at all, to add
417         new mappings of file suffixes to other scanners for use by the
418         Object() Builder.  This should now be done as follows:
419
420             SourceFileScanner.add_scanner('.x', XScanner)
421
422   SCons is developed with an extensive regression test suite, and a
423   rigorous development methodology for continually improving that suite.
424   Because of this, SCons is of sufficient quality that you can use it
425   for real work.  The "beta" status of the release reflects that we
426   still may change interfaces in future releases, which may require
427   modifications to your SConscript files.  We strive to hold these
428   changes to a minimum.
429
430   Nevertheless, please heed the following disclaimers:
431
432     - Please report any bugs or other problems that you find to our bug
433       tracker at our SourceForge project page:
434
435       http://sourceforge.net/tracker/?func=add&group_id=30337&atid=398971
436
437       We have a reliable bug-fixing methodology already in place and
438       strive to respond to problems relatively quickly.
439
440     - Documentation is spottier than we'd like.  You may need to dive
441       into the source code to figure out how to do something.  Asking
442       questions on the scons-users mailing list is also welcome.  We
443       will be addressing the documentation in upcoming releases, but
444       would be more than glad to have your assistance in correcting this
445       problem... :-)
446
447       In particular, the "SCons Design" documentation on the SCons web
448       site is currently out of date, as we made significant changes to
449       portions of the interface as we figured out what worked and what
450       didn't during implementation.
451
452     - There may be performance issues.  Improving SCons performance
453       is an ongoing priority.  If you still find the performance
454       unacceptable, we would very much like to hear from you and learn
455       more about your configuration so we can optimize the right things.
456
457     - Error messages don't always exist where they'd be helpful.
458       Please let us know about any errors you ran into that would
459       have benefitted from a (more) descriptive message.
460
461   KNOWN PROBLEMS IN THIS RELEASE:
462
463     For a complete list of known problems, consult the SCons bug tracker
464     page at SourceForge:
465
466         http://sourceforge.net/tracker/?atid=398971&group_id=30337&func=browse
467
468     - Support for parallel builds (-j) does not work on WIN32 systems
469       prior to *official* Python release 2.2 (not 2.2 pre-releases).
470
471       Prior to Python 2.2, there is a bug in Python's Win32
472       implementation such that when a thread spawns an external command,
473       it blocks all threads from running.  This breaks the SCons
474       multithreading architecture used to support -j builds.
475
476       We have included a patch file, os_spawnv_fix.diff, that you can
477       use if you you want to fix your version of Python to support
478       parallel builds in SCons.
479
480     - Again, the "SCons Design" documentation on the SCons web
481       site is currently out of date.  Take what you read there with a
482       grain of salt.
483
484     - On Win32 systems, you must put a space between the redirection
485       characters < and >, and the specified files (or construction
486       variable expansions):
487
488         command < $SOURCE > $TARGET
489
490       If you don't supply a space (for example, "<$SOURCE"), SCons will
491       not recognize the redirection.
492
493     - MSVC .res files are not rebuilt when icons change.
494
495     - The -c option does not clean up .sconsign files or directories
496       created as part of the build, and also does not clean up
497       SideEffect files (for example, Visual Studio .pdb files).
498
499     - Switching content signatures from "MD5" to "timestamp" and back
500       again can cause unusual errors.  These errors can be cleared up by
501       removing all .sconsign files.
502
503     - When using multiple Repositories, changing the name of an include
504       file can cause an old version of the file to be used.
505
506     - There is currently no way to force use of a relative path (../*)
507       for directories outside the top-level SConstruct file.
508
509     - The Jar() Builder will, on its second or subsequent invocation,
510       package up the .sconsign files that SCons uses to track signatures.
511       You can work around this by using the SConsignFile() function
512       to collect all of the .sconsign information into a single file
513       outside of the directory being packaged by Jar().
514
515     - SCons does not currently have a way to detect that an intermediate
516       file has been corrupted from outside and should be rebuilt.
517
518     - Unicode characters in path names do not work in all circumstances.
519
520     - A stray source file in a BuildDir can prevent targets from being
521       (re)built when they should.
522
523     - SCons does not automatically rebuild LaTeX files when the file
524       has an undefined reference on the first build.
525
526     - Use of --implicit-cache with TargetSignatures('content') can,
527       for some changes, not rebuild a file when necessary.
528
529     - SCons does not currently automatically check out SConstruct or
530       SConscript files from SCCS, RCS or BitKeeper.
531
532     - No support yet for the following planned command-line options:
533
534          -d -e -l --list-actions --list-derived --list-where
535          -o --override -p -r -R -w --write-filenames
536          -W --warn-undefined-variables
537
538
539
540 Thank you for your interest, and please let us know how we can help
541 improve SCons for your needs.
542
543 Steven Knight
544 knight at baldmt dot com
545 http://www.baldmt.com/~knight/
546
547 With plenty of help from the SCons Development team:
548         Chad Austin
549         Charles Crain
550         Steve Leblanc
551         Gary Oberbrunner
552         Anthony Roach
553         Greg Spencer
554         Christoph Wiedemann
555