1 # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation
2 # src/RELEASE.txt 3842 2008/12/20 22:59:52 scons
5 SCons - a software construction tool
10 This is SCons, a tool for building software (and other files). SCons is
11 implemented in Python, and its "configuration files" are actually Python
12 scripts, allowing you to use the full power of a real scripting language
13 to solve build problems. You do not, however, need to know Python to
14 use SCons effectively.
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:
19 http://lists.sourceforge.net/lists/listinfo/scons-users
23 RELEASE 1.2.0 - Sat, 20 Dec 2008 22:47:29 -0800
25 Please consult the CHANGES.txt file for a list of specific changes
28 Please note the following important changes since release 1.1.0:
30 -- THE $CHANGED_SOURCES, $CHANGED_TARGETS, $UNCHANGED_SOURCES
31 AND $UNCHANGED_TARGETS VARIABLES WILL BECOME RESERVED
33 A future release (probably 1.3.0) will make the construction
34 variable names $CHANGED_SOURCES, $CHANGED_TARGETS,
35 $UNCHANGED_SOURCES and $UNCHANGED_TARGETS into reserved
36 construction variable names controlled by SCons itself (like
37 the current $SOURCE, $TARGETS, etc.).
39 Setting these variable names in the current release will generate
40 a warning but still set the variables. When they become reserved
41 variable names, they will generate a different warning message
42 and attempts to set these variables will be ignored.
44 SCons configurations that happen to use these variable names
45 should be changed to use different variable names, in order
46 to ensure that the configuration continues to work with future
49 -- THE Options OBJECT AND RELATED FUNCTIONS NOW GENERATE WARNINGS
51 Use of the Options object, and related functions BoolOption(),
52 EnumOption(), ListOption(), PackageOption() and PathOption()
53 were announced as deprecated in release 0.98.1. Since then,
54 however, no warning messages were ever implemented for the
55 use of these deprecated functions.
57 By default, release 1.2.0 prints warning messages when these
58 deprecated features are used. Warnings about all deprecated
59 features may be suppressed by using the --warn=no-deprecated
62 $ scons --warn=no-deprecated
64 Or by using the appropriate SetOption() call in any SConscript
67 SetOption('warn', 'no-deprecated')
69 You may optionally disable just warnings about the deprecation
70 of the Options object and its related functions as follows:
72 SetOption('warn', 'no-deprecated-options')
74 The current plan is for these warnings to become mandatory
75 (non-suppressible) in release 1.3.0, and for the use of Options
76 and its related functions to generate errors in release 2.0.
78 Please note the following important changes since release 0.98.4:
80 -- scons.bat NOW RETURNS THE REAL SCONS EXIT STATUS
82 The scons.bat script shipped with SCons used to exit with
83 a status of 1 when it detected any failed (non-zero) exit
84 status from the underlying Python execution of SCons itself.
85 The scons.bat script now exits with the actual status
88 -- SCONS NOW WARNS WHEN TRYING TO LINK C++ AND FORTRAN OBJECT FILES
90 Some C++ toolchains do not understand Fortran runtimes and create
91 unpredictable executables when linking C++ and Fortran object
92 files together. SCons now issues a warning if you try to link
93 C++ and Fortran object files into the same executable:
95 scons: warning: Using $CXX to link Fortran and C++ code together.
96 This may generate a buggy executable if the '/usr/bin/gcc'
97 compiler does not know how to deal with Fortran runtimes.
99 The warning may be suppressed with either the --warning=no-link
100 or --warning=no-fortran-cxx-mix command line options, or by
101 adding either of the following lines to a SConscript file:
103 SetOption('warn', 'no-link')
104 SetOption('warn', 'no-fortran-cxx-mix')
106 Please note the following important changes since release 0.98:
108 -- SCONS NO LONGER SETS THE GNU TOOLCHAIN -fPIC FLAG IN $SHCXXFLAGS
110 The GNU toolchain support in previous versions of SCons would
111 add the -fPIC flag to the $SHCXXFLAGS construction variable.
112 The -fPIC flag has been now been removed from the default
113 $SHCXXFLAGS setting. Instead, the $SHCXXCOM construction variable
114 (the default SCons command line for compiling shared objects
115 from C++ source files) has been changed to add the $SHCCFLAGS
116 variable, which contains the -fPIC flag.
118 This change was made in order to make the behavior of the default
119 C++ compilation line including $SHCCFLAGS consistent with the
120 default C compilation line including $CCFLAGS.
122 This change should have no impact on configurations that use
123 the default $SHCXXCOM command line. It may have an impact on
124 configurations that were using the default $SHCXXFLAGS value
125 *without* the $SHCCFLAGS variable to get the -fPIC flag into a
126 custom command line. You can fix these by adding the $SHCCFLAGS
127 to the custom command line.
129 Adding $SHCCFLAGS is backwards compatible with older SCons
130 releases, although it might cause the -fPIC flag to be repeated
131 on the command line if you execute it on an older version of
132 SCons that sets -fPIC in both the $SHCCLAFGS and $SHCXXFLAGS
133 variables. Duplicating the -fPIC flag on the g++ command line
134 will not cause any compilation problems, but the change to the
135 command line may cause SCons to rebuild object files.
137 -- FORTRAN NOW COMPILES .f FILES WITH gfortran BY DEFAULT
139 The Fortran Tool modules have had a major overhaul with the intent
140 of making them work as-is for most configurations. In general,
141 most configurations that use default settings should not see
142 any noticeable difference.
144 One configuration that has changed is if you have both a gfortran
145 and g77 compiler installed. In this case, previous versions of
146 SCons would, by default, use g77 by default to compile files with
147 a .f suffix, while SCons 0.98.1 will use the gfortran compiler
148 by default. The old behavior may be preserved by explicitly
149 initializing construction environments with the 'g77' Tool module:
151 env = Environment(tools = ['g77', 'default'])
153 The above code is backwards compatible to older versions of SCons.
155 If you notice any other changes in the behavior of default
156 Fortran support, please let us know so we can document them in
157 these release notes for other users.
159 Please note the following important changes since release 0.97.0d20071212:
161 -- SUPPORT FOR PYTHON VERSIONS BEFORE 2.2 IS NOW DEPRECATED
163 SCons now prints the following warning when it is run by any
164 Python 1.5, 2.0 or 2.1 release or sub-release:
166 scons: warning: Support for pre-2.2 Python (VERSION) is deprecated.
167 If this will cause hardship, contact dev@scons.tigris.org.
169 You may disable all warnings about deprecated features by adding
170 the option "--warn=no-deprecated" to the command line or to the
171 $SCONSFLAGS environment variable:
173 $ scons --warn=no-deprecated
175 Using '--warn=no-deprecated' is compatible with earlier versions
178 You may also, as of this version of SCons, disable all warnings
179 about deprecated features by adding the following to any
182 SetOption('warn', 'no-deprecated')
184 You may disable only the specific warning about running under
185 a deprecated Python version by adding the following to any
188 SetOption('warn', 'no-python-version')
190 The warning may also be suppressed on the command line:
192 $ scons --warn=no-python-version
194 Or by specifying the --warn=no-python-version option in the
195 $SCONSFLAGS environment variable.
197 Using SetOption('warn', ...), and the 'no-python-version'
198 command-line option for suppressing this specific warning,
199 are *not* backwards-compatible to earlier versions of SCons.
201 -- THE env.Copy() METHOD IS NOW OFFICIALLY DEPRECATED
203 The env.Copy() method is now officially deprecated and will
204 be removed in a future release. Using the env.Copy() method
205 now generates the following message:
207 scons: warning: The env.Copy() method is deprecated; use the env.Clone() method instead.
209 You may disable all warnings about deprecated features by adding
210 the option "--warn=no-deprecated" to the command line or to the
211 $SCONSFLAGS environment variable:
213 $ scons --warn=no-deprecated
215 Using '--warn=no-deprecated' is compatible with earlier versions
218 You may also, as of this version of SCons, disable all warnings
219 about deprecated features by adding the following to any
222 SetOption('warn', 'no-deprecated')
224 You may disable only the specific warning about the deprecated
225 env.Copy() method by adding the following to any SConscript
228 SetOption('warn', 'no-deprecated-copy')
230 The warning may also be suppressed on the command line:
232 $ scons --warn=no-deprecated-copy
234 Or by specifying the --warn=no-deprecated-copy option in the
235 $SCONSFLAGS environment variable.
237 Using SetOption('warn', ...), and the 'no-deprecated-copy'
238 command-line option for suppressing this specific warning,
239 are *not* backwards-compatible to earlier versions of SCons.
241 -- THE --debug=dtree, --debug=stree AND --debug=tree OPTIONS ARE DEPRECATED
243 The --debug=dtree, --debug=stree and --debug=tree methods
244 are now officially deprecated and will be removed in a
245 future release. Using these options now generate a warning
246 message recommending use of the --tree=derived, --tree=all,status
247 and --tree=all options, respectively.
249 You may disable these warnings, and all warnings about
250 deprecated features, by adding the option "--warn=no-deprecated"
251 to the command line or to the $SCONSFLAGS environment
254 $ scons --warn=no-deprecated
256 Using '--warn=no-deprecated' is compatible with earlier versions
259 -- THE TargetSignatures() AND SourceSignatures() FUNCTIONS ARE DEPRECATED
261 The TargetSignatures() and SourceSignatures() functions,
262 and their corresponding env.TargetSignatures() and
263 env.SourceSignatures() methods, are now officially deprecated
264 and will be be removed in a future release. Using ahy of
265 these functions or methods now generates a message
266 similar to the following:
268 scons: warning: The env.TargetSignatures() method is deprecated;
269 convert your build to use the env.Decider() method instead.
271 You may disable all warnings about deprecated features by adding
272 the option "--warn=no-deprecated" to the command line or to the
273 $SCONSFLAGS environment variable:
275 $ scons --warn=no-deprecated
277 Using '--warn=no-deprecated' is compatible with earlier versions
280 You may also, as of this version of SCons, disable all warnings
281 about deprecated features by adding the following to any
284 SetOption('warn', 'no-deprecated')
286 You may disable only the specific warning about the use of
287 TargetSignatures() or SourceSignatures() by adding the
288 following to any SConscript file:
290 SetOption('warn', 'no-deprecated-target-signatures')
291 SetOption('warn', 'no-deprecated-source-signatures')
293 The warnings may also be suppressed on the command line:
295 $ scons --warn=no-deprecated-target-signatures --warn=no-deprecated-source-signatures
297 Or by specifying these options in the $SCONSFLAGS environment
300 Using SetOption('warn', ...), or the command-line options
301 for suppressing these warnings, is *not* backwards-compatible
302 to earlier versions of SCons.
304 -- File(), Dir() and Entry() NOW RETURN A LIST WHEN THE INPUT IS A SEQUENCE
306 Previously, if these methods were passed a list, the list was
307 substituted and stringified, then passed as a single string to
308 create a File/Dir/Entry Node. This rarely if ever worked with
309 more than one element in the list. They now return a list of
310 Nodes when passed a list.
312 One case that works differently now is a passing in a
313 single-element sequence; that formerly was stringified
314 (returning its only element) and then a single Node would be
315 returned. Now a single-element list containing the Node will
316 be returned, for consistency.
318 -- THE env.subst() METHOD NOW RETURNS A LIST WHEN THE INPUT IS A SEQUENCE
320 The env.subst() method now returns a list with the elements
321 expanded when given a list as input. Previously, the env.subst()
322 method would always turn its result into a string.
324 This behavior was changed because it interfered with being able
325 to include things like lists within the expansion of variables
326 like $CPPPATH and then have SCons understand that the elements
327 of the "internal" lists still needed to be treated separately.
328 This would cause a $CPPPATH list like ['subdir1', 'subdir']
329 to show up in a command line as "-Isubdir1 subdir".
331 -- THE Jar() BUILDER NOW USES THE Java() BUILDER CLASSDIR BY DEFAULT
333 By default, the Jar() Builder will now use the class directory
334 specified when the Java() builder is called. So the following
337 classes = env.Java('classes', 'src')
338 env.Jar('out.jar', classes)
340 Will cause "-C classes" to be passed the "jar" command invocation,
341 and the Java classes in the "out.jar" file will not be prefixed
344 Explicitly setting the $JARCHDIR variable overrides this default
345 behavior. The old behavior of not passing any -C option to the
346 "jar" command can be preserved by explicitly setting $JARCHDIR
349 env = Environment(JARCHDIR = None)
351 The above setting is compatible with older versions of SCons.
353 Please note the following important changes since release 0.97.0d20070918:
355 -- SCons REDEFINES PYTHON open() AND file() ON Windows TO NOT PASS
356 ON OPEN FILE HANDLES TO CREATED PROCESSES
358 On Windows systems, SCons now redefines the Python open()
359 and file() functions so that, if the Python Win32 extensions
360 are available, the file handles for any opened files will *not*
361 be inherited by subprocesses, such as the spawned compilers and
362 other tools invoked to build the software.
364 This prevents certain race conditions where a file handle for
365 a file opened by Python (either in a Python function action,
366 or directly in a SConscript file) could be inherited and help
367 open by a subprocess, interfering with the ability of other
368 processes to create or modify the file.
370 In general, this should not cause problems for the vast majority
371 of configurations. The only time this would be a problem would be
372 in the unlikely event that a process spawned by SCons specifically
373 *expected* to use an inherited file handle opened by SCons.
375 If the Python Win32 extensions are not installed or are an
376 earlier version that does not have the ability to disable file
377 handle inheritance, SCons will print a warning message when the
378 -j option is used. The warning message may be suppressed by
379 specifying --warn=no-parallel-support.
381 Please note the following important changes since release 0.97.0d20070809:
383 -- "content" SIGNATURES ARE NOW THE DEFAULT BEHAVIOR
385 The default behavior of SCons is now to use the MD5 checksum of
386 all file contents to decide if any files have changed and should
387 cause rebuilds of their source files. This means that SCons may
388 decide not to rebuild "downstream" targets if a a given input
389 file is rebuilt to the exact same contents as the last time.
390 The old behavior may preserved by explicity specifying:
392 TargetSignatures("build")
394 In any of your SConscript files.
396 -- TARGETS NOW IMPLICITLY DEPEND ON THE COMMAND THAT BUILDS THEM
398 For all targets built by calling external commands (such as a
399 compiler or other utility), SCons now adds an implicit dependency
400 on the command(s) used to build the target.
402 This will cause rebuilds of all targets built by external commands
403 when running SCons in a tree built by previous version of SCons,
404 in order to update the recorded signatures.
406 The old behavior of not having targets depend on the external
407 commands that build them can be preserved by setting a new
408 $IMPLICIT_COMMAND_DEPENDENCIES construction variable to a
411 env = Environment(IMPLICIT_COMMAND_DEPENDENCIES = 0)
413 or by adding Ignore() calls for any targets where the behavior
416 Ignore('/usr/bin/gcc', 'foo.o')
418 Both of these settings are compatible with older versions
421 -- CHANGING SourceSignature() MAY CAUSE "UNECESSARY" REBUILDS
423 If you change the SourceSignature() value from 'timestamp' to
424 'MD5', SCons will now rebuild targets that were already up-to-date
425 with respect to their source files.
427 This will happen because SCons did not record the content
428 signatures of the input source files when the target was last
429 built--it only recorded the timestamps--and it must record them
430 to make sure the signature information is correct. However,
431 the content of source files may have changed since the last
432 timestamp build was performed, and SCons would not have any way to
433 verify that. (It would have had to open up the file and record
434 a content signature, which is one of the things you're trying to
435 avoid by specifying use of timestamps....) So in order to make
436 sure the built targets reflect the contents of the source files,
437 the targets must be rebuilt.
439 Change the SourceSignature() value from 'MD5' to 'timestamp'
440 should correctly not rebuild target files, because the timestamp
441 of the files is always recorded.
443 In previous versions of SCons, changing the SourceSignature()
444 value would lead to unpredictable behavior, usually including
447 -- THE Return() FUNCTION NOW ACTUALLY RETURNS IMMEDIATELY
449 The Return() function now immediately stops processing the
450 SConscript file in which it appears and returns the values of the
451 variables named in its arguments. It used to continue processing
452 the rest of the SConscript file, and then return the values of the
453 specified variables at the point the Return() function was called.
455 The old behavior may be requested by adding a "stop=False"
456 keyword argument to the Return() call:
458 Return('value', stop=False)
460 The "stop=" keyword argument is *not* compatible with SCons
461 versions 0.97.0d20070809 or earlier.
463 Please note the following important changes since release 0.97:
465 -- env.CacheDir() NOW ONLY AFFECTS CONSTRUCTION ENVIRONMENT TARGETS
467 The env.CacheDir() method now only causes derived files to be
468 retrieved from the specified cache directory for targets built
469 with the specified specified construction environment ("env").
471 Previously, any call to env.CacheDir() or CacheDir() would modify
472 a global setting and cause all built targets to be retrieved
473 from the specified cache directory. This behavior was changed so
474 that env.CacheDir() would be consistent with other construction
475 environment methods, which only affect targets built with the
476 specified construction environment.
478 The old behavior of changing the global behavior may be preserved
479 by changing any env.CacheDir() calls to:
481 CacheDir('/path/to/cache/directory')
483 The above change is backwards-compatible and works in all earlier
484 versions of SCons that support CacheDir().
486 -- INTERPRETATION OF SUFFIX-LESS SOURCE ARGUMENTS HAS CHANGED
488 The interpretation of source arguments (files) without suffixes
489 has changed in one specific configuration.
491 Previously, if a Builder had a src_suffix specified (indicating
492 that source files without suffixes should have that suffix
493 appended), the suffix would only be applied to suffix-less source
494 arguments if the Builder did *not* have one or more attached
495 source Builders (that is, the Builder was not a "multi-stage"
496 Builder). So in the following configuration:
498 build_foo = Builder(src_suffix = '.foo')
499 build_bar = Builder(src_suffix = '.bar',
500 src_builder = build_bar)
502 env = Environment(BUILDERS = {
507 env.Foo('tgt1', 'src1')
508 env.Bar('tgt2', 'src2')
510 SCons would have expected to find a source file 'src1.foo' for the
511 env.Foo() call, but a source file 'src2' for the env.Bar() call.
513 This behavior has now been made consistent, so that the two
514 above calls would expect source files named 'src1.foo' and
515 'src2.bar', respectively.
517 Note that, if genuinely desired, the old behavior of building
518 from a source file without a suffix at all (when the Builder has
519 a src_suffix *and* a src_builder) can be specified explicity by
520 turning the string into a File Node directly:
522 env.Bar('tgt2', File('src2'))
524 The above use of File() is backwards-compatible and will work
525 on earlier versions of SCons.
527 -- THE DEFAULT EXECUTION PATH FOR Solaris HAS CHANGED
529 On Solaris systems, SCons now adds the "/opt/SUNWspro/bin"
530 directory to the default execution $PATH variable before the
531 "/usr/ccs/bin" directory. This was done to reflect the fact
532 that /opt/SUNWspro/ is the default for SUN tools, but it may
533 cause a different compiler to be used if you have compilers
534 installed in both directories.
536 -- GENERATED config.h FILES NOW SAY "#define HAVE_{FEATURE} 1"
538 When generating a "config.h" file, SCons now defines values that
539 record the existence of a feature with a "1" value:
541 #define HAVE_FEATURE 1
543 Instead of printing the line without a "1", as it used to:
547 This should not cause any problems in the normal use of "#ifdef
548 HAVE_{FEATURE}" statements interpreted by a C preprocessor, but
549 might cause a compatibility issue if a script or other utility
550 looks for an exact match of the previous text.
552 Please note the following planned, future changes:
554 -- THE Options OBJECT AND RELATED FUNCTIONS WILL BE DEPRECATED
556 The Options object is being replaced by a new Variables
557 object, which uses a new Variables.AddVariable() method
558 where the previous interface used Options.AddOptions().
560 Similarly, the following utility functions are being replaced
561 by the following similarly-named functions:
563 BoolOption() BoolVariable()
564 EnumOption() EnumVariable()
565 ListOption() ListVariable()
566 PackageOption() PackageVariable()
567 PathOption() PathVariable()
569 And also related, the options= keyword argument when creating
570 construction environments with the Environment() functions is
571 being replaced with a variables= keyword argument.
573 In some future release a deprecation warning will be added to
574 existing uses of the Options object, its methods, the above
575 utility functions, and the options= keyword argument of the
576 Environment() function. At some point after the deprecation
577 warning is added, the Options object, related functions and
578 options= keyword argument will be removed entirely.
580 You can prepare for this by changing all your uses of the Options
581 object and related functions to the Variables object and the new
582 function names, and changing any uses of the options= keyword
583 argument to variables=.
585 NOTE: CONVERTING TO USING THE NEW Variables OBJECT OR THE
586 RELATED *Variable() FUNCTIONS, OR USING THE NEW variable=
587 KEYWORD ARGUMENT, IS NOT BACKWARDS COMPATIBLE TO VERSIONS OF
588 SCons BEFORE 0.98. YOUR SConscript FILES WILL NOT WORK ON
589 EARLIER VERSIONS OF SCons AFTER MAKING THIS CHANGE.
591 If you change SConscript files in software that you make available
592 for download or otherwise distribute, other users may try to
593 build your software with an earlier version of SCons that does
594 not have the Variables object or related *Variable() functions.
595 We recommend preparing for this in one of two ways:
597 -- Make your SConscript files backwards-compatible by
598 modifying your calls with Python try:-except: blocks
602 vars = Variables('custom.py', ARGUMENTS)
604 BoolVariable('WARNINGS', 'cmopile with -Wall', 1),
605 EnumVariable('DEBUG', 'debug version', 'no'
606 allowed_values=('yes', 'no', 'full'),
607 map={}, ignorecase=0),
608 ListVariable('SHAREDLIBS',
609 'libraries to build shared',
611 names = list_of_libs),
612 PackageVariable('X11',
615 PathVariable('QTDIR', 'root of Qt', qtdir),
618 vars = Options('custom.py', ARGUMENTS)
620 BoolOption('WARNINGS', 'cmopile with -Wall', 1),
621 EnumOption('DEBUG', 'debug version', 'no'
622 allowed_values=('yes', 'no', 'full'),
623 map={}, ignorecase=0),
624 ListOption('SHAREDLIBS',
625 'libraries to build shared',
627 names = list_of_libs),
631 PathOption('QTDIR', 'root of Qt', qtdir),
634 Additionally, you can check for availability of the new
635 variables= keyword argument as follows:
638 env = Environment(variables=vars)
640 env = Environment(options=vars)
642 (Note that we plan to maintain the existing Options object
643 name for some time, to ensure backwards compatibility,
644 so in practice it may be easier to just continue to use
645 the old name until you're reasonably sure you won't have
646 people trying to build your software with versions of
647 SCons earlier than 0.98.1.)
649 -- Use the EnsureSConsVersion() function to provide a
650 descriptive error message if your SConscript files
651 are executed by an earlier version of SCons:
653 EnsureSConsVersion(0, 98, 1)
655 -- THE BuildDir() METHOD AND FUNCTION WILL BE DEPRECATED
657 The env.BuildDir() method and BuildDir() function are being
658 replaced by the new env.VariantDir() method and VariantDir()
661 In some future release a deprecation warning will be added
662 to existing uses of the env.BuildDir() method and BuildDir()
663 function. At some point after the deprecation warning, the
664 env.Builder() method and BuildDir() function will either
665 be removed entirely or have their behavior changed.
667 You can prepare for this by changing all your uses of the
668 env.BuildDir() method to env.VariantDir() and uses of the
669 global BuildDir() function to VariantDir(). If you use a
670 named keyword argument of "build_dir" when calling
671 env.BuildDir() or BuildDir():
673 env.BuildDir(build_dir='opt', src_dir='src')
675 The keyword must be changed to "variant_dir":
677 env.VariantDir(variant_dir='opt', src_dir='src')
679 NOTE: CHANGING USES OF env.BuildDir() AND BuildDir() to
680 env.VariantDir() AND VariantDir() IS NOT BACKWARDS COMPATIBLE
681 TO VERSIONS OF SCons BEFORE 0.98. YOUR SConscript FILES
682 WILL NOT WORK ON EARLIER VERSIONS OF SCons AFTER MAKING
685 If you change SConscript files in software that you make
686 available for download or otherwise distribute, other users
687 may try to build your software with an earlier version of
688 SCons that does not have the env.VariantDir() method or
689 VariantDir() fnction. We recommend preparing for this in
692 -- Make your SConscript files backwards-compatible by
693 including the following code near the beginning of your
694 top-level SConstruct file:
696 import SCons.Environment
698 SCons.Environment.Environment.VariantDir
699 except AttributeError:
700 SCons.Environment.Environment.VariantDir = \
701 SCons.Environment.Environment.BuildDir
703 -- Use the EnsureSConsVersion() function to provide a
704 descriptive error message if your SConscript files
705 are executed by an earlier version of SCons:
707 EnsureSConsVersion(0, 98)
709 -- THE SConscript() "build_dir" KEYWORD ARGUMENT WILL BE DEPRECATED
711 The "build_dir" keyword argument of the SConscript function
712 and env.SConscript() method are being replaced by a new
713 "variant_dir" keyword argument.
715 In some future release a deprecation warning will be added
716 to existing uses of the SConscript()/env.SConscript()
717 "build_dir" keyword argument. At some point after the
718 deprecation warning, support for this keyword argument will
721 You can prepare for this by changing all your uses of the
722 SConscript()/env.SConscript() 'build_dir" keyword argument:
724 SConscript('src/SConscript', build_dir='opt')
726 To use the new "variant_dir" keyword argument:
728 SConscript('src/SConscript', variant_dir='opt')
730 NOTE: USING THE NEW "variant_dir" KEYWORD IS NOT BACKWARDS
731 COMPATIBLE TO VERSIONS OF SCons BEFORE 0.98. YOUR SConscript
732 FILES WILL NOT WORK ON EARLIER VERSIONS OF SCons AFTER
735 If you change SConscript files in software that you make
736 available for download or otherwise distribute, other users
737 may try to build your software with an earlier version of
738 SCons that does not support the "variant_dir" keyword.
740 If you can insist that users use a recent version of SCons
741 that supports "variant_dir", we recommend using the
742 EnsureSConsVersion() function to provide a descriptive error
743 message if your SConscript files are executed by an earlier
746 EnsureSConsVersion(0, 98)
748 If you want to make sure that your SConscript files will
749 still work with earlier versions of SCons, then your best
750 bet is to continue to use the "build_dir" keyword until the
751 support is removed (which, in all likelihood, won't happen
752 for quite some time).
754 -- SCANNER NAMES HAVE BEEN DEPRECATED AND WILL BE REMOVED
756 Several internal variable names in SCons.Defaults for various
757 pre-made default Scanner objects have been deprecated and will
758 be removed in a future revision. In their place are several new
759 global variable names that are now part of the publicly-supported
762 NEW NAME DEPRECATED NAME
763 -------- ----------------------------
764 CScanner SCons.Defaults.CScan
765 DSCanner SCons.Defaults.DScan
766 SourceFileScanner SCons.Defaults.ObjSourceScan
767 ProgramScanner SCons.Defaults.ProgScan
769 Of these, only ObjSourceScan was probably used at all, to add
770 new mappings of file suffixes to other scanners for use by the
771 Object() Builder. This should now be done as follows:
773 SourceFileScanner.add_scanner('.x', XScanner)
775 -- THE env.Copy() METHOD WILL CHANGE OR GO AWAY ENTIRELY
777 The env.Copy() method (to make a copy of a construction
778 environment) is being replaced by the env.Clone() method.
780 As of SCons 0.98, a deprecation warning has been added to
781 current uses of the env.Copy() method. At some point in
782 the future, the env.Copy() method will either be removed
783 entirely or have its behavior changed.
785 You can prepare for this by changing all your uses of env.Copy()
786 to env.Clone(), which has the exact same calling arguments.
788 NOTE: CHANGING USES OF env.Copy() TO env.Clone() WILL MAKE
789 YOUR SConscript FILES NOT WORK ON VERSIONS OF SCons BEFORE
792 If you change SConscript files in software that you make
793 available for download or otherwise distribute, other users
794 may try to build your software with an earlier version of
795 SCons that does not have the env.Clone() method. We recommend
796 preparing for this in one of two ways:
798 -- Make your SConscript files backwards-compatible by
799 including the following code near the beginning of your
800 top-level SConstruct file:
802 import SCons.Environment
804 SCons.Environment.Environment.Clone
805 except AttributeError:
806 SCons.Environment.Environment.Clone = \
807 SCons.Environment.Environment.Copy
809 -- Use the EnsureSConsVersion() function to provide a
810 descriptive error message if your SConscript files
811 are executed by an earlier version of SCons:
813 EnsureSConsVersion(0, 96, 93)
815 SCons is developed with an extensive regression test suite, and a
816 rigorous development methodology for continually improving that suite.
817 Because of this, SCons is of sufficient quality that you can use it
820 The interfaces in release 1.0 will *not* be knowingly changed in
821 any new, future 1.x release. If an interface change should ever
822 become necessary due to extraordinary circumstances, the change
823 and an appropriate transition strategy will be documented in these
826 As you use SCons, please heed the following:
828 - Please report any bugs or other problems that you find to our bug
829 tracker at our SourceForge project page:
831 http://sourceforge.net/tracker/?func=add&group_id=30337&atid=398971
833 We have a reliable bug-fixing methodology already in place and
834 strive to respond to problems relatively quickly.
836 - Documentation is spottier than we'd like. You may need to dive
837 into the source code to figure out how to do something. Asking
838 questions on the scons-users mailing list is also welcome. We
839 will be addressing the documentation in upcoming releases, but
840 would be more than glad to have your assistance in correcting this
843 - The "SCons Design" documentation on the SCons web site is very
844 out of date, as we made significant changes to portions of the
845 interface as we figured out what worked and what didn't during the
846 extensive beta implementation. The "SCons Design" document should
847 be used only for historical purposes, or for just an extremely
848 general understanding of SCons' architectural goals.
850 - There may be performance issues. Improving SCons performance
851 is an ongoing priority. If you still find the performance
852 unacceptable, we would very much like to hear from you and learn
853 more about your configuration so we can optimize the right things.
855 - Error messages don't always exist where they'd be helpful.
856 Please let us know about any errors you ran into that would
857 have benefitted from a (more) descriptive message.
859 KNOWN PROBLEMS IN THIS RELEASE:
861 For a complete list of known problems, consult the SCons Issue Tracker
864 http://scons.tigris.org/project_issues.html
866 - Support for parallel builds (-j) does not work on WIN32 systems
867 prior to *official* Python release 2.2 (not 2.2 pre-releases).
869 Prior to Python 2.2, there is a bug in Python's Win32
870 implementation such that when a thread spawns an external command,
871 it blocks all threads from running. This breaks the SCons
872 multithreading architecture used to support -j builds.
874 We have included a patch file, os_spawnv_fix.diff, that you can
875 use if you you want to fix your version of Python to support
876 parallel builds in SCons.
878 - Again, the "SCons Design" documentation on the SCons web site is
879 out of date. Take what you read there with a grain of salt.
881 - On Win32 systems, you must put a space between the redirection
882 characters < and >, and the specified files (or construction
883 variable expansions):
885 command < $SOURCE > $TARGET
887 If you don't supply a space (for example, "<$SOURCE"), SCons will
888 not recognize the redirection.
890 - MSVC .res files are not rebuilt when icons change.
892 - The -c option does not clean up .sconsign files or directories
893 created as part of the build, and also does not clean up
894 SideEffect files (for example, Visual Studio .pdb files).
896 - When using multiple Repositories, changing the name of an include
897 file can cause an old version of the file to be used.
899 - There is currently no way to force use of a relative path (../*)
900 for directories outside the top-level SConstruct file.
902 - The Jar() Builder will, on its second or subsequent invocation,
903 package up the .sconsign files that SCons uses to track signatures.
904 You can work around this by using the SConsignFile() function
905 to collect all of the .sconsign information into a single file
906 outside of the directory being packaged by Jar().
908 - SCons does not currently have a way to detect that an intermediate
909 file has been corrupted from outside and should be rebuilt.
911 - Unicode characters in path names do not work in all circumstances.
913 - SCons does not currently automatically check out SConstruct or
914 SConscript files from SCCS, RCS or BitKeeper.
916 - No support yet for the following planned command-line options:
918 -d -e -l --list-actions --list-derived --list-where
919 -o --override -p -r -R -w --write-filenames
920 -W --warn-undefined-variables
924 Thank you for your interest, and please let us know how we can help
925 improve SCons for your needs.
928 knight at baldmt dot com
929 http://www.baldmt.com/~knight/
931 With plenty of help from the SCons Development team: