1SCONS(1) General Commands Manual SCONS(1)
2
3
4
6 scons - a software construction tool
7
9 scons [ options... ] [ name=val... ] [ targets... ]
10
12 The scons utility builds software (or other files) by determining which
13 component pieces must be rebuilt and executing the necessary commands
14 to rebuild them.
15
16 By default, scons searches for a file named SConstruct, Sconstruct, or
17 sconstruct (in that order) in the current directory and reads its con‐
18 figuration from the first file found. An alternate file name may be
19 specified via the -f option.
20
21 The SConstruct file can specify subsidiary configuration files using
22 the SConscript() function. By convention, these subsidiary files are
23 named SConscript, although any name may be used. (Because of this nam‐
24 ing convention, the term "SConscript files" is sometimes used to refer
25 generically to all scons configuration files, regardless of actual file
26 name.)
27
28 The configuration files specify the target files to be built, and
29 (optionally) the rules to build those targets. Reasonable default
30 rules exist for building common software components (executable pro‐
31 grams, object files, libraries), so that for most software projects,
32 only the target and input files need be specified.
33
34 Before reading the SConstruct file, scons adds looks for a dir named
35 site_scons in the dir containing the SConstruct file; it adds that
36 site_scons to sys.path, reads the file site_scons/site_init.py, and
37 adds the directory site_scons/site_tools to the default toolpath, if
38 those exist. See the --no-site-dir and --site-dir options for more
39 details.
40
41 scons reads and executes the SConscript files as Python scripts, so you
42 may use normal Python scripting capabilities (such as flow control,
43 data manipulation, and imported Python libraries) to handle complicated
44 build situations. scons, however, reads and executes all of the SCon‐
45 script files before it begins building any targets. To make this obvi‐
46 ous, scons prints the following messages about what it is doing:
47
48 $ scons foo.out
49 scons: Reading SConscript files ...
50 scons: done reading SConscript files.
51 scons: Building targets ...
52 cp foo.in foo.out
53 scons: done building targets.
54 $
55
56 The status messages (everything except the line that reads "cp
57 foo.in foo.out") may be suppressed using the -Q option.
58
59 scons does not automatically propagate the external environment
60 used to execute scons to the commands used to build target
61 files. This is so that builds will be guaranteed repeatable
62 regardless of the environment variables set at the time scons is
63 invoked. This also means that if the compiler or other commands
64 that you want to use to build your target files are not in stan‐
65 dard system locations, scons will not find them unless you
66 explicitly set the PATH to include those locations. Whenever
67 you create an scons construction environment, you can propagate
68 the value of PATH from your external environment as follows:
69
70 import os
71 env = Environment(ENV = {'PATH' : os.environ['PATH']})
72
73 Similarly, if the commands use external environment vari‐
74 ables like $PATH, $HOME, $JAVA_HOME, $LANG, $SHELL,
75 $TERM, etc., these variables can also be explicitly prop‐
76 agated:
77
78 import os
79 env = Environment(ENV = {'PATH' : os.environ['PATH'],
80 'HOME' : os.environ['HOME']})
81
82 Or you may explicitly propagate the invoking
83 user's complete external environment:
84
85 import os
86 env = Environment(ENV = os.environ)
87
88 This comes at the expense of making your
89 build dependent on the user's environment
90 being set correctly, but it may be more
91 convenient for many configurations.
92
93 scons can scan known input files automati‐
94 cally for dependency information (for exam‐
95 ple, #include statements in C or C++ files)
96 and will rebuild dependent files appropri‐
97 ately whenever any "included" input file
98 changes. scons supports the ability to
99 define new scanners for unknown input file
100 types.
101
102 scons knows how to fetch files automati‐
103 cally from SCCS or RCS subdirectories using
104 SCCS, RCS or BitKeeper.
105
106 scons is normally executed in a top-level
107 directory containing a SConstruct file,
108 optionally specifying as command-line argu‐
109 ments the target file or files to be built.
110
111 By default, the command
112
113 scons
114
115 will build all target files in or
116 below the current directory.
117 Explicit default targets (to be
118 built when no targets are specified
119 on the command line) may be defined
120 the SConscript file(s) using the
121 Default() function, described below.
122
123 Even when Default() targets are
124 specified in the SConscript file(s),
125 all target files in or below the
126 current directory may be built by
127 explicitly specifying the current
128 directory (.) as a command-line
129 target:
130
131 scons .
132
133 Building all target files,
134 including any files outside
135 of the current directory, may
136 be specified by supplying a
137 command-line target of the
138 root directory (on POSIX sys‐
139 tems):
140
141 scons /
142
143 or the path name(s) of
144 the volume(s) in which
145 all the targets should
146 be built (on Windows
147 systems):
148
149 scons C:\ D:\
150
151 To build only
152 specific tar‐
153 gets, supply
154 them as com‐
155 mand-line argu‐
156 ments:
157
158 scons foo bar
159
160 in which
161 case
162 only the
163 speci‐
164 fied
165 targets
166 will be
167 built
168 (along
169 with any
170 derived
171 files on
172 which
173 they
174 depend).
175
176 Specify‐
177 ing
178 "cleanup"
179 targets
180 in SCon‐
181 script
182 files is
183 not usu‐
184 ally
185 neces‐
186 sary.
187 The -c
188 flag
189 removes
190 all
191 files
192 neces‐
193 sary to
194 build
195 the
196 speci‐
197 fied
198 target:
199
200 scons -c .
201
202 to
203 remove
204 all
205 tar‐
206 get
207 files,
208 or:
209
210 scons -c build export
211
212 to
213 remove
214 tar‐
215 get
216 files
217 under
218 build
219 and
220 export.
221 Addi‐
222 tional
223 files
224 or
225 direc‐
226 to‐
227 ries
228 to
229 remove
230 can
231 be
232 spec‐
233 i‐
234 fied
235 using
236 the
237 Clean()
238 func‐
239 tion.
240 Con‐
241 versely,
242 tar‐
243 gets
244 that
245 would
246 nor‐
247 mally
248 be
249 removed
250 by
251 the
252 -c
253 invo‐
254 ca‐
255 tion
256 can
257 be
258 pre‐
259 vented
260 from
261 being
262 removed
263 by
264 using
265 the
266 NoClean()
267 func‐
268 tion.
269
270 A
271 sub‐
272 set
273 of
274 a
275 hier‐
276 ar‐
277 chi‐
278 cal
279 tree
280 may
281 be
282 built
283 by
284 remain‐
285 ing
286 at
287 the
288 top-
289 level
290 direc‐
291 tory
292 (where
293 the
294 SCon‐
295 struct
296 file
297 lives)
298 and
299 spec‐
300 i‐
301 fy‐
302 ing
303 the
304 sub‐
305 di‐
306 rec‐
307 tory
308 as
309 the
310 tar‐
311 get
312 to
313 be
314 built:
315
316 scons src/subdir
317
318 or
319 by
320 chang‐
321 ing
322 direc‐
323 tory
324 and
325 invok‐
326 ing
327 scons
328 with
329 the
330 -u
331 option,
332 which
333 tra‐
334 verses
335 up
336 the
337 direc‐
338 tory
339 hier‐
340 ar‐
341 chy
342 until
343 it
344 finds
345 the
346 SCon‐
347 struct
348 file,
349 and
350 then
351 builds
352 tar‐
353 gets
354 rel‐
355 a‐
356 tively
357 to
358 the
359 cur‐
360 rent
361 sub‐
362 di‐
363 rec‐
364 tory:
365
366 cd src/subdir
367 scons -u .
368
369 scons
370 sup‐
371 ports
372 build‐
373 ing
374 mul‐
375 ti‐
376 ple
377 tar‐
378 gets
379 in
380 par‐
381 al‐
382 lel
383 via
384 a
385 -j
386 option
387 that
388 takes,
389 as
390 its
391 argu‐
392 ment,
393 the
394 num‐
395 ber
396 of
397 simul‐
398 ta‐
399 ne‐
400 ous
401 tasks
402 that
403 may
404 be
405 spawned:
406
407 scons -j 4
408
409 builds
410 four
411 tar‐
412 gets
413 in
414 par‐
415 al‐
416 lel,
417 for
418 exam‐
419 ple.
420
421 scons
422 can
423 main‐
424 tain
425 a
426 cache
427 of
428 tar‐
429 get
430 (derived)
431 files
432 that
433 can
434 be
435 shared
436 between
437 mul‐
438 ti‐
439 ple
440 builds.
441 When
442 caching
443 is
444 enabled
445 in
446 a
447 SCon‐
448 script
449 file,
450 any
451 tar‐
452 get
453 files
454 built
455 by
456 scons
457 will
458 be
459 copied
460 to
461 the
462 cache.
463 If
464 an
465 up-
466 to-
467 date
468 tar‐
469 get
470 file
471 is
472 found
473 in
474 the
475 cache,
476 it
477 will
478 be
479 retrieved
480 from
481 the
482 cache
483 instead
484 of
485 being
486 rebuilt
487 locally.
488 Caching
489 behav‐
490 ior
491 may
492 be
493 dis‐
494 abled
495 and
496 con‐
497 trolled
498 in
499 other
500 ways
501 by
502 the
503 --cache-
504 force,
505 --cache-
506 dis‐
507 able,
508 and
509 --cache-
510 show
511 com‐
512 mand-
513 line
514 options.
515 The
516 --ran‐
517 dom
518 option
519 is
520 use‐
521 ful
522 to
523 pre‐
524 vent
525 mul‐
526 ti‐
527 ple
528 builds
529 from
530 try‐
531 ing
532 to
533 update
534 the
535 cache
536 simul‐
537 ta‐
538 ne‐
539 ously.
540
541 Val‐
542 ues
543 of
544 vari‐
545 ables
546 to
547 be
548 passed
549 to
550 the
551 SCon‐
552 script
553 file(s)
554 may
555 be
556 spec‐
557 i‐
558 fied
559 on
560 the
561 com‐
562 mand
563 line:
564
565 scons debug=1 .
566
567 These
568 vari‐
569 ables
570 are
571 avail‐
572 able
573 in
574 SCon‐
575 script
576 files
577 through
578 the
579 ARGU‐
580 MENTS
581 dic‐
582 tio‐
583 nary,
584 and
585 can
586 be
587 used
588 in
589 the
590 SCon‐
591 script
592 file(s)
593 to
594 mod‐
595 ify
596 the
597 build
598 in
599 any
600 way:
601
602 if ARGUMENTS.get('debug', 0):
603 env = Environment(CCFLAGS = '-g')
604 else:
605 env = Environment()
606
607 The
608 com‐
609 mand-
610 line
611 vari‐
612 able
613 argu‐
614 ments
615 are
616 also
617 avail‐
618 able
619 in
620 the
621 ARGLIST
622 list,
623 indexed
624 by
625 their
626 order
627 on
628 the
629 com‐
630 mand
631 line.
632 This
633 allows
634 you
635 to
636 process
637 them
638 in
639 order
640 rather
641 than
642 by
643 name,
644 if
645 nec‐
646 es‐
647 sary.
648 ARGLIST[0]
649 returns
650 a
651 tuple
652 con‐
653 tain‐
654 ing
655 (argname,
656 argvalue).
657 A
658 Python
659 excep‐
660 tion
661 is
662 thrown
663 if
664 you
665 try
666 to
667 access
668 a
669 list
670 mem‐
671 ber
672 that
673 does
674 not
675 exist.
676
677 scons
678 requires
679 Python
680 ver‐
681 sion
682 1.5.2
683 or
684 later.
685 There
686 should
687 be
688 no
689 other
690 depen‐
691 den‐
692 cies
693 or
694 require‐
695 ments
696 to
697 run
698 scons.
699
700 By
701 default,
702 scons
703 knows
704 how
705 to
706 search
707 for
708 avail‐
709 able
710 pro‐
711 gram‐
712 ming
713 tools
714 on
715 var‐
716 i‐
717 ous
718 sys‐
719 tems.
720 On
721 Win‐
722 dows
723 sys‐
724 tems,
725 scons
726 searches
727 in
728 order
729 for
730 the
731 Mi‐
732 cro‐
733 soft
734 Vis‐
735 ual
736 C++
737 tools,
738 the
739 MinGW
740 tool
741 chain,
742 the
743 Intel
744 com‐
745 piler
746 tools,
747 and
748 the
749 Phar‐
750 Lap
751 ETS
752 com‐
753 piler.
754 On
755 OS/2
756 sys‐
757 tems,
758 scons
759 searches
760 in
761 order
762 for
763 the
764 OS/2
765 com‐
766 piler,
767 the
768 GCC
769 tool
770 chain,
771 and
772 the
773 Mi‐
774 cro‐
775 soft
776 Vis‐
777 ual
778 C++
779 tools,
780 On
781 SGI
782 IRIX,
783 IBM
784 AIX,
785 Hewlett
786 Packard
787 HP-
788 UX,
789 and
790 Sun
791 Solaris
792 sys‐
793 tems,
794 scons
795 searches
796 for
797 the
798 native
799 com‐
800 piler
801 tools
802 (MIP‐
803 Spro,
804 Vis‐
805 ual
806 Age,
807 aCC,
808 and
809 Forte
810 tools
811 respec‐
812 tively)
813 and
814 the
815 GCC
816 tool
817 chain.
818 On
819 all
820 other
821 plat‐
822 forms,
823 includ‐
824 ing
825 POSIX
826 (Linux
827 and
828 UNIX)
829 plat‐
830 forms,
831 scons
832 searches
833 in
834 order
835 for
836 the
837 GCC
838 tool
839 chain,
840 the
841 Mi‐
842 cro‐
843 soft
844 Vis‐
845 ual
846 C++
847 tools,
848 and
849 the
850 Intel
851 com‐
852 piler
853 tools.
854 You
855 may,
856 of
857 course,
858 over‐
859 ride
860 these
861 default
862 val‐
863 ues
864 by
865 appro‐
866 pri‐
867 ate
868 con‐
869 fig‐
870 u‐
871 ra‐
872 tion
873 of
874 Envi‐
875 ron‐
876 ment
877 con‐
878 struc‐
879 tion
880 vari‐
881 ables.
882
883
885 In general, scons supports the same command-line options as GNU make,
886 and many of those supported by cons.
887
888
889 -b Ignored for compatibility with non-GNU versions of make.
890
891
892 -c, --clean, --remove
893 Clean up by removing all target files for which a construction
894 command is specified. Also remove any files or directories
895 associated to the construction command using the Clean() func‐
896 tion. Will not remove any targets specified by the NoClean()
897 function.
898
899
900 --cache-debug=file
901 Print debug information about the CacheDir() derived-file
902 caching to the specified file. If file is - (a hyphen), the
903 debug information are printed to the standard output. The
904 printed messages describe what signature file names are being
905 looked for in, retrieved from, or written to the CacheDir()
906 directory tree.
907
908
909 --cache-disable, --no-cache
910 Disable the derived-file caching specified by CacheDir(). scons
911 will neither retrieve files from the cache nor copy files to the
912 cache.
913
914
915 --cache-force, --cache-populate
916 When using CacheDir(), populate a cache by copying any already-
917 existing, up-to-date derived files to the cache, in addition to
918 files built by this invocation. This is useful to populate a
919 new cache with all the current derived files, or to add to the
920 cache any derived files recently built with caching disabled via
921 the --cache-disable option.
922
923
924 --cache-show
925 When using CacheDir() and retrieving a derived file from the
926 cache, show the command that would have been executed to build
927 the file, instead of the usual report, "Retrieved `file' from
928 cache." This will produce consistent output for build logs,
929 regardless of whether a target file was rebuilt or retrieved
930 from the cache.
931
932
933 --config=mode
934 This specifies how the Configure call should use or generate the
935 results of configuration tests. The option should be specified
936 from among the following choices:
937
938
939 --config=auto
940 scons will use its normal dependency mechanisms to decide if a
941 test must be rebuilt or not. This saves time by not running the
942 same configuration tests every time you invoke scons, but will
943 overlook changes in system header files or external commands
944 (such as compilers) if you don't specify those dependecies
945 explicitly. This is the default behavior.
946
947
948 --config=force
949 If this option is specified, all configuration tests will be re-
950 run regardless of whether the cached results are out of date.
951 This can be used to explicitly force the configuration tests to
952 be updated in response to an otherwise unconfigured change in a
953 system header file or compiler.
954
955
956 --config=cache
957 If this option is specified, no configuration tests will be
958 rerun and all results will be taken from cache. Note that scons
959 will still consider it an error if --config=cache is specified
960 and a necessary test does not yet have any results in the cache.
961
962
963 -C directory, --directory=directory
964 Change to the specified directory before searching for the SCon‐
965 struct, Sconstruct, or sconstruct file, or doing anything else.
966 Multiple -C options are interpreted relative to the previous
967 one, and the right-most -C option wins. (This option is nearly
968 equivalent to -f directory/SConstruct, except that it will
969 search for SConstruct, Sconstruct, or sconstruct in the speci‐
970 fied directory.)
971
972
973
974 -D Works exactly the same way as the -u option except for the way
975 default targets are handled. When this option is used and no
976 targets are specified on the command line, all default targets
977 are built, whether or not they are below the current directory.
978
979
980 --debug=type
981 Debug the build process. type specifies what type of debugging:
982
983
984 --debug=count
985 Print how many objects are created of the various classes used
986 internally by SCons before and after reading the SConscript
987 files and before and after building targets. This is not sup‐
988 ported when run under Python versions earlier than 2.1, when
989 SCons is executed with the Python -O (optimized) option, or when
990 the SCons modules have been compiled with optimization (that is,
991 when executing from *.pyo files).
992
993
994 --debug=dtree
995 A synonym for the newer --tree=derived option. This will be
996 deprecated in some future release and ultimately removed.
997
998
999 --debug=explain
1000 Print an explanation of precisely why scons is deciding to
1001 (re-)build any targets. (Note: this does not print anything
1002 for targets that are not rebuilt.)
1003
1004
1005 --debug=findlibs
1006 Instruct the scanner that searches for libraries to print a mes‐
1007 sage about each potential library name it is searching for, and
1008 about the actual libraries it finds.
1009
1010
1011 --debug=includes
1012 Print the include tree after each top-level target is built.
1013 This is generally used to find out what files are included by
1014 the sources of a given derived file:
1015
1016 $ scons --debug=includes foo.o
1017
1018
1019 --debug=memoizer
1020 Prints a summary of hits and misses using the Memoizer,
1021 an internal subsystem that counts how often SCons uses
1022 cached values in memory instead of recomputing them each
1023 time they're needed. Only available when using Python
1024 2.2 or later.
1025
1026
1027 --debug=memory
1028 Prints how much memory SCons uses before and after read‐
1029 ing the SConscript files and before and after building
1030 targets.
1031
1032
1033 --debug=nomemoizer
1034 A deprecated option preserved for backwards compatibil‐
1035 ity.
1036
1037
1038 --debug=objects
1039 Prints a list of the various objects of the various
1040 classes used internally by SCons. This only works when
1041 run under Python 2.1 or later.
1042
1043
1044 --debug=pdb
1045 Re-run SCons under the control of the pdb Python debug‐
1046 ger.
1047
1048
1049 --debug=presub
1050 Print the raw command line used to build each target
1051 before the construction environment variables are substi‐
1052 tuted. Also shows which targets are being built by this
1053 command. Output looks something like this:
1054 $ scons --debug=presub
1055 Building myprog.o with action(s):
1056 $SHCC $SHCFLAGS $SHCCFLAGS $CPPFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
1057
1058
1059 --debug=stacktrace
1060 Prints an internal Python stack trace when encoun‐
1061 tering an otherwise unexplained error.
1062
1063
1064 --debug=stree
1065 A synonym for the newer --tree=all,status option.
1066 This will be deprecated in some future release and
1067 ultimately removed.
1068
1069
1070 --debug=time
1071 Prints various time profiling information: the
1072 time spent executing each individual build com‐
1073 mand; the total build time (time SCons ran from
1074 beginning to end); the total time spent reading
1075 and executing SConscript files; the total time
1076 spent SCons itself spend running (that is, not
1077 counting reading and executing SConscript files);
1078 and both the total time spent executing all build
1079 commands and the elapsed wall-clock time spent
1080 executing those build commands. (When scons is
1081 executed without the -j option, the elapsed wall-
1082 clock time will typically be slightly longer than
1083 the total time spent executing all the build com‐
1084 mands, due to the SCons processing that takes
1085 place in between executing each command. When
1086 scons is executed with the -j option, and your
1087 build configuration allows good parallelization,
1088 the elapsed wall-clock time should be signifi‐
1089 cantly smaller than the total time spent executing
1090 all the build commands, since multiple build com‐
1091 mands and intervening SCons processing should take
1092 place in parallel.)
1093
1094
1095 --debug=tree
1096 A synonym for the newer --tree=all option. This
1097 will be deprecated in some future release and
1098 ultimately removed.
1099
1100
1101 --diskcheck=types
1102 Enable specific checks for whether or not there is
1103 a file on disk where the SCons configuration
1104 expects a directory (or vice versa), and whether
1105 or not RCS or SCCS sources exist when searching
1106 for source and include files. The types argument
1107 can be set to: all, to enable all checks explic‐
1108 itly (the default behavior); none, to disable all
1109 such checks; match, to check that files and direc‐
1110 tories on disk match SCons' expected configura‐
1111 tion; rcs, to check for the existence of an RCS
1112 source for any missing source or include files;
1113 sccs, to check for the existence of an SCCS source
1114 for any missing source or include files. Multiple
1115 checks can be specified separated by commas; for
1116 example, --diskcheck=sccs,rcs would still check
1117 for SCCS and RCS sources, but disable the check
1118 for on-disk matches of files and directories.
1119 Disabling some or all of these checks can provide
1120 a performance boost for large configurations, or
1121 when the configuration will check for files and/or
1122 directories across networked or shared file sys‐
1123 tems, at the slight increased risk of an incorrect
1124 build or of not handling errors gracefully (if
1125 include files really should be found in SCCS or
1126 RCS, for example, or if a file really does exist
1127 where the SCons configuration expects a direc‐
1128 tory).
1129
1130
1131 --duplicate=ORDER
1132 There are three ways to duplicate files in a build
1133 tree: hard links, soft (symbolic) links and
1134 copies. The default behaviour of SCons is to pre‐
1135 fer hard links to soft links to copies. You can
1136 specify different behaviours with this option.
1137 ORDER must be one of hard-soft-copy (the default),
1138 soft-hard-copy, hard-copy, soft-copy or copy.
1139 SCons will attempt to duplicate files using the
1140 mechanisms in the specified order.
1141
1142
1143
1144 -f file, --file=file, --makefile=file, --sconstruct=file
1145 Use file as the initial SConscript file.
1146
1147
1148 -h, --help
1149 Print a local help message for this build, if one
1150 is defined in the SConscript file(s), plus a line
1151 that describes the -H option for command-line
1152 option help. If no local help message is defined,
1153 prints the standard help message about command-
1154 line options. Exits after displaying the appro‐
1155 priate message.
1156
1157
1158 -H, --help-options
1159 Print the standard help message about command-line
1160 options and exit.
1161
1162
1163 -i, --ignore-errors
1164 Ignore all errors from commands executed to
1165 rebuild files.
1166
1167
1168 -I directory, --include-dir=directory
1169 Specifies a directory to search for imported
1170 Python modules. If several -I options are used,
1171 the directories are searched in the order speci‐
1172 fied.
1173
1174
1175 --implicit-cache
1176 Cache implicit dependencies. This causes scons to
1177 use the implicit (scanned) dependencies from the
1178 last time it was run instead of scanning the files
1179 for implicit dependencies. This can significantly
1180 speed up SCons, but with the following limita‐
1181 tions:
1182
1183 scons will not detect changes to implicit depen‐
1184 dency search paths (e.g. CPPPATH, LIBPATH) that
1185 would ordinarily cause different versions of same-
1186 named files to be used.
1187
1188 scons will miss changes in the implicit dependen‐
1189 cies in cases where a new implicit dependency is
1190 added earlier in the implicit dependency search
1191 path (e.g. CPPPATH, LIBPATH) than a current
1192 implicit dependency with the same name.
1193
1194
1195 --implicit-deps-changed
1196 Forces SCons to ignore the cached implicit depen‐
1197 dencies. This causes the implicit dependencies to
1198 be rescanned and recached. This implies
1199 --implicit-cache.
1200
1201
1202 --implicit-deps-unchanged
1203 Force SCons to ignore changes in the implicit
1204 dependencies. This causes cached implicit depen‐
1205 dencies to always be used. This implies
1206 --implicit-cache.
1207
1208
1209 --interactive
1210 Starts SCons in interactive mode. The SConscript
1211 files are read once and a scons>>> prompt is
1212 printed. Targets may now be rebuilt by typing
1213 commands at interactive prompt without having to
1214 re-read the SConscript files and re-initialize the
1215 dependency graph from scratch.
1216
1217 SCons interactive mode supports the following com‐
1218 mands:
1219
1220
1221 build[OPTIONS] [TARGETS] ...
1222 Builds the specified TARGETS (and their
1223 dependencies) with the specified SCons
1224 command-line OPTIONS. b and scons are
1225 synonyms.
1226
1227 The following SCons command-line options
1228 affect the build command:
1229
1230 --cache-debug=FILE
1231 --cache-disable, --no-cache
1232 --cache-force, --cache-populate
1233 --cache-show
1234 --debug=TYPE
1235 -i, --ignore-errors
1236 -j N, --jobs=N
1237 -k, --keep-going
1238 -n, --no-exec, --just-print, --dry-run, --recon
1239 -Q
1240 -s, --silent, --quiet
1241 -s, --silent, --quiet
1242 --taskmastertrace=FILE
1243 --tree=OPTIONS
1244
1245
1246 Any other SCons command-line
1247 options that are specified do not
1248 cause errors but have no effect on
1249 the build command (mainly because
1250 they affect how the SConscript
1251 files are read, which only happens
1252 once at the beginning of interac‐
1253 tive mode).
1254
1255
1256 clean[OPTIONS] [TARGETS] ...
1257 Cleans the specified TARGETS (and
1258 their dependencies) with the speci‐
1259 fied options. c is a synonym.
1260 This command is itself a synonym
1261 for build --clean
1262
1263
1264 exit Exits SCons interactive mode. You
1265 can also exit by terminating input
1266 (CTRL+D on UNIX or Linux systems,
1267 CTRL+Z on Windows systems).
1268
1269
1270 help[COMMAND]
1271 Provides a help message about the
1272 commands available in SCons inter‐
1273 active mode. If COMMAND is speci‐
1274 fied, h and ? are synonyms.
1275
1276
1277 shell[COMMANDLINE]
1278 Executes the specified COMMANDLINE
1279 in a subshell. If no COMMANDLINE
1280 is specified, executes the interac‐
1281 tive command interpreter specified
1282 in the SHELL environment variable
1283 (on UNIX and Linux systems) or the
1284 COMSPEC environment variable (on
1285 Windows systems). sh and ! are
1286 synonyms.
1287
1288
1289 version
1290 Prints SCons version information.
1291
1292
1293 An empty line repeats the last typed com‐
1294 mand. Command-line editing can be used
1295 if the readline module is available.
1296
1297 $ scons --interactive
1298 scons: Reading SConscript files ...
1299 scons: done reading SConscript files.
1300 scons>>> build -n prog
1301 scons>>> exit
1302
1303
1304 -j N, --jobs=N
1305 Specifies the number of jobs (com‐
1306 mands) to run simultaneously. If
1307 there is more than one -j option,
1308 the last one is effective.
1309
1310
1311 -k, --keep-going
1312 Continue as much as possible after
1313 an error. The target that failed
1314 and those that depend on it will
1315 not be remade, but other targets
1316 specified on the command line will
1317 still be processed.
1318
1319
1320
1321
1322 -m Ignored for compatibility with
1323 non-GNU versions of make.
1324
1325
1326 --max-drift=SECONDS
1327 Set the maximum expected drift in
1328 the modification time of files to
1329 SECONDS. This value determines
1330 how long a file must be unmodified
1331 before its cached content signa‐
1332 ture will be used instead of cal‐
1333 culating a new content signature
1334 (MD5 checksum) of the file's con‐
1335 tents. The default value is 2
1336 days, which means a file must have
1337 a modification time of at least
1338 two days ago in order to have its
1339 cached content signature used. A
1340 negative value means to never
1341 cache the content signature and to
1342 ignore the cached value if there
1343 already is one. A value of 0 means
1344 to always use the cached signa‐
1345 ture, no matter how old the file
1346 is.
1347
1348
1349 -n, --just-print, --dry-run, --recon
1350 No execute. Print the commands
1351 that would be executed to build
1352 any out-of-date target files, but
1353 do not execute the commands.
1354
1355
1356 --no-site-dir
1357 Prevents the automatic addition of
1358 the standard site_scons dir to
1359 sys.path. Also prevents loading
1360 the site_scons/site_init.py module
1361 if it exists, and prevents adding
1362 site_scons/site_tools to the tool‐
1363 path.
1364
1365
1366
1367 --profile=file
1368 Run SCons under the Python pro‐
1369 filer and save the results in the
1370 specified file. The results may
1371 be analyzed using the Python
1372 pstats module.
1373
1374
1375 -q, --question
1376 Do not run any commands, or print
1377 anything. Just return an exit
1378 status that is zero if the speci‐
1379 fied targets are already up to
1380 date, non-zero otherwise.
1381
1382 -Q Quiets SCons status messages about
1383 reading SConscript files, building
1384 targets and entering directories.
1385 Commands that are executed to
1386 rebuild target files are still
1387 printed.
1388
1389
1390
1391 --random
1392 Build dependencies in a random
1393 order. This is useful when build‐
1394 ing multiple trees simultaneously
1395 with caching enabled, to prevent
1396 multiple builds from simultane‐
1397 ously trying to build or retrieve
1398 the same target files.
1399
1400
1401 -s, --silent, --quiet
1402 Silent. Do not print commands
1403 that are executed to rebuild tar‐
1404 get files. Also suppresses SCons
1405 status messages.
1406
1407
1408 -S, --no-keep-going, --stop
1409 Ignored for compatibility with GNU
1410 make.
1411
1412
1413 --site-dir=dir
1414 Uses the named dir as the site dir
1415 rather than the default site_scons
1416 dir. This dir will get prepended
1417 to sys.path, the module
1418 dir/site_init.py will get loaded
1419 if it exists, and dir/site_tools
1420 will get added to the default
1421 toolpath.
1422
1423
1424 --stack-size=KILOBYTES
1425 Set the size stack used to run
1426 threads to KILOBYTES. This value
1427 determines the stack size of the
1428 threads used to run jobs. These
1429 are the threads that execute the
1430 actions of the builders for the
1431 nodes that are out-of-date. Note
1432 that this option has no effect
1433 unless the num_jobs option, which
1434 corresponds to -j and --jobs, is
1435 larger than one. Using a stack
1436 size that is too small may cause
1437 stack overflow errors. This usu‐
1438 ally shows up as segmentation
1439 faults that cause scons to abort
1440 before building anything. Using a
1441 stack size that is too large will
1442 cause scons to use more memory
1443 than required and may slow down
1444 the entire build process.
1445
1446 The default value is to use a
1447 stack size of 256 kilobytes, which
1448 should be appropriate for most
1449 uses. You should not need to
1450 increase this value unless you
1451 encounter stack overflow errors.
1452
1453
1454 -t, --touch
1455 Ignored for compatibility with GNU
1456 make. (Touching a file to make it
1457 appear up-to-date is unnecessary
1458 when using scons.)
1459
1460
1461 --taskmastertrace=file
1462 Prints trace information to the
1463 specified file about how the
1464 internal Taskmaster object evalu‐
1465 ates and controls the order in
1466 which Nodes are built. A file
1467 name of - may be used to specify
1468 the standard output.
1469
1470
1471 -tree=options
1472 Prints a tree of the dependencies
1473 after each top-level target is
1474 built. This prints out some or
1475 all of the tree, in various for‐
1476 mats, depending on the options
1477 specified:
1478
1479
1480 --tree=all
1481 Print the entire dependency tree
1482 after each top-level target is
1483 built. This prints out the com‐
1484 plete dependency tree, including
1485 implicit dependencies and ignored
1486 dependencies.
1487
1488
1489 --tree=derived
1490 Restricts the tree output to only
1491 derived (target) files, not source
1492 files.
1493
1494
1495 --tree=status
1496 Prints status information for each
1497 displayed node.
1498
1499
1500 --tree=prune
1501 Prunes the tree to avoid repeating
1502 dependency information for nodes
1503 that have already been displayed.
1504 Any node that has already been
1505 displayed will have its name
1506 printed in [square brackets], as
1507 an indication that the dependen‐
1508 cies for that node can be found by
1509 searching for the relevant output
1510 higher up in the tree.
1511
1512
1513 Multiple options may be specified,
1514 separated by commas:
1515
1516 # Prints only derived files, with status information:
1517 scons --tree=derived,status
1518
1519 # Prints all dependencies of target, with status information
1520 # and pruning dependencies of already-visited Nodes:
1521 scons --tree=all,prune,status target
1522
1523
1524 -u, --up, --search-up
1525 Walks up the directory
1526 structure until an SCon‐
1527 struct , Sconstruct or
1528 sconstruct file is found,
1529 and uses that as the top of
1530 the directory tree. If no
1531 targets are specified on
1532 the command line, only tar‐
1533 gets at or below the cur‐
1534 rent directory will be
1535 built.
1536
1537
1538 -U Works exactly the same way
1539 as the -u option except for
1540 the way default targets are
1541 handled. When this option
1542 is used and no targets are
1543 specified on the command
1544 line, all default targets
1545 that are defined in the
1546 SConscript(s) in the cur‐
1547 rent directory are built,
1548 regardless of what direc‐
1549 tory the resultant targets
1550 end up in.
1551
1552
1553 -v, --version
1554 Print the scons version,
1555 copyright information, list
1556 of authors, and any other
1557 relevant information. Then
1558 exit.
1559
1560
1561 -w, --print-directory
1562 Print a message containing
1563 the working directory
1564 before and after other pro‐
1565 cessing.
1566
1567
1568 --no-print-directory
1569 Turn off -w, even if it was
1570 turned on implicitly.
1571
1572
1573 --warn=type, --warn=no-type
1574 Enable or disable warnings.
1575 type specifies the type of
1576 warnings to be enabled or
1577 disabled:
1578
1579
1580 --warn=all, --warn=no-all
1581 Enables or disables all
1582 warnings.
1583
1584
1585 --warn=cache-write-error,
1586 --warn=no-cache-write-error
1587 Enables or disables warn‐
1588 ings about errors trying to
1589 write a copy of a built
1590 file to a specified
1591 CacheDir(). These warnings
1592 are disabled by default.
1593
1594
1595 --warn=corrupt-sconsign,
1596 --warn=no-corrupt-sconsign
1597 Enables or disables warn‐
1598 ings about unfamiliar sig‐
1599 nature data in .sconsign
1600 files. These warnings are
1601 enabled by default.
1602
1603
1604 --warn=dependency, --warn=no-
1605 dependency
1606 Enables or disables warn‐
1607 ings about dependencies.
1608 These warnings are disabled
1609 by default.
1610
1611
1612 --warn=deprecated, --warn=no-dep‐
1613 recated
1614 Enables or disables all
1615 warnings about use of dep‐
1616 recated features. These
1617 warnings are enabled by
1618 default. Warnings for some
1619 specific deprecated fea‐
1620 tures may be enabled or
1621 disabled individually; see
1622 below.
1623
1624 --warn=deprecated-copy,
1625 --warn=no-deprecated-copy
1626 Enables or disables warn‐
1627 ings about use of the dep‐
1628 recated env.Copy() method.
1629
1630 --warn=deprecated-source-
1631 signatures, --warn=no-dep‐
1632 recated-source-signatures
1633 Enables or disables warn‐
1634 ings about use of the dep‐
1635 recated SourceSignatures()
1636 function or env.SourceSig‐
1637 natures() method.
1638
1639 --warn=deprecated-target-
1640 signatures, --warn=no-dep‐
1641 recated-target-signatures
1642 Enables or disables warn‐
1643 ings about use of the dep‐
1644 recated TargetSignatures()
1645 function or env.TargetSig‐
1646 natures() method.
1647
1648
1649 --warn=duplicate-environment,
1650 --warn=no-duplicate-environment
1651 Enables or disables warn‐
1652 ings about missing SCon‐
1653 script files.
1654
1655
1656 --warn=misleading-keywords,
1657 --warn=no-misleading-keywords
1658 Enables or disables warn‐
1659 ings about use of the mis‐
1660 spelled keywords targets
1661 and sources when calling
1662 Builders. (Note the last s
1663 characters, the correct
1664 spellings are target and
1665 source.) These warnings
1666 are enabled by default.
1667
1668
1669 --warn=missing-sconscript,
1670 --warn=no-missing-sconscript
1671 Enables or disables warn‐
1672 ings about attempts to
1673 specify a build of a target
1674 with two different con‐
1675 struction environments that
1676 use the same action. These
1677 warnings are enabled by
1678 default.
1679
1680
1681 --warn=no-md5-module, --warn=no-
1682 no-md5-module
1683 Enables or disables warn‐
1684 ings about the version of
1685 Python not having an MD5
1686 checksum module available.
1687 These warnings are enabled
1688 by default.
1689
1690
1691 --warn=no-metaclass-support,
1692 --warn=no-no-metaclass-support
1693 Enables or disables warn‐
1694 ings about the version of
1695 Python not supporting meta‐
1696 classes when the
1697 --debug=memoizer option is
1698 used. These warnings are
1699 enabled by default.
1700
1701
1702 --warn=no-object-count, --warn=no-
1703 no-object-count
1704 Enables or disables warn‐
1705 ings about the
1706 --debug=object feature not
1707 working when scons is run
1708 with the python -O option
1709 or from optimized Python
1710 (.pyo) modules.
1711
1712
1713 --warn=no-parallel-support,
1714 --warn=no-no-parallel-support
1715 Enables or disables warn‐
1716 ings about the version of
1717 Python not being able to
1718 support parallel builds
1719 when the -j option is used.
1720 These warnings are enabled
1721 by default.
1722
1723
1724 --warn=python-version, --warn=no-
1725 python-version
1726 Enables or disables the
1727 warning about running SCons
1728 with a deprecated version
1729 of Python. These warnings
1730 are enabled by default.
1731
1732
1733 --warn=reserved-variable,
1734 --warn=no-reserved-variable
1735 Enables or disables warn‐
1736 ings about attempts to set
1737 the reserved construction
1738 variable names TARGET, TAR‐
1739 GETS, SOURCE or SOURCES.
1740 These warnings are disabled
1741 by default.
1742
1743
1744 --warn=stack-size, --warn=no-
1745 stack-size
1746 Enables or disables warn‐
1747 ings about requests to set
1748 the stack size that could
1749 not be honored. These
1750 warnings are enabled by
1751 default.
1752
1753
1754
1755 -Y repository, --repository=repos‐
1756 itory, --srcdir=repository
1757 Search the specified repos‐
1758 itory for any input and
1759 target files not found in
1760 the local directory hierar‐
1761 chy. Multiple -Y options
1762 may be specified, in which
1763 case the repositories are
1764 searched in the order spec‐
1765 ified.
1766
1767
1769 Construction Environments
1770 A construction environment is the basic means by which the SConscript
1771 files communicate build information to scons. A new construction envi‐
1772 ronment is created using the Environment function:
1773
1774 env = Environment()
1775
1776 Variables, called construction variables, may be set in a con‐
1777 struction environment either by specifyng them as keywords when
1778 the object is created or by assigning them a value after the
1779 object is created:
1780
1781 env = Environment(FOO = 'foo')
1782 env['BAR'] = 'bar'
1783
1784 As a convenience, construction variables may also be set
1785 or modified by the parse_flags keyword argument, which
1786 applies the ParseFlags method (described below) to the
1787 argument value after all other processing is completed.
1788 This is useful either if the exact content of the flags
1789 is unknown (for example, read from a control file) or if
1790 the flags are distributed to a number of construction
1791 variables.
1792
1793 env = Environment(parse_flags = '-Iinclude -DEBUG -lm')
1794
1795 This example adds 'include' to CPPPATH, ´EBUG' to
1796 CPPDEFINES, and 'm' to LIBS.
1797
1798 By default, a new construction environment is ini‐
1799 tialized with a set of builder methods and con‐
1800 struction variables that are appropriate for the
1801 current platform. An optional platform keyword
1802 argument may be used to specify that an environ‐
1803 ment should be initialized for a different plat‐
1804 form:
1805
1806 env = Environment(platform = 'cygwin')
1807 env = Environment(platform = 'os2')
1808 env = Environment(platform = 'posix')
1809 env = Environment(platform = 'win32')
1810
1811 Specifying a platform initializes the
1812 appropriate construction variables in the
1813 environment to use and generate file names
1814 with prefixes and suffixes appropriate for
1815 the platform.
1816
1817 Note that the win32 platform adds the SYS‐
1818 TEMDRIVE and SYSTEMROOT variables from the
1819 user's external environment to the con‐
1820 struction environment's ENV dictionary.
1821 This is so that any executed commands that
1822 use sockets to connect with other systems
1823 (such as fetching source files from exter‐
1824 nal CVS repository specifications like
1825 :pserver:anonymous@cvs.source‐
1826 forge.net:/cvsroot/scons) will work on Win‐
1827 dows systems.
1828
1829 The platform argument may be function or
1830 callable object, in which case the Environ‐
1831 ment() method will call the specified argu‐
1832 ment to update the new construction envi‐
1833 ronment:
1834
1835 def my_platform(env):
1836 env['VAR'] = 'xyzzy'
1837
1838 env = Environment(platform = my_platform)
1839
1840 Additionally, a specific set of
1841 tools with which to initialize the
1842 environment may be specified as an
1843 optional keyword argument:
1844
1845 env = Environment(tools = ['msvc', 'lex'])
1846
1847 Non-built-in tools may be
1848 specified using the toolpath
1849 argument:
1850
1851 env = Environment(tools = ['default', 'foo'], toolpath = ['tools'])
1852
1853 This looks for a tool
1854 specification in
1855 tools/foo.py (as well
1856 as using the ordinary
1857 default tools for the
1858 platform). foo.py
1859 should have two func‐
1860 tions: generate(env,
1861 **kw) and exists(env).
1862 The generate() func‐
1863 tion modifies the
1864 passed-in environment
1865 to set up variables so
1866 that the tool can be
1867 executed; it may use
1868 any keyword arguments
1869 that the user supplies
1870 (see below) to vary
1871 its initialization.
1872 The exists() function
1873 should return a true
1874 value if the tool is
1875 available. Tools in
1876 the toolpath are used
1877 before any of the
1878 built-in ones. For
1879 example, adding gcc.py
1880 to the toolpath would
1881 override the built-in
1882 gcc tool. Also note
1883 that the toolpath is
1884 stored in the environ‐
1885 ment for use by later
1886 calls to Clone() and
1887 Tool() methods:
1888
1889 base = Environment(toolpath=['custom_path'])
1890 derived = base.Clone(tools=['custom_tool'])
1891 derived.CustomBuilder()
1892
1893 The elements of
1894 the tools list
1895 may also be
1896 functions or
1897 callable
1898 objects, in
1899 which case the
1900 Environment()
1901 method will
1902 call the speci‐
1903 fied elements
1904 to update the
1905 new construc‐
1906 tion environ‐
1907 ment:
1908
1909 def my_tool(env):
1910 env['XYZZY'] = 'xyzzy'
1911
1912 env = Environment(tools = [my_tool])
1913
1914 The
1915 individ‐
1916 ual ele‐
1917 ments of
1918 the
1919 tools
1920 list may
1921 also
1922 them‐
1923 selves
1924 be two-
1925 element
1926 lists of
1927 the form
1928 (tool‐
1929 name,
1930 kw_dict).
1931 SCons
1932 searches
1933 for the
1934 toolname
1935 specifi‐
1936 cation
1937 file as
1938 described
1939 above,
1940 and
1941 passes
1942 kw_dict,
1943 which
1944 must be
1945 a dic‐
1946 tionary,
1947 as key‐
1948 word
1949 argu‐
1950 ments to
1951 the
1952 tool's
1953 generate
1954 func‐
1955 tion.
1956 The gen‐
1957 erate
1958 function
1959 can use
1960 the
1961 argu‐
1962 ments to
1963 modify
1964 the
1965 tool's
1966 behavior
1967 by set‐
1968 ting up
1969 the
1970 environ‐
1971 ment in
1972 differ‐
1973 ent ways
1974 or oth‐
1975 erwise
1976 changing
1977 its ini‐
1978 tializa‐
1979 tion.
1980
1981 # in tools/my_tool.py:
1982 def generate(env, **kw):
1983 # Sets MY_TOOL to the value of keyword argument 'arg1' or 1.
1984 env['MY_TOOL'] = kw.get('arg1', '1')
1985 def exists(env):
1986 return 1
1987
1988 # in SConstruct:
1989 env = Environment(tools = ['default', ('my_tool', {'arg1': 'abc'})],
1990 toolpath=['tools'])
1991
1992 The
1993 tool
1994 def‐
1995 i‐
1996 ni‐
1997 tion
1998 (i.e.
1999 my_tool())
2000 can
2001 use
2002 the
2003 PLAT‐
2004 FORM
2005 vari‐
2006 able
2007 from
2008 the
2009 envi‐
2010 ron‐
2011 ment
2012 it
2013 receives
2014 to
2015 cus‐
2016 tom‐
2017 ize
2018 the
2019 tool
2020 for
2021 dif‐
2022 fer‐
2023 ent
2024 plat‐
2025 forms.
2026
2027 If
2028 no
2029 tool
2030 list
2031 is
2032 spec‐
2033 i‐
2034 fied,
2035 then
2036 SCons
2037 will
2038 auto-
2039 detect
2040 the
2041 installed
2042 tools
2043 using
2044 the
2045 PATH
2046 vari‐
2047 able
2048 in
2049 the
2050 ENV
2051 con‐
2052 struc‐
2053 tion
2054 vari‐
2055 able
2056 and
2057 the
2058 plat‐
2059 form
2060 name
2061 when
2062 the
2063 Envi‐
2064 ron‐
2065 ment
2066 is
2067 con‐
2068 structed.
2069 Chang‐
2070 ing
2071 the
2072 PATH
2073 vari‐
2074 able
2075 after
2076 the
2077 Envi‐
2078 ron‐
2079 ment
2080 is
2081 con‐
2082 structed
2083 will
2084 not
2085 cause
2086 the
2087 tools
2088 to
2089 be
2090 rede‐
2091 tected.
2092
2093 SCons
2094 sup‐
2095 ports
2096 the
2097 fol‐
2098 low‐
2099 ing
2100 tool
2101 spec‐
2102 i‐
2103 fi‐
2104 ca‐
2105 tions
2106 out
2107 of
2108 the
2109 box:
2110
2111 386asm
2112 aixc++
2113 aixcc
2114 aixf77
2115 aixlink
2116 ar
2117 as
2118 bcc32
2119 c++
2120 cc
2121 cvf
2122 dmd
2123 dvipdf
2124 dvips
2125 f77
2126 f90
2127 f95
2128 fortran
2129 g++
2130 g77
2131 gas
2132 gcc
2133 gfortran
2134 gnulink
2135 gs
2136 hpc++
2137 hpcc
2138 hplink
2139 icc
2140 icl
2141 ifl
2142 ifort
2143 ilink
2144 ilink32
2145 intelc
2146 jar
2147 javac
2148 javah
2149 latex
2150 lex
2151 link
2152 linkloc
2153 m4
2154 masm
2155 midl
2156 mingw
2157 mslib
2158 mslink
2159 msvc
2160 msvs
2161 mwcc
2162 mwld
2163 nasm
2164 pdflatex
2165 pdftex
2166 qt
2167 rmic
2168 rpcgen
2169 sgiar
2170 sgic++
2171 sgicc
2172 sgilink
2173 sunar
2174 sunc++
2175 suncc
2176 sunf77
2177 sunf90
2178 sunf95
2179 sunlink
2180 swig
2181 tar
2182 tex
2183 tlib
2184 yacc
2185 zip
2186
2187 Addi‐
2188 tion‐
2189 ally,
2190 there
2191 is
2192 a
2193 "tool"
2194 named
2195 default
2196 which
2197 con‐
2198 fig‐
2199 ures
2200 the
2201 envi‐
2202 ron‐
2203 ment
2204 with
2205 a
2206 default
2207 set
2208 of
2209 tools
2210 for
2211 the
2212 cur‐
2213 rent
2214 plat‐
2215 form.
2216
2217 On
2218 posix
2219 and
2220 cyg‐
2221 win
2222 plat‐
2223 forms
2224 the
2225 GNU
2226 tools
2227 (e.g.
2228 gcc)
2229 are
2230 pre‐
2231 ferred
2232 by
2233 SCons,
2234 on
2235 Win‐
2236 dows
2237 the
2238 Mi‐
2239 cro‐
2240 soft
2241 tools
2242 (e.g.
2243 msvc)
2244 fol‐
2245 lowed
2246 by
2247 MinGW
2248 are
2249 pre‐
2250 ferred
2251 by
2252 SCons,
2253 and
2254 in
2255 OS/2
2256 the
2257 IBM
2258 tools
2259 (e.g.
2260 icc)
2261 are
2262 pre‐
2263 ferred
2264 by
2265 SCons.
2266
2267
2268 Builder Methods
2269 Build rules are specified by calling a construction environment's
2270 builder methods. The arguments to the builder methods are target (a
2271 list of targets to be built, usually file names) and source (a list of
2272 sources to be built, usually file names).
2273
2274 Because long lists of file names can lead to a lot of quoting, scons
2275 supplies a Split() global function and a same-named environment method
2276 that split a single string into a list, separated on strings of white-
2277 space characters. (These are similar to the string.split() method from
2278 the standard Python library, but work even if the input isn't a
2279 string.)
2280
2281 Like all Python arguments, the target and source arguments to a builder
2282 method can be specified either with or without the "target" and
2283 "source" keywords. When the keywords are omitted, the target is first,
2284 followed by the source. The following are equivalent examples of call‐
2285 ing the Program builder method:
2286
2287 env.Program('bar', ['bar.c', 'foo.c'])
2288 env.Program('bar', Split('bar.c foo.c'))
2289 env.Program('bar', env.Split('bar.c foo.c'))
2290 env.Program(source = ['bar.c', 'foo.c'], target = 'bar')
2291 env.Program(target = 'bar', Split('bar.c foo.c'))
2292 env.Program(target = 'bar', env.Split('bar.c foo.c'))
2293 env.Program('bar', source = string.split('bar.c foo.c'))
2294
2295 Target and source file names that are not absolute path names
2296 (that is, do not begin with / on POSIX systems or on Windows
2297 systems, with or without an optional drive letter) are inter‐
2298 preted relative to the directory containing the SConscript file
2299 being read. An initial # (hash mark) on a path name means that
2300 the rest of the file name is interpreted relative to the direc‐
2301 tory containing the top-level SConstruct file, even if the # is
2302 followed by a directory separator character (slash or back‐
2303 slash).
2304
2305 Examples:
2306
2307 # The comments describing the targets that will be built
2308 # assume these calls are in a SConscript file in the
2309 # a subdirectory named "subdir".
2310
2311 # Builds the program "subdir/foo" from "subdir/foo.c":
2312 env.Program('foo', 'foo.c')
2313
2314 # Builds the program "/tmp/bar" from "subdir/bar.c":
2315 env.Program('/tmp/bar', 'bar.c')
2316
2317 # An initial '#' or '#/' are equivalent; the following
2318 # calls build the programs "foo" and "bar" (in the
2319 # top-level SConstruct directory) from "subdir/foo.c" and
2320 # "subdir/bar.c", respectively:
2321 env.Program('#foo', 'foo.c')
2322 env.Program('#/bar', 'bar.c')
2323
2324 # Builds the program "other/foo" (relative to the top-level
2325 # SConstruct directory) from "subdir/foo.c":
2326 env.Program('#other/foo', 'foo.c')
2327
2328 When the target shares the same base name as the source
2329 and only the suffix varies, and if the builder method has
2330 a suffix defined for the target file type, then the tar‐
2331 get argument may be omitted completely, and scons will
2332 deduce the target file name from the source file name.
2333 The following examples all build the executable program
2334 bar (on POSIX systems) or bar.exe (on Windows systems)
2335 from the bar.c source file:
2336
2337 env.Program(target = 'bar', source = 'bar.c')
2338 env.Program('bar', source = 'bar.c')
2339 env.Program(source = 'bar.c')
2340 env.Program('bar.c')
2341
2342 As a convenience, a srcdir keyword argument may be
2343 specified when calling a Builder. When specified,
2344 all source file strings that are not absolute
2345 paths will be interpreted relative to the speci‐
2346 fied srcdir. The following example will build the
2347 build/prog (or build/prog.exe on Windows) program
2348 from the files src/f1.c and src/f2.c:
2349
2350 env.Program('build/prog', ['f1.c', 'f2.c'], srcdir='src')
2351
2352 It is possible to override or add construc‐
2353 tion variables when calling a builder
2354 method by passing additional keyword argu‐
2355 ments. These overridden or added variables
2356 will only be in effect when building the
2357 target, so they will not affect other parts
2358 of the build. For example, if you want to
2359 add additional libraries for just one pro‐
2360 gram:
2361
2362 env.Program('hello', 'hello.c', LIBS=['gl', 'glut'])
2363
2364 or generate a shared library with a
2365 non-standard suffix:
2366
2367 env.SharedLibrary('word', 'word.cpp',
2368 SHLIBSUFFIX='.ocx',
2369 LIBSUFFIXES=['.ocx'])
2370
2371 (Note that both the $SHLIB‐
2372 SUFFIX and $LIBSUFFIXES vari‐
2373 ables must be set if you want
2374 SCons to search automatically
2375 for dependencies on the non-
2376 standard library names; see
2377 the descriptions of these
2378 variables, below, for more
2379 information.)
2380
2381 It is also possible to use
2382 the parse_flags keyword argu‐
2383 ment in an override:
2384
2385 env = Program('hello', 'hello.c', parse_flags = '-Iinclude -DEBUG -lm')
2386
2387 This example adds
2388 'include' to CPPPATH,
2389 ´EBUG' to CPPDEFINES,
2390 and 'm' to LIBS.
2391
2392 Although the builder
2393 methods defined by
2394 scons are, in fact,
2395 methods of a construc‐
2396 tion environment
2397 object, they may also
2398 be called without an
2399 explicit environment:
2400
2401 Program('hello', 'hello.c')
2402 SharedLibrary('word', 'word.cpp')
2403
2404 In this case,
2405 the methods are
2406 called inter‐
2407 nally using a
2408 default con‐
2409 struction envi‐
2410 ronment that
2411 consists of the
2412 tools and val‐
2413 ues that scons
2414 has determined
2415 are appropriate
2416 for the local
2417 system.
2418
2419 Builder methods
2420 that can be
2421 called without
2422 an explicit
2423 environment may
2424 be called from
2425 custom Python
2426 modules that
2427 you import into
2428 an SConscript
2429 file by adding
2430 the following
2431 to the Python
2432 module:
2433
2434 from SCons.Script import *
2435
2436 All
2437 builder
2438 methods
2439 return a
2440 list-
2441 like
2442 object
2443 contain‐
2444 ing
2445 Nodes
2446 that
2447 repre‐
2448 sent the
2449 target
2450 or tar‐
2451 gets
2452 that
2453 will be
2454 built.
2455 A Node
2456 is an
2457 internal
2458 SCons
2459 object
2460 which
2461 repre‐
2462 sents
2463 build
2464 targets
2465 or
2466 sources.
2467
2468 The
2469 returned
2470 Node-
2471 list
2472 object
2473 can be
2474 passed
2475 to other
2476 builder
2477 methods
2478 as
2479 source(s)
2480 or
2481 passed
2482 to any
2483 SCons
2484 function
2485 or
2486 method
2487 where a
2488 filename
2489 would
2490 normally
2491 be
2492 accepted.
2493 For
2494 example,
2495 if it
2496 were
2497 neces‐
2498 sary to
2499 add a
2500 specific
2501 -D flag
2502 when
2503 compil‐
2504 ing one
2505 specific
2506 object
2507 file:
2508
2509 bar_obj_list = env.StaticObject('bar.c', CPPDEFINES='-DBAR')
2510 env.Program(source = ['foo.c', bar_obj_list, 'main.c'])
2511
2512 Using
2513 a
2514 Node
2515 in
2516 this
2517 way
2518 makes
2519 for
2520 a
2521 more
2522 por‐
2523 ta‐
2524 ble
2525 build
2526 by
2527 avoid‐
2528 ing
2529 hav‐
2530 ing
2531 to
2532 spec‐
2533 ify
2534 a
2535 plat‐
2536 form-
2537 spe‐
2538 cific
2539 object
2540 suf‐
2541 fix
2542 when
2543 call‐
2544 ing
2545 the
2546 Pro‐
2547 gram()
2548 builder
2549 method.
2550
2551 Note
2552 that
2553 Builder
2554 calls
2555 will
2556 auto‐
2557 mat‐
2558 i‐
2559 cally
2560 "flat‐
2561 ten"
2562 the
2563 source
2564 and
2565 tar‐
2566 get
2567 file
2568 lists,
2569 so
2570 it's
2571 all
2572 right
2573 to
2574 have
2575 the
2576 bar_obj
2577 list
2578 return
2579 by
2580 the
2581 Stati‐
2582 cOb‐
2583 ject()
2584 call
2585 in
2586 the
2587 mid‐
2588 dle
2589 of
2590 the
2591 source
2592 file
2593 list.
2594 If
2595 you
2596 need
2597 to
2598 manip‐
2599 u‐
2600 late
2601 a
2602 list
2603 of
2604 lists
2605 returned
2606 by
2607 Builders
2608 directly
2609 using
2610 Python,
2611 you
2612 can
2613 either
2614 build
2615 the
2616 list
2617 by
2618 hand:
2619
2620 foo = Object('foo.c')
2621 bar = Object('bar.c')
2622 objects = ['begin.o'] + foo + ['middle.o'] + bar + ['end.o']
2623 for object in objects:
2624 print str(object)
2625
2626 Or
2627 you
2628 can
2629 use
2630 the
2631 Flat‐
2632 ten()
2633 func‐
2634 tion
2635 sup‐
2636 plied
2637 by
2638 scons
2639 to
2640 cre‐
2641 ate
2642 a
2643 list
2644 con‐
2645 tain‐
2646 ing
2647 just
2648 the
2649 Nodes,
2650 which
2651 may
2652 be
2653 more
2654 con‐
2655 ve‐
2656 nient:
2657
2658 foo = Object('foo.c')
2659 bar = Object('bar.c')
2660 objects = Flatten(['begin.o', foo, 'middle.o', bar, 'end.o'])
2661 for object in objects:
2662 print str(object)
2663
2664 Note
2665 also
2666 that
2667 because
2668 Builder
2669 calls
2670 return
2671 a
2672 list-
2673 like
2674 object,
2675 not
2676 an
2677 actual
2678 Python
2679 list,
2680 you
2681 should
2682 not
2683 use
2684 the
2685 Python
2686 +=
2687 oper‐
2688 a‐
2689 tor
2690 to
2691 append
2692 Builder
2693 results
2694 to
2695 a
2696 Python
2697 list.
2698 Because
2699 the
2700 list
2701 and
2702 the
2703 object
2704 are
2705 dif‐
2706 fer‐
2707 ent
2708 types,
2709 Python
2710 will
2711 not
2712 update
2713 the
2714 orig‐
2715 i‐
2716 nal
2717 list
2718 in
2719 place,
2720 but
2721 will
2722 instead
2723 cre‐
2724 ate
2725 a
2726 new
2727 Node-
2728 list
2729 object
2730 con‐
2731 tain‐
2732 ing
2733 the
2734 con‐
2735 cate‐
2736 na‐
2737 tion
2738 of
2739 the
2740 list
2741 ele‐
2742 ments
2743 and
2744 the
2745 Builder
2746 results.
2747 This
2748 will
2749 cause
2750 prob‐
2751 lems
2752 for
2753 any
2754 other
2755 Python
2756 vari‐
2757 ables
2758 in
2759 your
2760 SCons
2761 con‐
2762 fig‐
2763 u‐
2764 ra‐
2765 tion
2766 that
2767 still
2768 hold
2769 on
2770 to
2771 a
2772 ref‐
2773 er‐
2774 ence
2775 to
2776 the
2777 orig‐
2778 i‐
2779 nal
2780 list.
2781 Instead,
2782 use
2783 the
2784 Python
2785 .extend()
2786 method
2787 to
2788 make
2789 sure
2790 the
2791 list
2792 is
2793 updated
2794 in-
2795 place.
2796 Exam‐
2797 ple:
2798
2799 object_files = []
2800
2801 # Do NOT use += as follows:
2802 #
2803 # object_files += Object('bar.c')
2804 #
2805 # It will not update the object_files list in place.
2806 #
2807 # Instead, use the .extend() method:
2808 object_files.extend(Object('bar.c'))
2809
2810
2811 The
2812 path
2813 name
2814 for
2815 a
2816 Node's
2817 file
2818 may
2819 be
2820 used
2821 by
2822 pass‐
2823 ing
2824 the
2825 Node
2826 to
2827 the
2828 Python-
2829 builtin
2830 str()
2831 func‐
2832 tion:
2833
2834 bar_obj_list = env.StaticObject('bar.c', CPPDEFINES='-DBAR')
2835 print "The path to bar_obj is:", str(bar_obj_list[0])
2836
2837 Note
2838 again
2839 that
2840 because
2841 the
2842 Builder
2843 call
2844 returns
2845 a
2846 list,
2847 we
2848 have
2849 to
2850 access
2851 the
2852 first
2853 ele‐
2854 ment
2855 in
2856 the
2857 list
2858 (bar_obj_list[0])
2859 to
2860 get
2861 at
2862 the
2863 Node
2864 that
2865 actu‐
2866 ally
2867 rep‐
2868 re‐
2869 sents
2870 the
2871 object
2872 file.
2873
2874 Builder
2875 calls
2876 sup‐
2877 port
2878 a
2879 chdir
2880 key‐
2881 word
2882 argu‐
2883 ment
2884 that
2885 spec‐
2886 i‐
2887 fies
2888 that
2889 the
2890 Builder's
2891 action(s)
2892 should
2893 be
2894 exe‐
2895 cuted
2896 after
2897 chang‐
2898 ing
2899 direc‐
2900 tory.
2901 If
2902 the
2903 chdir
2904 argu‐
2905 ment
2906 is
2907 a
2908 string
2909 or
2910 a
2911 direc‐
2912 tory
2913 Node,
2914 scons
2915 will
2916 change
2917 to
2918 the
2919 spec‐
2920 i‐
2921 fied
2922 direc‐
2923 tory.
2924 If
2925 the
2926 chdir
2927 is
2928 not
2929 a
2930 string
2931 or
2932 Node
2933 and
2934 is
2935 non-
2936 zero,
2937 then
2938 scons
2939 will
2940 change
2941 to
2942 the
2943 tar‐
2944 get
2945 file's
2946 direc‐
2947 tory.
2948
2949 # scons will change to the "sub" subdirectory
2950 # before executing the "cp" command.
2951 env.Command('sub/dir/foo.out', 'sub/dir/foo.in',
2952 "cp dir/foo.in dir/foo.out",
2953 chdir='sub')
2954
2955 # Because chdir is not a string, scons will change to the
2956 # target's directory ("sub/dir") before executing the
2957 # "cp" command.
2958 env.Command('sub/dir/foo.out', 'sub/dir/foo.in',
2959 "cp foo.in foo.out",
2960 chdir=1)
2961
2962 Note
2963 that
2964 scons
2965 will
2966 not
2967 auto‐
2968 mat‐
2969 i‐
2970 cally
2971 mod‐
2972 ify
2973 its
2974 expan‐
2975 sion
2976 of
2977 con‐
2978 struc‐
2979 tion
2980 vari‐
2981 ables
2982 like
2983 $TAR‐
2984 GET
2985 and
2986 $SOURCE
2987 when
2988 using
2989 the
2990 chdir
2991 key‐
2992 word
2993 argu‐
2994 ment--that
2995 is,
2996 the
2997 expanded
2998 file
2999 names
3000 will
3001 still
3002 be
3003 rel‐
3004 a‐
3005 tive
3006 to
3007 the
3008 top-
3009 level
3010 SCon‐
3011 struct
3012 direc‐
3013 tory,
3014 and
3015 con‐
3016 se‐
3017 quently
3018 incor‐
3019 rect
3020 rel‐
3021 a‐
3022 tive
3023 to
3024 the
3025 chdir
3026 direc‐
3027 tory.
3028 If
3029 you
3030 use
3031 the
3032 chdir
3033 key‐
3034 word
3035 argu‐
3036 ment,
3037 you
3038 will
3039 typ‐
3040 i‐
3041 cally
3042 need
3043 to
3044 sup‐
3045 ply
3046 a
3047 dif‐
3048 fer‐
3049 ent
3050 com‐
3051 mand
3052 line
3053 using
3054 expan‐
3055 sions
3056 like
3057 ${TAR‐
3058 GET.file}
3059 and
3060 ${SOURCE.file}
3061 to
3062 use
3063 just
3064 the
3065 file‐
3066 name
3067 por‐
3068 tion
3069 of
3070 the
3071 tar‐
3072 gets
3073 and
3074 source.
3075
3076 scons
3077 pro‐
3078 vides
3079 the
3080 fol‐
3081 low‐
3082 ing
3083 builder
3084 meth‐
3085 ods:
3086
3087
3088
3089 CFile()
3090
3091 env.CFile()
3092 Builds
3093 a
3094 C
3095 source
3096 file
3097 given
3098 a
3099 lex
3100 (.l)
3101 or
3102 yacc
3103 (.y)
3104 input
3105 file.
3106 The
3107 suf‐
3108 fix
3109 spec‐
3110 i‐
3111 fied
3112 by
3113 the
3114 $CFILE‐
3115 SUF‐
3116 FIX
3117 con‐
3118 struc‐
3119 tion
3120 vari‐
3121 able
3122 (.c
3123 by
3124 default)
3125 is
3126 auto‐
3127 mat‐
3128 i‐
3129 cally
3130 added
3131 to
3132 the
3133 tar‐
3134 get
3135 if
3136 it
3137 is
3138 not
3139 already
3140 present.
3141 Exam‐
3142 ple:
3143
3144 # builds foo.c
3145 env.CFile(target = 'foo.c', source = 'foo.l')
3146 # builds bar.c
3147 env.CFile(target = 'bar', source = 'bar.y')
3148
3149 CXXFile()
3150
3151 env.CXXFile()
3152 Builds
3153 a
3154 C++
3155 source
3156 file
3157 given
3158 a
3159 lex
3160 (.ll)
3161 or
3162 yacc
3163 (.yy)
3164 input
3165 file.
3166 The
3167 suf‐
3168 fix
3169 spec‐
3170 i‐
3171 fied
3172 by
3173 the
3174 $CXXFILE‐
3175 SUF‐
3176 FIX
3177 con‐
3178 struc‐
3179 tion
3180 vari‐
3181 able
3182 (.cc
3183 by
3184 default)
3185 is
3186 auto‐
3187 mat‐
3188 i‐
3189 cally
3190 added
3191 to
3192 the
3193 tar‐
3194 get
3195 if
3196 it
3197 is
3198 not
3199 already
3200 present.
3201 Exam‐
3202 ple:
3203
3204 # builds foo.cc
3205 env.CXXFile(target = 'foo.cc', source = 'foo.ll')
3206 # builds bar.cc
3207 env.CXXFile(target = 'bar', source = 'bar.yy')
3208
3209 DVI()
3210
3211 env.DVI()
3212 Builds
3213 a
3214 .dvi
3215 file
3216 from
3217 a
3218 .tex,
3219 .ltx
3220 or
3221 .latex
3222 input
3223 file.
3224 If
3225 the
3226 source
3227 file
3228 suf‐
3229 fix
3230 is
3231 .tex,
3232 scons
3233 will
3234 exam‐
3235 ine
3236 the
3237 con‐
3238 tents
3239 of
3240 the
3241 file;
3242 if
3243 the
3244 string
3245 ocu‐
3246 ment‐
3247 class
3248 or
3249 ocu‐
3250 mentstyle
3251 is
3252 found,
3253 the
3254 file
3255 is
3256 assumed
3257 to
3258 be
3259 a
3260 LaTeX
3261 file
3262 and
3263 the
3264 tar‐
3265 get
3266 is
3267 built
3268 by
3269 invok‐
3270 ing
3271 the
3272 $LATEX‐
3273 COM
3274 com‐
3275 mand
3276 line;
3277 oth‐
3278 er‐
3279 wise,
3280 the
3281 $TEX‐
3282 COM
3283 com‐
3284 mand
3285 line
3286 is
3287 used.
3288 If
3289 the
3290 file
3291 is
3292 a
3293 LaTeX
3294 file,
3295 the
3296 DVI()
3297 builder
3298 method
3299 will
3300 also
3301 exam‐
3302 ine
3303 the
3304 con‐
3305 tents
3306 of
3307 the
3308 .aux
3309 file
3310 and
3311 invoke
3312 the
3313 $BIB‐
3314 TEX
3315 com‐
3316 mand
3317 line
3318 if
3319 the
3320 string
3321 bib‐
3322 data
3323 is
3324 found,
3325 start
3326 $MAKEIN‐
3327 DEX
3328 to
3329 gen‐
3330 er‐
3331 ate
3332 an
3333 index
3334 if
3335 a
3336 .ind
3337 file
3338 is
3339 found
3340 and
3341 will
3342 exam‐
3343 ine
3344 the
3345 con‐
3346 tents
3347 .log
3348 file
3349 and
3350 re-
3351 run
3352 the
3353 $LATEX‐
3354 COM
3355 com‐
3356 mand
3357 if
3358 the
3359 log
3360 file
3361 says
3362 it
3363 is
3364 nec‐
3365 es‐
3366 sary.
3367
3368 The
3369 suf‐
3370 fix
3371 .dvi
3372 (hard-
3373 coded
3374 within
3375 TeX
3376 itself)
3377 is
3378 auto‐
3379 mat‐
3380 i‐
3381 cally
3382 added
3383 to
3384 the
3385 tar‐
3386 get
3387 if
3388 it
3389 is
3390 not
3391 already
3392 present.
3393 Exam‐
3394 ples:
3395
3396 # builds from aaa.tex
3397 env.DVI(target = 'aaa.dvi', source = 'aaa.tex')
3398 # builds bbb.dvi
3399 env.DVI(target = 'bbb', source = 'bbb.ltx')
3400 # builds from ccc.latex
3401 env.DVI(target = 'ccc.dvi', source = 'ccc.latex')
3402
3403 Install()
3404
3405 env.Install()
3406 Installs
3407 one
3408 or
3409 more
3410 source
3411 files
3412 or
3413 direc‐
3414 to‐
3415 ries
3416 in
3417 the
3418 spec‐
3419 i‐
3420 fied
3421 tar‐
3422 get,
3423 which
3424 must
3425 be
3426 a
3427 direc‐
3428 tory.
3429 The
3430 names
3431 of
3432 the
3433 spec‐
3434 i‐
3435 fied
3436 source
3437 files
3438 or
3439 direc‐
3440 to‐
3441 ries
3442 remain
3443 the
3444 same
3445 within
3446 the
3447 des‐
3448 ti‐
3449 na‐
3450 tion
3451 direc‐
3452 tory.
3453
3454 env.Install('/usr/local/bin', source = ['foo', 'bar'])
3455
3456 Instal‐
3457 lAs()
3458
3459 env.Instal‐
3460 lAs()
3461 Installs
3462 one
3463 or
3464 more
3465 source
3466 files
3467 or
3468 direc‐
3469 to‐
3470 ries
3471 to
3472 spe‐
3473 cific
3474 names,
3475 allow‐
3476 ing
3477 chang‐
3478 ing
3479 a
3480 file
3481 or
3482 direc‐
3483 tory
3484 name
3485 as
3486 part
3487 of
3488 the
3489 instal‐
3490 la‐
3491 tion.
3492 It
3493 is
3494 an
3495 error
3496 if
3497 the
3498 tar‐
3499 get
3500 and
3501 source
3502 argu‐
3503 ments
3504 list
3505 dif‐
3506 fer‐
3507 ent
3508 num‐
3509 bers
3510 of
3511 files
3512 or
3513 direc‐
3514 to‐
3515 ries.
3516
3517 env.InstallAs(target = '/usr/local/bin/foo',
3518 source = 'foo_debug')
3519 env.InstallAs(target = ['../lib/libfoo.a', '../lib/libbar.a'],
3520 source = ['libFOO.a', 'libBAR.a'])
3521
3522 Jar()
3523
3524 env.Jar()
3525 Builds
3526 a
3527 Java
3528 ar‐
3529 chive
3530 (.jar)
3531 file
3532 from
3533 the
3534 spec‐
3535 i‐
3536 fied
3537 list
3538 of
3539 sources.
3540 Any
3541 direc‐
3542 to‐
3543 ries
3544 in
3545 the
3546 source
3547 list
3548 will
3549 be
3550 searched
3551 for
3552 .class
3553 files).
3554 Any
3555 .java
3556 files
3557 in
3558 the
3559 source
3560 list
3561 will
3562 be
3563 com‐
3564 piled
3565 to
3566 .class
3567 files
3568 by
3569 call‐
3570 ing
3571 the
3572 Java()
3573 Builder.
3574
3575 If
3576 the
3577 $JARCHDIR
3578 value
3579 is
3580 set,
3581 the
3582 jar
3583 com‐
3584 mand
3585 will
3586 change
3587 to
3588 the
3589 spec‐
3590 i‐
3591 fied
3592 direc‐
3593 tory
3594 using
3595 the
3596 -C
3597 option.
3598 If
3599 $JARCHDIR
3600 is
3601 not
3602 set
3603 explic‐
3604 itly,
3605 &SCons;
3606 will
3607 use
3608 the
3609 top
3610 of
3611 any
3612 sub‐
3613 di‐
3614 rec‐
3615 tory
3616 tree
3617 in
3618 which
3619 Java
3620 .class
3621 were
3622 built
3623 by
3624 the
3625 Java()
3626 Builder.
3627
3628 If
3629 the
3630 con‐
3631 tents
3632 any
3633 of
3634 the
3635 source
3636 files
3637 begin
3638 with
3639 the
3640 string
3641 Man‐
3642 i‐
3643 fest-
3644 Ver‐
3645 sion,
3646 the
3647 file
3648 is
3649 assumed
3650 to
3651 be
3652 a
3653 man‐
3654 i‐
3655 fest
3656 and
3657 is
3658 passed
3659 to
3660 the
3661 jar
3662 com‐
3663 mand
3664 with
3665 the
3666 m
3667 option
3668 set.
3669
3670 env.Jar(target = 'foo.jar', source = 'classes')
3671
3672 env.Jar(target = 'bar.jar',
3673 source = ['bar1.java', 'bar2.java'])
3674
3675 Java()
3676
3677 env.Java()
3678 Builds
3679 one
3680 or
3681 more
3682 Java
3683 class
3684 files.
3685 The
3686 sources
3687 may
3688 be
3689 any
3690 com‐
3691 bi‐
3692 na‐
3693 tion
3694 of
3695 explicit
3696 .java
3697 files,
3698 or
3699 direc‐
3700 tory
3701 trees
3702 which
3703 will
3704 be
3705 scanned
3706 for
3707 .java
3708 files.
3709
3710 SCons
3711 will
3712 parse
3713 each
3714 source
3715 .java
3716 file
3717 to
3718 find
3719 the
3720 classes
3721 (includ‐
3722 ing
3723 inner
3724 classes)
3725 defined
3726 within
3727 that
3728 file,
3729 and
3730 from
3731 that
3732 fig‐
3733 ure
3734 out
3735 the
3736 tar‐
3737 get
3738 .class
3739 files
3740 that
3741 will
3742 be
3743 cre‐
3744 ated.
3745 The
3746 class
3747 files
3748 will
3749 be
3750 placed
3751 under‐
3752 neath
3753 the
3754 spec‐
3755 i‐
3756 fied
3757 tar‐
3758 get
3759 direc‐
3760 tory.
3761
3762 SCons
3763 will
3764 also
3765 search
3766 each
3767 Java
3768 file
3769 for
3770 the
3771 Java
3772 pack‐
3773 age
3774 name,
3775 which
3776 it
3777 assumes
3778 can
3779 be
3780 found
3781 on
3782 a
3783 line
3784 begin‐
3785 ning
3786 with
3787 the
3788 string
3789 pack‐
3790 age
3791 in
3792 the
3793 first
3794 col‐
3795 umn;
3796 the
3797 result‐
3798 ing
3799 .class
3800 files
3801 will
3802 be
3803 placed
3804 in
3805 a
3806 direc‐
3807 tory
3808 reflect‐
3809 ing
3810 the
3811 spec‐
3812 i‐
3813 fied
3814 pack‐
3815 age
3816 name.
3817 For
3818 exam‐
3819 ple,
3820 the
3821 file
3822 Foo.java
3823 defin‐
3824 ing
3825 a
3826 sin‐
3827 gle
3828 pub‐
3829 lic
3830 Foo
3831 class
3832 and
3833 con‐
3834 tain‐
3835 ing
3836 a
3837 pack‐
3838 age
3839 name
3840 of
3841 sub.dir
3842 will
3843 gen‐
3844 er‐
3845 ate
3846 a
3847 cor‐
3848 re‐
3849 spond‐
3850 ing
3851 sub/dir/Foo.class
3852 class
3853 file.
3854
3855 Exam‐
3856 ple:
3857
3858 env.Java(target = 'classes', source = 'src')
3859 env.Java(target = 'classes', source = ['src1', 'src2'])
3860 env.Java(target = 'classes', source = ['File1.java', 'File2.java'])
3861
3862 JavaH()
3863
3864 env.JavaH()
3865 Builds
3866 C
3867 header
3868 and
3869 source
3870 files
3871 for
3872 imple‐
3873 ment‐
3874 ing
3875 Java
3876 native
3877 meth‐
3878 ods.
3879 The
3880 tar‐
3881 get
3882 can
3883 be
3884 either
3885 a
3886 direc‐
3887 tory
3888 in
3889 which
3890 the
3891 header
3892 files
3893 will
3894 be
3895 writ‐
3896 ten,
3897 or
3898 a
3899 header
3900 file
3901 name
3902 which
3903 will
3904 con‐
3905 tain
3906 all
3907 of
3908 the
3909 def‐
3910 i‐
3911 ni‐
3912 tions.
3913 The
3914 source
3915 can
3916 be
3917 the
3918 names
3919 of
3920 .class
3921 files,
3922 the
3923 names
3924 of
3925 .java
3926 files
3927 to
3928 be
3929 com‐
3930 piled
3931 into
3932 .class
3933 files
3934 by
3935 call‐
3936 ing
3937 the
3938 Java()
3939 builder
3940 method,
3941 or
3942 the
3943 objects
3944 returned
3945 from
3946 the
3947 Java()
3948 builder
3949 method.
3950
3951 If
3952 the
3953 con‐
3954 struc‐
3955 tion
3956 vari‐
3957 able
3958 $JAVA‐
3959 CLASS‐
3960 DIR
3961 is
3962 set,
3963 either
3964 in
3965 the
3966 envi‐
3967 ron‐
3968 ment
3969 or
3970 in
3971 the
3972 call
3973 to
3974 the
3975 JavaH()
3976 builder
3977 method
3978 itself,
3979 then
3980 the
3981 value
3982 of
3983 the
3984 vari‐
3985 able
3986 will
3987 be
3988 stripped
3989 from
3990 the
3991 begin‐
3992 ning
3993 of
3994 any
3995 .class
3996 file
3997 names.
3998
3999 Exam‐
4000 ples:
4001
4002 # builds java_native.h
4003 classes = env.Java(target = 'classdir', source = 'src')
4004 env.JavaH(target = 'java_native.h', source = classes)
4005
4006 # builds include/package_foo.h and include/package_bar.h
4007 env.JavaH(target = 'include',
4008 source = ['package/foo.class', 'package/bar.class'])
4009
4010 # builds export/foo.h and export/bar.h
4011 env.JavaH(target = 'export',
4012 source = ['classes/foo.class', 'classes/bar.class'],
4013 JAVACLASSDIR = 'classes')
4014
4015 Library()
4016
4017 env.Library()
4018 A
4019 syn‐
4020 onym
4021 for
4022 the
4023 Stat‐
4024 i‐
4025 cLi‐
4026 brary()
4027 builder
4028 method.
4029
4030
4031 Load‐
4032 able‐
4033 Mod‐
4034 ule()
4035
4036 env.Load‐
4037 able‐
4038 Mod‐
4039 ule()
4040 On
4041 most
4042 sys‐
4043 tems,
4044 this
4045 is
4046 the
4047 same
4048 as
4049 SharedLi‐
4050 brary().
4051 On
4052 Mac
4053 OS
4054 X
4055 (Dar‐
4056 win)
4057 plat‐
4058 forms,
4059 this
4060 cre‐
4061 ates
4062 a
4063 load‐
4064 able
4065 mod‐
4066 ule
4067 bun‐
4068 dle.
4069
4070
4071 M4()
4072
4073 env.M4()
4074 Builds
4075 an
4076 out‐
4077 put
4078 file
4079 from
4080 an
4081 M4
4082 input
4083 file.
4084 This
4085 uses
4086 a
4087 default
4088 $M4FLAGS
4089 value
4090 of
4091 -E,
4092 which
4093 con‐
4094 sid‐
4095 ers
4096 all
4097 warn‐
4098 ings
4099 to
4100 be
4101 fatal
4102 and
4103 stops
4104 on
4105 the
4106 first
4107 warn‐
4108 ing
4109 when
4110 using
4111 the
4112 GNU
4113 ver‐
4114 sion
4115 of
4116 m4.
4117 Exam‐
4118 ple:
4119
4120 env.M4(target = 'foo.c', source = 'foo.c.m4')
4121
4122 Moc()
4123
4124 env.Moc()
4125 Builds
4126 an
4127 out‐
4128 put
4129 file
4130 from
4131 a
4132 moc
4133 input
4134 file.
4135 Moc
4136 input
4137 files
4138 are
4139 either
4140 header
4141 files
4142 or
4143 cxx
4144 files.
4145 This
4146 builder
4147 is
4148 only
4149 avail‐
4150 able
4151 after
4152 using
4153 the
4154 tool
4155 'qt'.
4156 See
4157 the
4158 $QTDIR
4159 vari‐
4160 able
4161 for
4162 more
4163 infor‐
4164 ma‐
4165 tion.
4166 Exam‐
4167 ple:
4168
4169 env.Moc('foo.h') # generates moc_foo.cc
4170 env.Moc('foo.cpp') # generates foo.moc
4171
4172 MSVSPro‐
4173 ject()
4174
4175 env.MSVSPro‐
4176 ject()
4177 Builds
4178 a
4179 Mi‐
4180 cro‐
4181 soft
4182 Vis‐
4183 ual
4184 Stu‐
4185 dio
4186 project
4187 file,
4188 and
4189 by
4190 default
4191 builds
4192 a
4193 solu‐
4194 tion
4195 file
4196 as
4197 well.
4198
4199 This
4200 builds
4201 a
4202 Vis‐
4203 ual
4204 Stu‐
4205 dio
4206 project
4207 file,
4208 based
4209 on
4210 the
4211 ver‐
4212 sion
4213 of
4214 Vis‐
4215 ual
4216 Stu‐
4217 dio
4218 that
4219 is
4220 con‐
4221 fig‐
4222 ured
4223 (either
4224 the
4225 lat‐
4226 est
4227 installed
4228 ver‐
4229 sion,
4230 or
4231 the
4232 ver‐
4233 sion
4234 spec‐
4235 i‐
4236 fied
4237 by
4238 $MSVS_VER‐
4239 SION
4240 in
4241 the
4242 Envi‐
4243 ron‐
4244 ment
4245 con‐
4246 struc‐
4247 tor).
4248 For
4249 Vis‐
4250 ual
4251 Stu‐
4252 dio
4253 6,
4254 it
4255 will
4256 gen‐
4257 er‐
4258 ate
4259 a
4260 .dsp
4261 file.
4262 For
4263 Vis‐
4264 ual
4265 Stu‐
4266 dio
4267 7
4268 (.NET)
4269 and
4270 later
4271 ver‐
4272 sions,
4273 it
4274 will
4275 gen‐
4276 er‐
4277 ate
4278 a
4279 .vcproj
4280 file.
4281
4282 By
4283 default,
4284 this
4285 also
4286 gen‐
4287 er‐
4288 ates
4289 a
4290 solu‐
4291 tion
4292 file
4293 for
4294 the
4295 spec‐
4296 i‐
4297 fied
4298 project,
4299 a
4300 .dsw
4301 file
4302 for
4303 Vis‐
4304 ual
4305 Stu‐
4306 dio
4307 6
4308 or
4309 a
4310 .sln
4311 file
4312 for
4313 Vis‐
4314 ual
4315 Stu‐
4316 dio
4317 7
4318 (.NET).
4319 This
4320 behav‐
4321 ior
4322 may
4323 be
4324 dis‐
4325 abled
4326 by
4327 spec‐
4328 i‐
4329 fy‐
4330 ing
4331 auto_build_solu‐
4332 tion=0
4333 when
4334 you
4335 call
4336 MSVSPro‐
4337 ject(),
4338 in
4339 which
4340 case
4341 you
4342 pre‐
4343 sum‐
4344 ably
4345 want
4346 to
4347 build
4348 the
4349 solu‐
4350 tion
4351 file(s)
4352 by
4353 call‐
4354 ing
4355 the
4356 MSVS‐
4357 So‐
4358 lu‐
4359 tion()
4360 Builder
4361 (see
4362 below).
4363
4364 It
4365 takes
4366 sev‐
4367 eral
4368 lists
4369 of
4370 file‐
4371 names
4372 to
4373 be
4374 placed
4375 into
4376 the
4377 project
4378 file.
4379 These
4380 are
4381 cur‐
4382 rently
4383 lim‐
4384 ited
4385 to
4386 srcs,
4387 incs,
4388 local‐
4389 incs,
4390 resources,
4391 and
4392 misc.
4393 These
4394 are
4395 pretty
4396 self-
4397 explana‐
4398 tory,
4399 but
4400 it
4401 should
4402 be
4403 noted
4404 that
4405 these
4406 lists
4407 are
4408 added
4409 to
4410 the
4411 $SOURCES
4412 con‐
4413 struc‐
4414 tion
4415 vari‐
4416 able
4417 as
4418 strings,
4419 NOT
4420 as
4421 SCons
4422 File
4423 Nodes.
4424 This
4425 is
4426 because
4427 they
4428 rep‐
4429 re‐
4430 sent
4431 file
4432 names
4433 to
4434 be
4435 added
4436 to
4437 the
4438 project
4439 file,
4440 not
4441 the
4442 source
4443 files
4444 used
4445 to
4446 build
4447 the
4448 project
4449 file.
4450
4451 The
4452 above
4453 file‐
4454 name
4455 lists
4456 are
4457 all
4458 optional,
4459 although
4460 at
4461 least
4462 one
4463 must
4464 be
4465 spec‐
4466 i‐
4467 fied
4468 for
4469 the
4470 result‐
4471 ing
4472 project
4473 file
4474 to
4475 be
4476 non-
4477 empty.
4478
4479 In
4480 addi‐
4481 tion
4482 to
4483 the
4484 above
4485 lists
4486 of
4487 val‐
4488 ues,
4489 the
4490 fol‐
4491 low‐
4492 ing
4493 val‐
4494 ues
4495 may
4496 be
4497 spec‐
4498 i‐
4499 fied:
4500
4501 tar‐
4502 get:
4503 The
4504 name
4505 of
4506 the
4507 tar‐
4508 get
4509 .dsp
4510 or
4511 .vcproj
4512 file.
4513 The
4514 cor‐
4515 rect
4516 suf‐
4517 fix
4518 for
4519 the
4520 ver‐
4521 sion
4522 of
4523 Vis‐
4524 ual
4525 Stu‐
4526 dio
4527 must
4528 be
4529 used,
4530 but
4531 the
4532 $MSVSPRO‐
4533 JECT‐
4534 SUF‐
4535 FIX
4536 con‐
4537 struc‐
4538 tion
4539 vari‐
4540 able
4541 will
4542 be
4543 defined
4544 to
4545 the
4546 cor‐
4547 rect
4548 value
4549 (see
4550 exam‐
4551 ple
4552 below).
4553
4554 vari‐
4555 ant:
4556 The
4557 name
4558 of
4559 this
4560 par‐
4561 tic‐
4562 u‐
4563 lar
4564 vari‐
4565 ant.
4566 For
4567 Vis‐
4568 ual
4569 Stu‐
4570 dio
4571 7
4572 projects,
4573 this
4574 can
4575 also
4576 be
4577 a
4578 list
4579 of
4580 vari‐
4581 ant
4582 names.
4583 These
4584 are
4585 typ‐
4586 i‐
4587 cally
4588 things
4589 like
4590 "Debug"
4591 or
4592 "Release",
4593 but
4594 really
4595 can
4596 be
4597 any‐
4598 thing
4599 you
4600 want.
4601 For
4602 Vis‐
4603 ual
4604 Stu‐
4605 dio
4606 7
4607 projects,
4608 they
4609 may
4610 also
4611 spec‐
4612 ify
4613 a
4614 tar‐
4615 get
4616 plat‐
4617 form
4618 sep‐
4619 a‐
4620 rated
4621 from
4622 the
4623 vari‐
4624 ant
4625 name
4626 by
4627 a
4628 |
4629 (ver‐
4630 ti‐
4631 cal
4632 pipe)
4633 char‐
4634 ac‐
4635 ter:
4636 Debug|Xbox.
4637 The
4638 default
4639 tar‐
4640 get
4641 plat‐
4642 form
4643 is
4644 Win32.
4645 Mul‐
4646 ti‐
4647 ple
4648 calls
4649 to
4650 MSVSPro‐
4651 ject()
4652 with
4653 dif‐
4654 fer‐
4655 ent
4656 vari‐
4657 ants
4658 are
4659 allowed;
4660 all
4661 vari‐
4662 ants
4663 will
4664 be
4665 added
4666 to
4667 the
4668 project
4669 file
4670 with
4671 their
4672 appro‐
4673 pri‐
4674 ate
4675 build
4676 tar‐
4677 gets
4678 and
4679 sources.
4680
4681 build‐
4682 tar‐
4683 get:
4684 An
4685 optional
4686 string,
4687 node,
4688 or
4689 list
4690 of
4691 strings
4692 or
4693 nodes
4694 (one
4695 per
4696 build
4697 vari‐
4698 ant),
4699 to
4700 tell
4701 the
4702 Vis‐
4703 ual
4704 Stu‐
4705 dio
4706 debug‐
4707 ger
4708 what
4709 out‐
4710 put
4711 tar‐
4712 get
4713 to
4714 use
4715 in
4716 what
4717 build
4718 vari‐
4719 ant.
4720 The
4721 num‐
4722 ber
4723 of
4724 build‐
4725 tar‐
4726 get
4727 entries
4728 must
4729 match
4730 the
4731 num‐
4732 ber
4733 of
4734 vari‐
4735 ant
4736 entries.
4737
4738 run‐
4739 file:
4740 The
4741 name
4742 of
4743 the
4744 file
4745 that
4746 Vis‐
4747 ual
4748 Stu‐
4749 dio
4750 7
4751 and
4752 later
4753 will
4754 run
4755 and
4756 debug.
4757 This
4758 appears
4759 as
4760 the
4761 value
4762 of
4763 the
4764 Out‐
4765 put
4766 field
4767 in
4768 the
4769 resut‐
4770 ling
4771 Vis‐
4772 ual
4773 Stu‐
4774 dio
4775 project
4776 file.
4777 If
4778 this
4779 is
4780 not
4781 spec‐
4782 i‐
4783 fied,
4784 the
4785 default
4786 is
4787 the
4788 same
4789 as
4790 the
4791 spec‐
4792 i‐
4793 fied
4794 build‐
4795 tar‐
4796 get
4797 value.
4798
4799 Exam‐
4800 ple
4801 usage:
4802
4803 barsrcs = ['bar.cpp'],
4804 barincs = ['bar.h'],
4805 barlocalincs = ['StdAfx.h']
4806 barresources = ['bar.rc','resource.h']
4807 barmisc = ['bar_readme.txt']
4808
4809 dll = env.SharedLibrary(target = 'bar.dll',
4810 source = barsrcs)
4811
4812 env.MSVSProject(target = 'Bar' + env['MSVSPROJECTSUFFIX'],
4813 srcs = barsrcs,
4814 incs = barincs,
4815 localincs = barlocalincs,
4816 resources = barresources,
4817 misc = barmisc,
4818 buildtarget = dll,
4819 variant = 'Release')
4820
4821 MSVS‐
4822 So‐
4823 lu‐
4824 tion()
4825
4826 env.MSVS‐
4827 So‐
4828 lu‐
4829 tion()
4830 Builds
4831 a
4832 Mi‐
4833 cro‐
4834 soft
4835 Vis‐
4836 ual
4837 Stu‐
4838 dio
4839 solu‐
4840 tion
4841 file.
4842
4843 This
4844 builds
4845 a
4846 Vis‐
4847 ual
4848 Stu‐
4849 dio
4850 solu‐
4851 tion
4852 file,
4853 based
4854 on
4855 the
4856 ver‐
4857 sion
4858 of
4859 Vis‐
4860 ual
4861 Stu‐
4862 dio
4863 that
4864 is
4865 con‐
4866 fig‐
4867 ured
4868 (either
4869 the
4870 lat‐
4871 est
4872 installed
4873 ver‐
4874 sion,
4875 or
4876 the
4877 ver‐
4878 sion
4879 spec‐
4880 i‐
4881 fied
4882 by
4883 $MSVS_VER‐
4884 SION
4885 in
4886 the
4887 con‐
4888 struc‐
4889 tion
4890 envi‐
4891 ron‐
4892 ment).
4893 For
4894 Vis‐
4895 ual
4896 Stu‐
4897 dio
4898 6,
4899 it
4900 will
4901 gen‐
4902 er‐
4903 ate
4904 a
4905 .dsw
4906 file.
4907 For
4908 Vis‐
4909 ual
4910 Stu‐
4911 dio
4912 7
4913 (.NET),
4914 it
4915 will
4916 gen‐
4917 er‐
4918 ate
4919 a
4920 .sln
4921 file.
4922
4923 The
4924 fol‐
4925 low‐
4926 ing
4927 val‐
4928 ues
4929 must
4930 be
4931 spec‐
4932 i‐
4933 fied:
4934
4935 tar‐
4936 get:
4937 The
4938 name
4939 of
4940 the
4941 tar‐
4942 get
4943 .dsw
4944 or
4945 .sln
4946 file.
4947 The
4948 cor‐
4949 rect
4950 suf‐
4951 fix
4952 for
4953 the
4954 ver‐
4955 sion
4956 of
4957 Vis‐
4958 ual
4959 Stu‐
4960 dio
4961 must
4962 be
4963 used,
4964 but
4965 the
4966 value
4967 $MSVS‐
4968 SO‐
4969 LU‐
4970 TION‐
4971 SUF‐
4972 FIX
4973 will
4974 be
4975 defined
4976 to
4977 the
4978 cor‐
4979 rect
4980 value
4981 (see
4982 exam‐
4983 ple
4984 below).
4985
4986 vari‐
4987 ant:
4988 The
4989 name
4990 of
4991 this
4992 par‐
4993 tic‐
4994 u‐
4995 lar
4996 vari‐
4997 ant,
4998 or
4999 a
5000 list
5001 of
5002 vari‐
5003 ant
5004 names
5005 (the
5006 lat‐
5007 ter
5008 is
5009 only
5010 sup‐
5011 ported
5012 for
5013 MSVS
5014 7
5015 solu‐
5016 tions).
5017 These
5018 are
5019 typ‐
5020 i‐
5021 cally
5022 things
5023 like
5024 "Debug"
5025 or
5026 "Release",
5027 but
5028 really
5029 can
5030 be
5031 any‐
5032 thing
5033 you
5034 want.
5035 For
5036 MSVS
5037 7
5038 they
5039 may
5040 also
5041 spec‐
5042 ify
5043 tar‐
5044 get
5045 plat‐
5046 form,
5047 like
5048 this
5049 "Debug|Xbox".
5050 Default
5051 plat‐
5052 form
5053 is
5054 Win32.
5055
5056 projects:
5057 A
5058 list
5059 of
5060 project
5061 file
5062 names,
5063 or
5064 Project
5065 nodes
5066 returned
5067 by
5068 calls
5069 to
5070 the
5071 MSVSPro‐
5072 ject()
5073 Builder,
5074 to
5075 be
5076 placed
5077 into
5078 the
5079 solu‐
5080 tion
5081 file.
5082 It
5083 should
5084 be
5085 noted
5086 that
5087 these
5088 file
5089 names
5090 are
5091 NOT
5092 added
5093 to
5094 the
5095 $SOURCES
5096 envi‐
5097 ron‐
5098 ment
5099 vari‐
5100 able
5101 in
5102 form
5103 of
5104 files,
5105 but
5106 rather
5107 as
5108 strings.
5109 This
5110 is
5111 because
5112 they
5113 rep‐
5114 re‐
5115 sent
5116 file
5117 names
5118 to
5119 be
5120 added
5121 to
5122 the
5123 solu‐
5124 tion
5125 file,
5126 not
5127 the
5128 source
5129 files
5130 used
5131 to
5132 build
5133 the
5134 solu‐
5135 tion
5136 file.
5137
5138 (NOTE:
5139 Cur‐
5140 rently
5141 only
5142 one
5143 project
5144 is
5145 sup‐
5146 ported
5147 per
5148 solu‐
5149 tion.)
5150
5151 Exam‐
5152 ple
5153 Usage:
5154
5155 env.MSVSSolution(target = 'Bar' + env['MSVSSOLUTIONSUFFIX'],
5156 projects = ['bar' + env['MSVSPROJECTSUFFIX']],
5157 variant = 'Release')
5158
5159 Object()
5160
5161 env.Object()
5162 A
5163 syn‐
5164 onym
5165 for
5166 the
5167 Stati‐
5168 cOb‐
5169 ject()
5170 builder
5171 method.
5172
5173
5174 Pack‐
5175 age()
5176
5177 env.Pack‐
5178 age()
5179 Builds
5180 soft‐
5181 ware
5182 dis‐
5183 tri‐
5184 bu‐
5185 tion
5186 pack‐
5187 ages.
5188 Pack‐
5189 ages
5190 con‐
5191 sist
5192 of
5193 files
5194 to
5195 install
5196 and
5197 pack‐
5198 ag‐
5199 ing
5200 infor‐
5201 ma‐
5202 tion.
5203 The
5204 for‐
5205 mer
5206 may
5207 be
5208 spec‐
5209 i‐
5210 fied
5211 with
5212 the
5213 &source;
5214 param‐
5215 e‐
5216 ter
5217 and
5218 may
5219 be
5220 left
5221 out,
5222 in
5223 which
5224 case
5225 the
5226 &Find‐
5227 In‐
5228 stalled‐
5229 Files;
5230 func‐
5231 tion
5232 will
5233 col‐
5234 lect
5235 all
5236 files
5237 that
5238 have
5239 an
5240 Install()orIn‐
5241 stal‐
5242 lAs()Builder‐
5243 at‐
5244 tached.Ifthe&tar‐
5245 get;,is
5246 not
5247 spec‐
5248 i‐
5249 fied
5250 it
5251 will
5252 be
5253 deduced
5254 from
5255 addi‐
5256 tional
5257 infor‐
5258 ma‐
5259 tion
5260 given
5261 to
5262 this
5263 Builder.
5264
5265 The
5266 pack‐
5267 ag‐
5268 ing
5269 infor‐
5270 ma‐
5271 tion
5272 is
5273 spec‐
5274 i‐
5275 fied
5276 with
5277 the
5278 help
5279 of
5280 con‐
5281 struc‐
5282 tion
5283 vari‐
5284 ables
5285 doc‐
5286 u‐
5287 mented
5288 below.
5289 This
5290 infor‐
5291 ma‐
5292 tion
5293 is
5294 called
5295 a
5296 tag
5297 to
5298 stress
5299 that
5300 some
5301 of
5302 them
5303 can
5304 also
5305 be
5306 attached
5307 to
5308 files
5309 with
5310 the
5311 &Tag;
5312 func‐
5313 tion.
5314 The
5315 manda‐
5316 tory
5317 ones
5318 will
5319 com‐
5320 plain
5321 if
5322 they
5323 were
5324 not
5325 spec‐
5326 i‐
5327 fied.
5328 They
5329 vary
5330 depend‐
5331 ing
5332 on
5333 cho‐
5334 sen
5335 tar‐
5336 get
5337 pack‐
5338 ager.
5339
5340 The
5341 tar‐
5342 get
5343 pack‐
5344 ager
5345 may
5346 be
5347 selected
5348 with
5349 the
5350 "PACK‐
5351 AGETYPE"
5352 com‐
5353 mand
5354 line
5355 option
5356 or
5357 with
5358 the
5359 $PACK‐
5360 AGETYPE
5361 con‐
5362 struc‐
5363 tion
5364 vari‐
5365 able.
5366 Cur‐
5367 rently
5368 the
5369 fol‐
5370 low‐
5371 ing
5372 pack‐
5373 agers
5374 avail‐
5375 able:
5376
5377 *
5378 msi
5379 -
5380 Mi‐
5381 cro‐
5382 soft
5383 In‐
5384 stall‐
5385 er
5386 *
5387 rpm
5388 -
5389 Red‐
5390 hat
5391 Pack‐
5392 age
5393 Manger
5394 *
5395 ipkg
5396 -
5397 Itsy
5398 Pack‐
5399 age
5400 Man‐
5401 age‐
5402 ment
5403 Sys‐
5404 tem
5405 *
5406 tarbz2
5407 -
5408 com‐
5409 pressed
5410 tar
5411 *
5412 targz
5413 -
5414 com‐
5415 pressed
5416 tar
5417 *
5418 zip
5419 -
5420 zip
5421 file
5422 *
5423 src_tarbz2
5424 -
5425 com‐
5426 pressed
5427 tar
5428 source
5429 *
5430 src_targz
5431 -
5432 com‐
5433 pressed
5434 tar
5435 source
5436 *
5437 src_zip
5438 -
5439 zip
5440 file
5441 source
5442
5443 An
5444 updated
5445 list
5446 is
5447 always
5448 avail‐
5449 able
5450 under
5451 the
5452 "pack‐
5453 age_type"
5454 option
5455 when
5456 run‐
5457 ning
5458 "scons
5459 --help"
5460 on
5461 a
5462 project
5463 that
5464 has
5465 pack‐
5466 ag‐
5467 ing
5468 acti‐
5469 vated.
5470 env = Environment(tools=['default', 'packaging'])
5471 env.Install('/bin/', 'my_program')
5472 env.Package( NAME = 'foo',
5473 VERSION = '1.2.3',
5474 PACKAGEVERSION = 0,
5475 PACKAGETYPE = 'rpm',
5476 LICENSE = 'gpl',
5477 SUMMARY = 'balalalalal',
5478 DESCRIPTION = 'this should be really really long',
5479 X_RPM_GROUP = 'Application/fu',
5480 SOURCE_URL = 'http://foo.org/foo-1.2.3.tar.gz'
5481 )
5482
5483 PCH()
5484
5485 env.PCH()
5486 Builds
5487 a
5488 Mi‐
5489 cro‐
5490 soft
5491 Vis‐
5492 ual
5493 C++
5494 pre‐
5495 com‐
5496 piled
5497 header.
5498 Call‐
5499 ing
5500 this
5501 builder
5502 method
5503 returns
5504 a
5505 list
5506 of
5507 two
5508 tar‐
5509 gets:
5510 the
5511 PCH
5512 as
5513 the
5514 first
5515 ele‐
5516 ment,
5517 and
5518 the
5519 object
5520 file
5521 as
5522 the
5523 sec‐
5524 ond
5525 ele‐
5526 ment.
5527 Nor‐
5528 mally
5529 the
5530 object
5531 file
5532 is
5533 ignored.
5534 This
5535 builder
5536 method
5537 is
5538 only
5539 pro‐
5540 vided
5541 when
5542 Mi‐
5543 cro‐
5544 soft
5545 Vis‐
5546 ual
5547 C++
5548 is
5549 being
5550 used
5551 as
5552 the
5553 com‐
5554 piler.
5555 The
5556 PCH
5557 builder
5558 method
5559 is
5560 gen‐
5561 er‐
5562 ally
5563 used
5564 in
5565 con‐
5566 juc‐
5567 tion
5568 with
5569 the
5570 PCH
5571 con‐
5572 struc‐
5573 tion
5574 vari‐
5575 able
5576 to
5577 force
5578 object
5579 files
5580 to
5581 use
5582 the
5583 pre‐
5584 com‐
5585 piled
5586 header:
5587
5588 env['PCH'] = env.PCH('StdAfx.cpp')[0]
5589
5590 PDF()
5591
5592 env.PDF()
5593 Builds
5594 a
5595 .pdf
5596 file
5597 from
5598 a
5599 .dvi
5600 input
5601 file
5602 (or,
5603 by
5604 exten‐
5605 sion,
5606 a
5607 .tex,
5608 .ltx,
5609 or
5610 .latex
5611 input
5612 file).
5613 The
5614 suf‐
5615 fix
5616 spec‐
5617 i‐
5618 fied
5619 by
5620 the
5621 $PDF‐
5622 SUF‐
5623 FIX
5624 con‐
5625 struc‐
5626 tion
5627 vari‐
5628 able
5629 (.pdf
5630 by
5631 default)
5632 is
5633 added
5634 auto‐
5635 mat‐
5636 i‐
5637 cally
5638 to
5639 the
5640 tar‐
5641 get
5642 if
5643 it
5644 is
5645 not
5646 already
5647 present.
5648 Exam‐
5649 ple:
5650
5651 # builds from aaa.tex
5652 env.PDF(target = 'aaa.pdf', source = 'aaa.tex')
5653 # builds bbb.pdf from bbb.dvi
5654 env.PDF(target = 'bbb', source = 'bbb.dvi')
5655
5656 Post‐
5657 Script()
5658
5659 env.Post‐
5660 Script()
5661 Builds
5662 a
5663 .ps
5664 file
5665 from
5666 a
5667 .dvi
5668 input
5669 file
5670 (or,
5671 by
5672 exten‐
5673 sion,
5674 a
5675 .tex,
5676 .ltx,
5677 or
5678 .latex
5679 input
5680 file).
5681 The
5682 suf‐
5683 fix
5684 spec‐
5685 i‐
5686 fied
5687 by
5688 the
5689 $PSSUF‐
5690 FIX
5691 con‐
5692 struc‐
5693 tion
5694 vari‐
5695 able
5696 (.ps
5697 by
5698 default)
5699 is
5700 added
5701 auto‐
5702 mat‐
5703 i‐
5704 cally
5705 to
5706 the
5707 tar‐
5708 get
5709 if
5710 it
5711 is
5712 not
5713 already
5714 present.
5715 Exam‐
5716 ple:
5717
5718 # builds from aaa.tex
5719 env.PostScript(target = 'aaa.ps', source = 'aaa.tex')
5720 # builds bbb.ps from bbb.dvi
5721 env.PostScript(target = 'bbb', source = 'bbb.dvi')
5722
5723 Pro‐
5724 gram()
5725
5726 env.Pro‐
5727 gram()
5728 Builds
5729 an
5730 exe‐
5731 cutable
5732 given
5733 one
5734 or
5735 more
5736 object
5737 files
5738 or
5739 C,
5740 C++,
5741 D,
5742 or
5743 For‐
5744 tran
5745 source
5746 files.
5747 If
5748 any
5749 C,
5750 C++,
5751 D
5752 or
5753 For‐
5754 tran
5755 source
5756 files
5757 are
5758 spec‐
5759 i‐
5760 fied,
5761 then
5762 they
5763 will
5764 be
5765 auto‐
5766 mat‐
5767 i‐
5768 cally
5769 com‐
5770 piled
5771 to
5772 object
5773 files
5774 using
5775 the
5776 Object()
5777 builder
5778 method;
5779 see
5780 that
5781 builder
5782 method's
5783 descrip‐
5784 tion
5785 for
5786 a
5787 list
5788 of
5789 legal
5790 source
5791 file
5792 suf‐
5793 fixes
5794 and
5795 how
5796 they
5797 are
5798 inter‐
5799 preted.
5800 The
5801 tar‐
5802 get
5803 exe‐
5804 cutable
5805 file
5806 pre‐
5807 fix
5808 (spec‐
5809 i‐
5810 fied
5811 by
5812 the
5813 $PROG‐
5814 PRE‐
5815 FIX
5816 con‐
5817 struc‐
5818 tion
5819 vari‐
5820 able;
5821 noth‐
5822 ing
5823 by
5824 default)
5825 and
5826 suf‐
5827 fix
5828 (spec‐
5829 i‐
5830 fied
5831 by
5832 the
5833 $PROG‐
5834 SUF‐
5835 FIX
5836 con‐
5837 struc‐
5838 tion
5839 vari‐
5840 able;
5841 by
5842 default,
5843 .exe
5844 on
5845 Win‐
5846 dows
5847 sys‐
5848 tems,
5849 noth‐
5850 ing
5851 on
5852 POSIX
5853 sys‐
5854 tems)
5855 are
5856 auto‐
5857 mat‐
5858 i‐
5859 cally
5860 added
5861 to
5862 the
5863 tar‐
5864 get
5865 if
5866 not
5867 already
5868 present.
5869 Exam‐
5870 ple:
5871
5872 env.Program(target = 'foo', source = ['foo.o', 'bar.c', 'baz.f'])
5873
5874 RES()
5875
5876 env.RES()
5877 Builds
5878 a
5879 Mi‐
5880 cro‐
5881 soft
5882 Vis‐
5883 ual
5884 C++
5885 resource
5886 file.
5887 This
5888 builder
5889 method
5890 is
5891 only
5892 pro‐
5893 vided
5894 when
5895 Mi‐
5896 cro‐
5897 soft
5898 Vis‐
5899 ual
5900 C++
5901 or
5902 MinGW
5903 is
5904 being
5905 used
5906 as
5907 the
5908 com‐
5909 piler.
5910 The
5911 .res
5912 (or
5913 .o
5914 for
5915 MinGW)
5916 suf‐
5917 fix
5918 is
5919 added
5920 to
5921 the
5922 tar‐
5923 get
5924 name
5925 if
5926 no
5927 other
5928 suf‐
5929 fix
5930 is
5931 given.
5932 The
5933 source
5934 file
5935 is
5936 scanned
5937 for
5938 implicit
5939 depen‐
5940 den‐
5941 cies
5942 as
5943 though
5944 it
5945 were
5946 a
5947 C
5948 file.
5949 Exam‐
5950 ple:
5951
5952 env.RES('resource.rc')
5953
5954 RMIC()
5955
5956 env.RMIC()
5957 Builds
5958 stub
5959 and
5960 skele‐
5961 ton
5962 class
5963 files
5964 for
5965 remote
5966 objects
5967 from
5968 Java
5969 .class
5970 files.
5971 The
5972 tar‐
5973 get
5974 is
5975 a
5976 direc‐
5977 tory
5978 rel‐
5979 a‐
5980 tive
5981 to
5982 which
5983 the
5984 stub
5985 and
5986 skele‐
5987 ton
5988 class
5989 files
5990 will
5991 be
5992 writ‐
5993 ten.
5994 The
5995 source
5996 can
5997 be
5998 the
5999 names
6000 of
6001 .class
6002 files,
6003 or
6004 the
6005 objects
6006 return
6007 from
6008 the
6009 Java()
6010 builder
6011 method.
6012
6013 If
6014 the
6015 con‐
6016 struc‐
6017 tion
6018 vari‐
6019 able
6020 $JAVA‐
6021 CLASS‐
6022 DIR
6023 is
6024 set,
6025 either
6026 in
6027 the
6028 envi‐
6029 ron‐
6030 ment
6031 or
6032 in
6033 the
6034 call
6035 to
6036 the
6037 RMIC()
6038 builder
6039 method
6040 itself,
6041 then
6042 the
6043 value
6044 of
6045 the
6046 vari‐
6047 able
6048 will
6049 be
6050 stripped
6051 from
6052 the
6053 begin‐
6054 ning
6055 of
6056 any
6057 .class
6058 file
6059 names.
6060
6061 classes = env.Java(target = 'classdir', source = 'src')
6062 env.RMIC(target = 'outdir1', source = classes)
6063
6064 env.RMIC(target = 'outdir2',
6065 source = ['package/foo.class', 'package/bar.class'])
6066
6067 env.RMIC(target = 'outdir3',
6068 source = ['classes/foo.class', 'classes/bar.class'],
6069 JAVACLASSDIR = 'classes')
6070
6071 RPC‐
6072 Gen‐
6073 Client()
6074
6075 env.RPC‐
6076 Gen‐
6077 Client()
6078 Gen‐
6079 er‐
6080 ates
6081 an
6082 RPC
6083 client
6084 stub
6085 (_clnt.c)
6086 file
6087 from
6088 a
6089 spec‐
6090 i‐
6091 fied
6092 RPC
6093 (.x)
6094 source
6095 file.
6096 Because
6097 rpc‐
6098 gen
6099 only
6100 builds
6101 out‐
6102 put
6103 files
6104 in
6105 the
6106 local
6107 direc‐
6108 tory,
6109 the
6110 com‐
6111 mand
6112 will
6113 be
6114 exe‐
6115 cuted
6116 in
6117 the
6118 source
6119 file's
6120 direc‐
6121 tory
6122 by
6123 default.
6124
6125 # Builds src/rpcif_clnt.c
6126 env.RPCGenClient('src/rpcif.x')
6127
6128 RPC‐
6129 Gen‐
6130 Header()
6131
6132 env.RPC‐
6133 Gen‐
6134 Header()
6135 Gen‐
6136 er‐
6137 ates
6138 an
6139 RPC
6140 header
6141 (.h)
6142 file
6143 from
6144 a
6145 spec‐
6146 i‐
6147 fied
6148 RPC
6149 (.x)
6150 source
6151 file.
6152 Because
6153 rpc‐
6154 gen
6155 only
6156 builds
6157 out‐
6158 put
6159 files
6160 in
6161 the
6162 local
6163 direc‐
6164 tory,
6165 the
6166 com‐
6167 mand
6168 will
6169 be
6170 exe‐
6171 cuted
6172 in
6173 the
6174 source
6175 file's
6176 direc‐
6177 tory
6178 by
6179 default.
6180
6181 # Builds src/rpcif.h
6182 env.RPCGenHeader('src/rpcif.x')
6183
6184 RPC‐
6185 GenSer‐
6186 vice()
6187
6188 env.RPC‐
6189 GenSer‐
6190 vice()
6191 Gen‐
6192 er‐
6193 ates
6194 an
6195 RPC
6196 server-
6197 skele‐
6198 ton
6199 (_svc.c)
6200 file
6201 from
6202 a
6203 spec‐
6204 i‐
6205 fied
6206 RPC
6207 (.x)
6208 source
6209 file.
6210 Because
6211 rpc‐
6212 gen
6213 only
6214 builds
6215 out‐
6216 put
6217 files
6218 in
6219 the
6220 local
6221 direc‐
6222 tory,
6223 the
6224 com‐
6225 mand
6226 will
6227 be
6228 exe‐
6229 cuted
6230 in
6231 the
6232 source
6233 file's
6234 direc‐
6235 tory
6236 by
6237 default.
6238
6239 # Builds src/rpcif_svc.c
6240 env.RPCGenClient('src/rpcif.x')
6241
6242 RPC‐
6243 GenXDR()
6244
6245 env.RPC‐
6246 GenXDR()
6247 Gen‐
6248 er‐
6249 ates
6250 an
6251 RPC
6252 XDR
6253 rou‐
6254 tine
6255 (_xdr.c)
6256 file
6257 from
6258 a
6259 spec‐
6260 i‐
6261 fied
6262 RPC
6263 (.x)
6264 source
6265 file.
6266 Because
6267 rpc‐
6268 gen
6269 only
6270 builds
6271 out‐
6272 put
6273 files
6274 in
6275 the
6276 local
6277 direc‐
6278 tory,
6279 the
6280 com‐
6281 mand
6282 will
6283 be
6284 exe‐
6285 cuted
6286 in
6287 the
6288 source
6289 file's
6290 direc‐
6291 tory
6292 by
6293 default.
6294
6295 # Builds src/rpcif_xdr.c
6296 env.RPCGenClient('src/rpcif.x')
6297
6298 SharedLi‐
6299 brary()
6300
6301 env.SharedLi‐
6302 brary()
6303 Builds
6304 a
6305 shared
6306 library
6307 (.so
6308 on
6309 a
6310 POSIX
6311 sys‐
6312 tem,
6313 .dll
6314 on
6315 Win‐
6316 dows)
6317 given
6318 one
6319 or
6320 more
6321 object
6322 files
6323 or
6324 C,
6325 C++,
6326 D
6327 or
6328 For‐
6329 tran
6330 source
6331 files.
6332 If
6333 any
6334 source
6335 files
6336 are
6337 given,
6338 then
6339 they
6340 will
6341 be
6342 auto‐
6343 mat‐
6344 i‐
6345 cally
6346 com‐
6347 piled
6348 to
6349 object
6350 files.
6351 The
6352 static
6353 library
6354 pre‐
6355 fix
6356 and
6357 suf‐
6358 fix
6359 (if
6360 any)
6361 are
6362 auto‐
6363 mat‐
6364 i‐
6365 cally
6366 added
6367 to
6368 the
6369 tar‐
6370 get.
6371 The
6372 tar‐
6373 get
6374 library
6375 file
6376 pre‐
6377 fix
6378 (spec‐
6379 i‐
6380 fied
6381 by
6382 the
6383 $SHLIBPRE‐
6384 FIX
6385 con‐
6386 struc‐
6387 tion
6388 vari‐
6389 able;
6390 by
6391 default,
6392 lib
6393 on
6394 POSIX
6395 sys‐
6396 tems,
6397 noth‐
6398 ing
6399 on
6400 Win‐
6401 dows
6402 sys‐
6403 tems)
6404 and
6405 suf‐
6406 fix
6407 (spec‐
6408 i‐
6409 fied
6410 by
6411 the
6412 $SHLIB‐
6413 SUF‐
6414 FIX
6415 con‐
6416 struc‐
6417 tion
6418 vari‐
6419 able;
6420 by
6421 default,
6422 .dll
6423 on
6424 Win‐
6425 dows
6426 sys‐
6427 tems,
6428 .so
6429 on
6430 POSIX
6431 sys‐
6432 tems)
6433 are
6434 auto‐
6435 mat‐
6436 i‐
6437 cally
6438 added
6439 to
6440 the
6441 tar‐
6442 get
6443 if
6444 not
6445 already
6446 present.
6447 Exam‐
6448 ple:
6449
6450 env.SharedLibrary(target = 'bar', source = ['bar.c', 'foo.o'])
6451
6452 On
6453 Win‐
6454 dows
6455 sys‐
6456 tems,
6457 the
6458 SharedLi‐
6459 brary()
6460 builder
6461 method
6462 will
6463 always
6464 build
6465 an
6466 import
6467 (.lib)
6468 library
6469 in
6470 addi‐
6471 tion
6472 to
6473 the
6474 shared
6475 (.dll)
6476 library,
6477 adding
6478 a
6479 .lib
6480 library
6481 with
6482 the
6483 same
6484 base‐
6485 name
6486 if
6487 there
6488 is
6489 not
6490 already
6491 a
6492 .lib
6493 file
6494 explic‐
6495 itly
6496 listed
6497 in
6498 the
6499 tar‐
6500 gets.
6501
6502 Any
6503 object
6504 files
6505 listed
6506 in
6507 the
6508 source
6509 must
6510 have
6511 been
6512 built
6513 for
6514 a
6515 shared
6516 library
6517 (that
6518 is,
6519 using
6520 the
6521 Share‐
6522 dOb‐
6523 ject()
6524 builder
6525 method).
6526 scons
6527 will
6528 raise
6529 an
6530 error
6531 if
6532 there
6533 is
6534 any
6535 mis‐
6536 match.
6537
6538 On
6539 Win‐
6540 dows
6541 sys‐
6542 tems,
6543 spec‐
6544 i‐
6545 fy‐
6546 ing
6547 reg‐
6548 is‐
6549 ter=1
6550 will
6551 cause
6552 the
6553 .dll
6554 to
6555 be
6556 reg‐
6557 is‐
6558 tered
6559 after
6560 it
6561 is
6562 built
6563 using
6564 REGSVR32.
6565 The
6566 com‐
6567 mand
6568 that
6569 is
6570 run
6571 ("regsvr32"
6572 by
6573 default)
6574 is
6575 deter‐
6576 mined
6577 by
6578 $REGSVR
6579 con‐
6580 struc‐
6581 tion
6582 vari‐
6583 able,
6584 and
6585 the
6586 flags
6587 passed
6588 are
6589 deter‐
6590 mined
6591 by
6592 $REGSVR‐
6593 FLAGS.
6594 By
6595 default,
6596 $REGSVR‐
6597 FLAGS
6598 includes
6599 the
6600 /s
6601 option,
6602 to
6603 pre‐
6604 vent
6605 dialogs
6606 from
6607 pop‐
6608 ping
6609 up
6610 and
6611 requir‐
6612 ing
6613 user
6614 atten‐
6615 tion
6616 when
6617 it
6618 is
6619 run.
6620 If
6621 you
6622 change
6623 $REGSVR‐
6624 FLAGS,
6625 be
6626 sure
6627 to
6628 include
6629 the
6630 /s
6631 option.
6632 For
6633 exam‐
6634 ple,
6635
6636 env.SharedLibrary(target = 'bar',
6637 source = ['bar.cxx', 'foo.obj'],
6638 register=1)
6639
6640 will
6641 reg‐
6642 is‐
6643 ter
6644 bar.dll
6645 as
6646 a
6647 COM
6648 object
6649 when
6650 it
6651 is
6652 done
6653 link‐
6654 ing
6655 it.
6656
6657
6658 Share‐
6659 dOb‐
6660 ject()
6661
6662 env.Share‐
6663 dOb‐
6664 ject()
6665 Builds
6666 an
6667 object
6668 file
6669 for
6670 inclu‐
6671 sion
6672 in
6673 a
6674 shared
6675 library.
6676 Source
6677 files
6678 must
6679 have
6680 one
6681 of
6682 the
6683 same
6684 set
6685 of
6686 exten‐
6687 sions
6688 spec‐
6689 i‐
6690 fied
6691 above
6692 for
6693 the
6694 Stati‐
6695 cOb‐
6696 ject()
6697 builder
6698 method.
6699 On
6700 some
6701 plat‐
6702 forms
6703 build‐
6704 ing
6705 a
6706 shared
6707 object
6708 requires
6709 addi‐
6710 tional
6711 com‐
6712 piler
6713 option
6714 (e.g.
6715 -fPIC
6716 for
6717 gcc)
6718 in
6719 addi‐
6720 tion
6721 to
6722 those
6723 needed
6724 to
6725 build
6726 a
6727 nor‐
6728 mal
6729 (static)
6730 object,
6731 but
6732 on
6733 some
6734 plat‐
6735 forms
6736 there
6737 is
6738 no
6739 dif‐
6740 fer‐
6741 ence
6742 between
6743 a
6744 shared
6745 object
6746 and
6747 a
6748 nor‐
6749 mal
6750 (static)
6751 one.
6752 When
6753 there
6754 is
6755 a
6756 dif‐
6757 fer‐
6758 ence,
6759 SCons
6760 will
6761 only
6762 allow
6763 shared
6764 objects
6765 to
6766 be
6767 linked
6768 into
6769 a
6770 shared
6771 library,
6772 and
6773 will
6774 use
6775 a
6776 dif‐
6777 fer‐
6778 ent
6779 suf‐
6780 fix
6781 for
6782 shared
6783 objects.
6784 On
6785 plat‐
6786 forms
6787 where
6788 there
6789 is
6790 no
6791 dif‐
6792 fer‐
6793 ence,
6794 SCons
6795 will
6796 allow
6797 both
6798 nor‐
6799 mal
6800 (static)
6801 and
6802 shared
6803 objects
6804 to
6805 be
6806 linked
6807 into
6808 a
6809 shared
6810 library,
6811 and
6812 will
6813 use
6814 the
6815 same
6816 suf‐
6817 fix
6818 for
6819 shared
6820 and
6821 nor‐
6822 mal
6823 (static)
6824 objects.
6825 The
6826 tar‐
6827 get
6828 object
6829 file
6830 pre‐
6831 fix
6832 (spec‐
6833 i‐
6834 fied
6835 by
6836 the
6837 $SHOB‐
6838 JPRE‐
6839 FIX
6840 con‐
6841 struc‐
6842 tion
6843 vari‐
6844 able;
6845 by
6846 default,
6847 the
6848 same
6849 as
6850 $OBJPRE‐
6851 FIX)
6852 and
6853 suf‐
6854 fix
6855 (spec‐
6856 i‐
6857 fied
6858 by
6859 the
6860 $SHOB‐
6861 J‐
6862 SUF‐
6863 FIX
6864 con‐
6865 struc‐
6866 tion
6867 vari‐
6868 able)
6869 are
6870 auto‐
6871 mat‐
6872 i‐
6873 cally
6874 added
6875 to
6876 the
6877 tar‐
6878 get
6879 if
6880 not
6881 already
6882 present.
6883 Exam‐
6884 ples:
6885
6886 env.SharedObject(target = 'ddd', source = 'ddd.c')
6887 env.SharedObject(target = 'eee.o', source = 'eee.cpp')
6888 env.SharedObject(target = 'fff.obj', source = 'fff.for')
6889
6890 Note
6891 that
6892 the
6893 source
6894 files
6895 will
6896 be
6897 scanned
6898 accord‐
6899 ing
6900 to
6901 the
6902 suf‐
6903 fix
6904 map‐
6905 pings
6906 in
6907 the
6908 Source‐
6909 FileS‐
6910 can‐
6911 ner
6912 object.
6913 See
6914 the
6915 sec‐
6916 tion
6917 "Scan‐
6918 ner
6919 Objects,"
6920 below,
6921 for
6922 a
6923 more
6924 infor‐
6925 ma‐
6926 tion.
6927
6928
6929 Stat‐
6930 i‐
6931 cLi‐
6932 brary()
6933
6934 env.Stat‐
6935 i‐
6936 cLi‐
6937 brary()
6938 Builds
6939 a
6940 static
6941 library
6942 given
6943 one
6944 or
6945 more
6946 object
6947 files
6948 or
6949 C,
6950 C++,
6951 D
6952 or
6953 For‐
6954 tran
6955 source
6956 files.
6957 If
6958 any
6959 source
6960 files
6961 are
6962 given,
6963 then
6964 they
6965 will
6966 be
6967 auto‐
6968 mat‐
6969 i‐
6970 cally
6971 com‐
6972 piled
6973 to
6974 object
6975 files.
6976 The
6977 static
6978 library
6979 pre‐
6980 fix
6981 and
6982 suf‐
6983 fix
6984 (if
6985 any)
6986 are
6987 auto‐
6988 mat‐
6989 i‐
6990 cally
6991 added
6992 to
6993 the
6994 tar‐
6995 get.
6996 The
6997 tar‐
6998 get
6999 library
7000 file
7001 pre‐
7002 fix
7003 (spec‐
7004 i‐
7005 fied
7006 by
7007 the
7008 $LIBPRE‐
7009 FIX
7010 con‐
7011 struc‐
7012 tion
7013 vari‐
7014 able;
7015 by
7016 default,
7017 lib
7018 on
7019 POSIX
7020 sys‐
7021 tems,
7022 noth‐
7023 ing
7024 on
7025 Win‐
7026 dows
7027 sys‐
7028 tems)
7029 and
7030 suf‐
7031 fix
7032 (spec‐
7033 i‐
7034 fied
7035 by
7036 the
7037 $LIB‐
7038 SUF‐
7039 FIX
7040 con‐
7041 struc‐
7042 tion
7043 vari‐
7044 able;
7045 by
7046 default,
7047 .lib
7048 on
7049 Win‐
7050 dows
7051 sys‐
7052 tems,
7053 .a
7054 on
7055 POSIX
7056 sys‐
7057 tems)
7058 are
7059 auto‐
7060 mat‐
7061 i‐
7062 cally
7063 added
7064 to
7065 the
7066 tar‐
7067 get
7068 if
7069 not
7070 already
7071 present.
7072 Exam‐
7073 ple:
7074
7075 env.StaticLibrary(target = 'bar', source = ['bar.c', 'foo.o'])
7076
7077 Any
7078 object
7079 files
7080 listed
7081 in
7082 the
7083 source
7084 must
7085 have
7086 been
7087 built
7088 for
7089 a
7090 static
7091 library
7092 (that
7093 is,
7094 using
7095 the
7096 Stati‐
7097 cOb‐
7098 ject()
7099 builder
7100 method).
7101 scons
7102 will
7103 raise
7104 an
7105 error
7106 if
7107 there
7108 is
7109 any
7110 mis‐
7111 match.
7112
7113
7114 Stati‐
7115 cOb‐
7116 ject()
7117
7118 env.Stati‐
7119 cOb‐
7120 ject()
7121 Builds
7122 a
7123 static
7124 object
7125 file
7126 from
7127 one
7128 or
7129 more
7130 C,
7131 C++,
7132 D,
7133 or
7134 For‐
7135 tran
7136 source
7137 files.
7138 Source
7139 files
7140 must
7141 have
7142 one
7143 of
7144 the
7145 fol‐
7146 low‐
7147 ing
7148 exten‐
7149 sions:
7150
7151 .asm assembly language file
7152 .ASM assembly language file
7153 .c C file
7154 .C Windows: C file
7155 POSIX: C++ file
7156 .cc C++ file
7157 .cpp C++ file
7158 .cxx C++ file
7159 .cxx C++ file
7160 .c++ C++ file
7161 .C++ C++ file
7162 .d D file
7163 .f Fortran file
7164 .F Windows: Fortran file
7165 POSIX: Fortran file + C pre-processor
7166 .for Fortran file
7167 .FOR Fortran file
7168 .fpp Fortran file + C pre-processor
7169 .FPP Fortran file + C pre-processor
7170 .m Object C file
7171 .mm Object C++ file
7172 .s assembly language file
7173 .S Windows: assembly language file
7174 POSIX: assembly language file + C pre-processor
7175 .spp assembly language file + C pre-processor
7176 .SPP assembly language file + C pre-processor
7177
7178 The
7179 tar‐
7180 get
7181 object
7182 file
7183 pre‐
7184 fix
7185 (spec‐
7186 i‐
7187 fied
7188 by
7189 the
7190 $OBJPRE‐
7191 FIX
7192 con‐
7193 struc‐
7194 tion
7195 vari‐
7196 able;
7197 noth‐
7198 ing
7199 by
7200 default)
7201 and
7202 suf‐
7203 fix
7204 (spec‐
7205 i‐
7206 fied
7207 by
7208 the
7209 $OBJ‐
7210 SUF‐
7211 FIX
7212 con‐
7213 struc‐
7214 tion
7215 vari‐
7216 able;
7217 .obj
7218 on
7219 Win‐
7220 dows
7221 sys‐
7222 tems,
7223 .o
7224 on
7225 POSIX
7226 sys‐
7227 tems)
7228 are
7229 auto‐
7230 mat‐
7231 i‐
7232 cally
7233 added
7234 to
7235 the
7236 tar‐
7237 get
7238 if
7239 not
7240 already
7241 present.
7242 Exam‐
7243 ples:
7244
7245 env.StaticObject(target = 'aaa', source = 'aaa.c')
7246 env.StaticObject(target = 'bbb.o', source = 'bbb.c++')
7247 env.StaticObject(target = 'ccc.obj', source = 'ccc.f')
7248
7249 Note
7250 that
7251 the
7252 source
7253 files
7254 will
7255 be
7256 scanned
7257 accord‐
7258 ing
7259 to
7260 the
7261 suf‐
7262 fix
7263 map‐
7264 pings
7265 in
7266 Source‐
7267 FileS‐
7268 can‐
7269 ner
7270 object.
7271 See
7272 the
7273 sec‐
7274 tion
7275 "Scan‐
7276 ner
7277 Objects,"
7278 below,
7279 for
7280 a
7281 more
7282 infor‐
7283 ma‐
7284 tion.
7285
7286
7287 Tar()
7288
7289 env.Tar()
7290 Builds
7291 a
7292 tar
7293 ar‐
7294 chive
7295 of
7296 the
7297 spec‐
7298 i‐
7299 fied
7300 files
7301 and/or
7302 direc‐
7303 to‐
7304 ries.
7305 Unlike
7306 most
7307 builder
7308 meth‐
7309 ods,
7310 the
7311 Tar()
7312 builder
7313 method
7314 may
7315 be
7316 called
7317 mul‐
7318 ti‐
7319 ple
7320 times
7321 for
7322 a
7323 given
7324 tar‐
7325 get;
7326 each
7327 addi‐
7328 tional
7329 call
7330 adds
7331 to
7332 the
7333 list
7334 of
7335 entries
7336 that
7337 will
7338 be
7339 built
7340 into
7341 the
7342 ar‐
7343 chive.
7344 Any
7345 source
7346 direc‐
7347 to‐
7348 ries
7349 will
7350 be
7351 scanned
7352 for
7353 changes
7354 to
7355 any
7356 on-
7357 disk
7358 files,
7359 regard‐
7360 less
7361 of
7362 whether
7363 or
7364 not
7365 scons
7366 knows
7367 about
7368 them
7369 from
7370 other
7371 Builder
7372 or
7373 func‐
7374 tion
7375 calls.
7376
7377 env.Tar('src.tar', 'src')
7378
7379 # Create the stuff.tar file.
7380 env.Tar('stuff', ['subdir1', 'subdir2'])
7381 # Also add "another" to the stuff.tar file.
7382 env.Tar('stuff', 'another')
7383
7384 # Set TARFLAGS to create a gzip-filtered archive.
7385 env = Environment(TARFLAGS = '-c -z')
7386 env.Tar('foo.tar.gz', 'foo')
7387
7388 # Also set the suffix to .tgz.
7389 env = Environment(TARFLAGS = '-c -z',
7390 TARSUFFIX = '.tgz')
7391 env.Tar('foo')
7392
7393 Type‐
7394 Li‐
7395 brary()
7396
7397 env.Type‐
7398 Li‐
7399 brary()
7400 Builds
7401 a
7402 Win‐
7403 dows
7404 type
7405 library
7406 (.tlb)
7407 file
7408 from
7409 an
7410 input
7411 IDL
7412 file
7413 (.idl).
7414 In
7415 addi‐
7416 tion,
7417 it
7418 will
7419 build
7420 the
7421 asso‐
7422 ci‐
7423 ated
7424 inte‐
7425 face
7426 stub
7427 and
7428 proxy
7429 source
7430 files,
7431 nam‐
7432 ing
7433 them
7434 accord‐
7435 ing
7436 to
7437 the
7438 base
7439 name
7440 of
7441 the
7442 .idl
7443 file.
7444 For
7445 exam‐
7446 ple,
7447
7448 env.TypeLibrary(source="foo.idl")
7449
7450 Will
7451 cre‐
7452 ate
7453 foo.tlb,
7454 foo.h,
7455 foo_i.c,
7456 foo_p.c
7457 and
7458 foo_data.c
7459 files.
7460
7461
7462 Uic()
7463
7464 env.Uic()
7465 Builds
7466 a
7467 header
7468 file,
7469 an
7470 imple‐
7471 men‐
7472 ta‐
7473 tion
7474 file
7475 and
7476 a
7477 moc
7478 file
7479 from
7480 an
7481 ui
7482 file.
7483 and
7484 returns
7485 the
7486 cor‐
7487 re‐
7488 spond‐
7489 ing
7490 nodes
7491 in
7492 the
7493 above
7494 order.
7495 This
7496 builder
7497 is
7498 only
7499 avail‐
7500 able
7501 after
7502 using
7503 the
7504 tool
7505 'qt'.
7506 Note:
7507 you
7508 can
7509 spec‐
7510 ify
7511 .ui
7512 files
7513 directly
7514 as
7515 source
7516 files
7517 to
7518 the
7519 Pro‐
7520 gram(),
7521 Library()and‐
7522 SharedLi‐
7523 brary()builders
7524 with‐
7525 out
7526 using
7527 this
7528 builder.
7529 Using
7530 this
7531 builder
7532 lets
7533 you
7534 over‐
7535 ride
7536 the
7537 stan‐
7538 dard
7539 nam‐
7540 ing
7541 con‐
7542 ven‐
7543 tions
7544 (be
7545 care‐
7546 ful:
7547 pre‐
7548 fixes
7549 are
7550 always
7551 prepended
7552 to
7553 names
7554 of
7555 built
7556 files;
7557 if
7558 you
7559 don't
7560 want
7561 pre‐
7562 fixes,
7563 you
7564 may
7565 set
7566 them
7567 to
7568 ``).
7569 See
7570 the
7571 $QTDIR
7572 vari‐
7573 able
7574 for
7575 more
7576 infor‐
7577 ma‐
7578 tion.
7579 Exam‐
7580 ple:
7581
7582 env.Uic('foo.ui') # -> ['foo.h', 'uic_foo.cc', 'moc_foo.cc']
7583 env.Uic(target = Split('include/foo.h gen/uicfoo.cc gen/mocfoo.cc'),
7584 source = 'foo.ui') # -> ['include/foo.h', 'gen/uicfoo.cc', 'gen/mocfoo.cc']
7585
7586 Zip()
7587
7588 env.Zip()
7589 Builds
7590 a
7591 zip
7592 ar‐
7593 chive
7594 of
7595 the
7596 spec‐
7597 i‐
7598 fied
7599 files
7600 and/or
7601 direc‐
7602 to‐
7603 ries.
7604 Unlike
7605 most
7606 builder
7607 meth‐
7608 ods,
7609 the
7610 Zip()
7611 builder
7612 method
7613 may
7614 be
7615 called
7616 mul‐
7617 ti‐
7618 ple
7619 times
7620 for
7621 a
7622 given
7623 tar‐
7624 get;
7625 each
7626 addi‐
7627 tional
7628 call
7629 adds
7630 to
7631 the
7632 list
7633 of
7634 entries
7635 that
7636 will
7637 be
7638 built
7639 into
7640 the
7641 ar‐
7642 chive.
7643 Any
7644 source
7645 direc‐
7646 to‐
7647 ries
7648 will
7649 be
7650 scanned
7651 for
7652 changes
7653 to
7654 any
7655 on-
7656 disk
7657 files,
7658 regard‐
7659 less
7660 of
7661 whether
7662 or
7663 not
7664 scons
7665 knows
7666 about
7667 them
7668 from
7669 other
7670 Builder
7671 or
7672 func‐
7673 tion
7674 calls.
7675
7676 env.Zip('src.zip', 'src')
7677
7678 # Create the stuff.zip file.
7679 env.Zip('stuff', ['subdir1', 'subdir2'])
7680 # Also add "another" to the stuff.tar file.
7681 env.Zip('stuff', 'another')
7682
7683 All
7684 tar‐
7685 gets
7686 of
7687 builder
7688 meth‐
7689 ods
7690 auto‐
7691 mat‐
7692 i‐
7693 cally
7694 depend
7695 on
7696 their
7697 sources.
7698 An
7699 explicit
7700 depen‐
7701 dency
7702 can
7703 be
7704 spec‐
7705 i‐
7706 fied
7707 using
7708 the
7709 Depends
7710 method
7711 of
7712 a
7713 con‐
7714 struc‐
7715 tion
7716 envi‐
7717 ron‐
7718 ment
7719 (see
7720 below).
7721
7722 In
7723 addi‐
7724 tion,
7725 scons
7726 auto‐
7727 mat‐
7728 i‐
7729 cally
7730 scans
7731 source
7732 files
7733 for
7734 var‐
7735 i‐
7736 ous
7737 pro‐
7738 gram‐
7739 ming
7740 lan‐
7741 guages,
7742 so
7743 the
7744 depen‐
7745 den‐
7746 cies
7747 do
7748 not
7749 need
7750 to
7751 be
7752 spec‐
7753 i‐
7754 fied
7755 explic‐
7756 itly.
7757 By
7758 default,
7759 SCons
7760 can
7761 C
7762 source
7763 files,
7764 C++
7765 source
7766 files,
7767 For‐
7768 tran
7769 source
7770 files
7771 with
7772 .F
7773 (POSIX
7774 sys‐
7775 tems
7776 only),
7777 .fpp,
7778 or
7779 .FPP
7780 file
7781 exten‐
7782 sions,
7783 and
7784 assem‐
7785 bly
7786 lan‐
7787 guage
7788 files
7789 with
7790 .S
7791 (POSIX
7792 sys‐
7793 tems
7794 only),
7795 .spp,
7796 or
7797 .SPP
7798 files
7799 exten‐
7800 sions
7801 for
7802 C
7803 pre‐
7804 proces‐
7805 sor
7806 depen‐
7807 den‐
7808 cies.
7809 SCons
7810 also
7811 has
7812 default
7813 sup‐
7814 port
7815 for
7816 scan‐
7817 ning
7818 D
7819 source
7820 files,
7821 You
7822 can
7823 also
7824 write
7825 your
7826 own
7827 Scan‐
7828 ners
7829 to
7830 add
7831 sup‐
7832 port
7833 for
7834 addi‐
7835 tional
7836 source
7837 file
7838 types.
7839 These
7840 can
7841 be
7842 added
7843 to
7844 the
7845 default
7846 Scan‐
7847 ner
7848 object
7849 used
7850 by
7851 the
7852 Object()
7853 Stati‐
7854 cOb‐
7855 ject()
7856 and
7857 Share‐
7858 dOb‐
7859 ject()
7860 Builders
7861 by
7862 adding
7863 them
7864 to
7865 the
7866 Source‐
7867 FileS‐
7868 can‐
7869 ner
7870 object
7871 as
7872 fol‐
7873 lows:
7874
7875 See
7876 the
7877 sec‐
7878 tion
7879 "Scan‐
7880 ner
7881 Objects,"
7882 below,
7883 for
7884 a
7885 more
7886 infor‐
7887 ma‐
7888 tion
7889 about
7890 defin‐
7891 ing
7892 your
7893 own
7894 Scan‐
7895 ner
7896 objects.
7897
7898
7899 Methods and Functions to Do Things
7900 In addition to Builder methods, scons provides a number of other con‐
7901 struction environment methods and global functions to manipulate the
7902 build configuration.
7903
7904 Usually, a construction environment method and global function with the
7905 same name both exist so that you don't have to remember whether to a
7906 specific bit of functionality must be called with or without a con‐
7907 struction environment. In the following list, if you call something as
7908 a global function it looks like:
7909 Function(arguments)
7910 and if you call something through a construction environment it
7911 looks like:
7912 env.Function(arguments)
7913 If you can call the functionality in both ways, then both
7914 forms are listed.
7915
7916 Global functions may be called from custom Python modules
7917 that you import into an SConscript file by adding the
7918 following to the Python module:
7919
7920 from SCons.Script import *
7921
7922 Except where otherwise noted, the same-named con‐
7923 struction environment method and global function
7924 provide the exact same functionality. The only
7925 difference is that, where appropriate, calling the
7926 functionality through a construction environment
7927 will substitute construction variables into any
7928 supplied strings. For example:
7929
7930 env = Environment(FOO = 'foo')
7931 Default('$FOO')
7932 env.Default('$FOO')
7933
7934 In the above example, the first call to the
7935 global Default() function will actually add
7936 a target named $FOO to the list of default
7937 targets, while the second call to the
7938 env.Default() construction environment
7939 method will expand the value and add a tar‐
7940 get named foo to the list of default tar‐
7941 gets. For more on construction variable
7942 expansion, see the next section on con‐
7943 struction variables.
7944
7945 Construction environment methods and global
7946 functions supported by scons include:
7947
7948
7949 Action(action, [strfunction, varlist])
7950
7951 env.Action(action, [strfunction, varlist])
7952 Creates an Action object for the
7953 specified action. See the section
7954 "Action Objects," below, for a com‐
7955 plete explanation of the arguments
7956 and behavior.
7957
7958 Note that the env.Action() form of
7959 the invocation will expand construc‐
7960 tion variables in any arguments
7961 strings, including the action argu‐
7962 ment, at the time it is called using
7963 the construction variables in the
7964 env construction environment through
7965 which env.Action() was called. The
7966 Action() form delays all variable
7967 expansion until the Action object is
7968 actually used.
7969
7970
7971 AddMethod(object,function, [name])
7972
7973 env.AddMethod(function, [name])
7974 When called with the AddMethod()
7975 form, adds the specified function to
7976 the specified object as the speci‐
7977 fied method name. When called with
7978 the env.AddMethod() form, adds the
7979 specified function to the construc‐
7980 tion environment env as the speci‐
7981 fied method name. In both cases, if
7982 name is omitted or None, the name of
7983 the specified function itself is
7984 used for the method name.
7985
7986 Examples:
7987
7988 # Note that the first argument to the function to
7989 # be attached as a method must be the object through
7990 # which the method will be called; the Python
7991 # convention is to call it 'self'.
7992 def my_method(self, arg):
7993 print "my_method() got", arg
7994
7995 # Use the global AddMethod() function to add a method
7996 # to the Environment class. This
7997 AddMethod(Environment, my_method)
7998 env = Environment()
7999 env.my_method('arg')
8000
8001 # Add the function as a method, using the function
8002 # name for the method call.
8003 env = Environment()
8004 env.AddMethod(my_method, 'other_method_name')
8005 env.other_method_name('another arg')
8006
8007
8008 AddOption(arguments)
8009 This function adds a new com‐
8010 mand-line option to be recog‐
8011 nized. The specified argu‐
8012 ments are the same as sup‐
8013 ported by the standard Python
8014 optparse.add_option() method
8015 (with a few additional capa‐
8016 bilities noted below); see
8017 the documentation for opt‐
8018 parse for a thorough discus‐
8019 sion of its option-processing
8020 capabities. (Note that
8021 although the optparse module
8022 was not a standard module
8023 until Python 2.3, scons con‐
8024 tains a compatible version of
8025 the module that is used to
8026 provide identical functional‐
8027 ity when run by earlier
8028 Python versions.)
8029
8030 In addition to the arguments
8031 and values supported by the
8032 optparse.add_option ()
8033 method, the SCons AddOption()
8034 function allows you to set
8035 the nargs keyword value to
8036 '?' (a string with just the
8037 question mark) to indicate
8038 that the specified long
8039 option(s) take(s) an optional
8040 argument. When nargs = '?'
8041 is passed to the AddOption()
8042 function, the const keyword
8043 argument may be used to sup‐
8044 ply the "default" value that
8045 should be used when the
8046 option is specified on the
8047 command line without an
8048 explicit argument.
8049
8050 If no default= keyword argu‐
8051 ment is supplied when calling
8052 AddOption(), the option will
8053 have a default value of None.
8054
8055 Once a new command-line
8056 option has been added with
8057 AddOption(), the option value
8058 may be accessed using GetOp‐
8059 tion() or env.GetOption().
8060 The value may also be set,
8061 using SetOption() or
8062 env.SetOption(), if condi‐
8063 tions in a SConscript require
8064 overriding any default value.
8065 Note, however, that a value
8066 specified on the command line
8067 will always override a value
8068 set by any SConscript file.
8069
8070 Any specified help= strings
8071 for the new option(s) will be
8072 displayed by the -H or -h
8073 options (the latter only if
8074 no other help text is speci‐
8075 fied in the SConscript
8076 files). The help text for
8077 the local options specified
8078 by AddOption() will appear
8079 below the SCons options them‐
8080 selves, under a separate
8081 Local Options heading. The
8082 options will appear in the
8083 help text in the order in
8084 which the AddOption() calls
8085 occur.
8086
8087 Example:
8088
8089 AddOption('--prefix',
8090 dest='prefix',
8091 nargs=1, type='string',
8092 action='store',
8093 metavar='DIR',
8094 help='installation prefix')
8095 env = Environment(PREFIX = GetOption('prefix'))
8096
8097
8098 AddPostAction(target, action)
8099
8100 env.AddPostAction(target,
8101 action)
8102 Arranges for the spec‐
8103 ified action to be
8104 performed after the
8105 specified target has
8106 been built. The spec‐
8107 ified action(s) may be
8108 an Action object, or
8109 anything that can be
8110 converted into an
8111 Action object (see
8112 below).
8113
8114
8115 AddPreAction(target, action)
8116
8117 env.AddPreAction(target,
8118 action)
8119 Arranges for the spec‐
8120 ified action to be
8121 performed before the
8122 specified target is
8123 built. The specified
8124 action(s) may be an
8125 Action object, or any‐
8126 thing that can be con‐
8127 verted into an Action
8128 object (see below).
8129
8130
8131 Alias(alias, [targets,
8132 [action]])
8133
8134 env.Alias(alias, [targets,
8135 [action]])
8136 Creates one or more
8137 phony targets that
8138 expand to one or more
8139 other targets. An
8140 optional action (com‐
8141 mand) or list of
8142 actions can be speci‐
8143 fied that will be exe‐
8144 cuted whenever the any
8145 of the alias targets
8146 are out-of-date.
8147 Returns the Node
8148 object representing
8149 the alias, which
8150 exists outside of any
8151 file system. This
8152 Node object, or the
8153 alias name, may be
8154 used as a dependency
8155 of any other target,
8156 including another
8157 alias. Alias can be
8158 called multiple times
8159 for the same alias to
8160 add additional targets
8161 to the alias, or addi‐
8162 tional actions to the
8163 list for this alias.
8164
8165 Examples:
8166
8167 Alias('install')
8168 Alias('install', '/usr/bin')
8169 Alias(['install', 'install-lib'], '/usr/local/lib')
8170
8171 env.Alias('install', ['/usr/local/bin', '/usr/local/lib'])
8172 env.Alias('install', ['/usr/local/man'])
8173
8174 env.Alias('update', ['file1', 'file2'], "update_database $SOURCES")
8175
8176
8177 AllowSubstExcep‐
8178 tions([exception,
8179 ...])
8180 Specifies the
8181 exceptions that
8182 will be allowed
8183 when expanding
8184 construction
8185 variables. By
8186 default, any
8187 construction
8188 variable expan‐
8189 sions that gen‐
8190 erate a NameEr‐
8191 ror or IndexEr‐
8192 ror exception
8193 will expand to
8194 a '' (a null
8195 string) and not
8196 cause scons to
8197 fail. All
8198 exceptions not
8199 in the speci‐
8200 fied list will
8201 generate an
8202 error message
8203 and terminate
8204 processing.
8205
8206 If AllowSubs‐
8207 tExceptions is
8208 called multiple
8209 times, each
8210 call completely
8211 overwrites the
8212 previous list
8213 of allowed
8214 exceptions.
8215
8216 Example:
8217
8218 # Requires that all construction variable names exist.
8219 # (You may wish to do this if you want to enforce strictly
8220 # that all construction variables must be defined before use.)
8221 AllowSubstExceptions()
8222
8223 # Also allow a string containing a zero-division expansion
8224 # like '${1 / 0}' to evalute to ''.
8225 AllowSubstExceptions(IndexError, NameError, ZeroDivisionError)
8226
8227
8228 Always‐
8229 Build(target,
8230 ...)
8231
8232 env.Always‐
8233 Build(target,
8234 ...)
8235 Marks
8236 each
8237 given
8238 target
8239 so that
8240 it is
8241 always
8242 assumed
8243 to be
8244 out of
8245 date,
8246 and will
8247 always
8248 be
8249 rebuilt
8250 if
8251 needed.
8252 Note,
8253 however,
8254 that
8255 Always‐
8256 Build()
8257 does not
8258 add its
8259 tar‐
8260 get(s)
8261 to the
8262 default
8263 target
8264 list, so
8265 the tar‐
8266 gets
8267 will
8268 only be
8269 built if
8270 they are
8271 speci‐
8272 fied on
8273 the com‐
8274 mand
8275 line, or
8276 are a
8277 depen‐
8278 dent of
8279 a target
8280 speci‐
8281 fied on
8282 the com‐
8283 mand
8284 line--but
8285 they
8286 will
8287 always
8288 be built
8289 if so
8290 speci‐
8291 fied.
8292 Multiple
8293 targets
8294 can be
8295 passed
8296 in to a
8297 single
8298 call to
8299 Always‐
8300 Build().
8301
8302
8303 env.Append(key=val,
8304 [...])
8305 Appends
8306 the
8307 speci‐
8308 fied
8309 keyword
8310 argu‐
8311 ments to
8312 the end
8313 of con‐
8314 struc‐
8315 tion
8316 vari‐
8317 ables in
8318 the
8319 environ‐
8320 ment.
8321 If the
8322 Environ‐
8323 ment
8324 does not
8325 have the
8326 speci‐
8327 fied
8328 con‐
8329 struc‐
8330 tion
8331 vari‐
8332 able, it
8333 is sim‐
8334 ply
8335 added to
8336 the
8337 environ‐
8338 ment.
8339 If the
8340 values
8341 of the
8342 con‐
8343 struc‐
8344 tion
8345 variable
8346 and the
8347 keyword
8348 argument
8349 are the
8350 same
8351 type,
8352 then the
8353 two val‐
8354 ues will
8355 be sim‐
8356 ply
8357 added
8358 together.
8359 Other‐
8360 wise,
8361 the con‐
8362 struc‐
8363 tion
8364 variable
8365 and the
8366 value of
8367 the key‐
8368 word
8369 argument
8370 are both
8371 coerced
8372 to
8373 lists,
8374 and the
8375 lists
8376 are
8377 added
8378 together.
8379 (See
8380 also the
8381 Prepend
8382 method,
8383 below.)
8384
8385 Example:
8386
8387 env.Append(CCFLAGS = ' -g', FOO = ['foo.yyy'])
8388
8389
8390 env.Appen‐
8391 dEN‐
8392 VPath(name,
8393 newpath,
8394 [envname,
8395 sep])
8396 This
8397 appends
8398 new
8399 path
8400 ele‐
8401 ments
8402 to
8403 the
8404 given
8405 path
8406 in
8407 the
8408 spec‐
8409 i‐
8410 fied
8411 exter‐
8412 nal
8413 envi‐
8414 ron‐
8415 ment
8416 (ENV
8417 by
8418 default).
8419 This
8420 will
8421 only
8422 add
8423 any
8424 par‐
8425 tic‐
8426 u‐
8427 lar
8428 path
8429 once
8430 (leav‐
8431 ing
8432 the
8433 last
8434 one
8435 it
8436 encoun‐
8437 ters
8438 and
8439 ignor‐
8440 ing
8441 the
8442 rest,
8443 to
8444 pre‐
8445 serve
8446 path
8447 order),
8448 and
8449 to
8450 help
8451 assure
8452 this,
8453 will
8454 nor‐
8455 mal‐
8456 ize
8457 all
8458 paths
8459 (using
8460 os.path.norm‐
8461 path
8462 and
8463 os.path.norm‐
8464 case).
8465 This
8466 can
8467 also
8468 han‐
8469 dle
8470 the
8471 case
8472 where
8473 the
8474 given
8475 old
8476 path
8477 vari‐
8478 able
8479 is
8480 a
8481 list
8482 instead
8483 of
8484 a
8485 string,
8486 in
8487 which
8488 case
8489 a
8490 list
8491 will
8492 be
8493 returned
8494 instead
8495 of
8496 a
8497 string.
8498
8499 Exam‐
8500 ple:
8501
8502 print 'before:',env['ENV']['INCLUDE']
8503 include_path = '/foo/bar:/foo'
8504 env.AppendENVPath('INCLUDE', include_path)
8505 print 'after:',env['ENV']['INCLUDE']
8506
8507 yields:
8508 before: /foo:/biz
8509 after: /biz:/foo/bar:/foo
8510
8511
8512 env.Appen‐
8513 dUnique(key=val,
8514 [...])
8515 Appends
8516 the
8517 spec‐
8518 i‐
8519 fied
8520 key‐
8521 word
8522 argu‐
8523 ments
8524 to
8525 the
8526 end
8527 of
8528 con‐
8529 struc‐
8530 tion
8531 vari‐
8532 ables
8533 in
8534 the
8535 envi‐
8536 ron‐
8537 ment.
8538 If
8539 the
8540 Envi‐
8541 ron‐
8542 ment
8543 does
8544 not
8545 have
8546 the
8547 spec‐
8548 i‐
8549 fied
8550 con‐
8551 struc‐
8552 tion
8553 vari‐
8554 able,
8555 it
8556 is
8557 sim‐
8558 ply
8559 added
8560 to
8561 the
8562 envi‐
8563 ron‐
8564 ment.
8565 If
8566 the
8567 con‐
8568 struc‐
8569 tion
8570 vari‐
8571 able
8572 being
8573 appended
8574 to
8575 is
8576 a
8577 list,
8578 then
8579 any
8580 value(s)
8581 that
8582 already
8583 exist
8584 in
8585 the
8586 con‐
8587 struc‐
8588 tion
8589 vari‐
8590 able
8591 will
8592 not
8593 be
8594 added
8595 again
8596 to
8597 the
8598 list.
8599
8600 Exam‐
8601 ple:
8602
8603 env.AppendUnique(CCFLAGS = '-g', FOO = ['foo.yyy'])
8604
8605
8606 env.Bit‐
8607 Keeper()
8608 A
8609 fac‐
8610 tory
8611 func‐
8612 tion
8613 that
8614 returns
8615 a
8616 Builder
8617 object
8618 to
8619 be
8620 used
8621 to
8622 fetch
8623 source
8624 files
8625 using
8626 Bit‐
8627 Keeper.
8628 The
8629 returned
8630 Builder
8631 is
8632 intended
8633 to
8634 be
8635 passed
8636 to
8637 the
8638 Source‐
8639 Code
8640 func‐
8641 tion.
8642
8643 Exam‐
8644 ple:
8645
8646 env.SourceCode('.', env.BitKeeper())
8647
8648
8649 Build‐
8650 Dir(build_dir,
8651 src_dir,
8652 [dupli‐
8653 cate])
8654
8655 env.Build‐
8656 Dir(build_dir,
8657 src_dir,
8658 [dupli‐
8659 cate])
8660 Syn‐
8661 onyms
8662 for
8663 Vari‐
8664 ant‐
8665 Dir()
8666 and
8667 env.Vari‐
8668 ant‐
8669 Dir().
8670 The
8671 build_dir
8672 argu‐
8673 ment
8674 becomes
8675 the
8676 vari‐
8677 ant_dir
8678 argu‐
8679 ment
8680 of
8681 Vari‐
8682 ant‐
8683 Dir()
8684 or
8685 env.Vari‐
8686 ant‐
8687 Dir().
8688 (This
8689 will
8690 be
8691 offi‐
8692 cially
8693 dep‐
8694 re‐
8695 cated
8696 some
8697 day.)
8698
8699
8700 Builder(action,
8701 [argu‐
8702 ments])
8703
8704 env.Builder(action,
8705 [argu‐
8706 ments])
8707 Cre‐
8708 ates
8709 a
8710 Builder
8711 object
8712 for
8713 the
8714 spec‐
8715 i‐
8716 fied
8717 action.
8718 See
8719 the
8720 sec‐
8721 tion
8722 "Builder
8723 Objects,"
8724 below,
8725 for
8726 a
8727 com‐
8728 plete
8729 expla‐
8730 na‐
8731 tion
8732 of
8733 the
8734 argu‐
8735 ments
8736 and
8737 behav‐
8738 ior.
8739
8740 Note
8741 that
8742 the
8743 env.Builder()
8744 form
8745 of
8746 the
8747 invo‐
8748 ca‐
8749 tion
8750 will
8751 expand
8752 con‐
8753 struc‐
8754 tion
8755 vari‐
8756 ables
8757 in
8758 any
8759 argu‐
8760 ments
8761 strings,
8762 includ‐
8763 ing
8764 the
8765 action
8766 argu‐
8767 ment,
8768 at
8769 the
8770 time
8771 it
8772 is
8773 called
8774 using
8775 the
8776 con‐
8777 struc‐
8778 tion
8779 vari‐
8780 ables
8781 in
8782 the
8783 env
8784 con‐
8785 struc‐
8786 tion
8787 envi‐
8788 ron‐
8789 ment
8790 through
8791 which
8792 env.Builder()
8793 was
8794 called.
8795 The
8796 Builder()
8797 form
8798 delays
8799 all
8800 vari‐
8801 able
8802 expan‐
8803 sion
8804 until
8805 after
8806 the
8807 Builder
8808 object
8809 is
8810 actu‐
8811 ally
8812 called.
8813
8814
8815 CacheDir(cache_dir)
8816
8817 env.CacheDir(cache_dir)
8818 Spec‐
8819 i‐
8820 fies
8821 that
8822 scons
8823 will
8824 main‐
8825 tain
8826 a
8827 cache
8828 of
8829 derived
8830 files
8831 in
8832 cache_dir
8833 .
8834 The
8835 derived
8836 files
8837 in
8838 the
8839 cache
8840 will
8841 be
8842 shared
8843 among
8844 all
8845 the
8846 builds
8847 using
8848 the
8849 same
8850 CacheDir()
8851 call.
8852 Spec‐
8853 i‐
8854 fy‐
8855 ing
8856 a
8857 cache_dir
8858 of
8859 None
8860 dis‐
8861 ables
8862 derived
8863 file
8864 caching.
8865
8866 Call‐
8867 ing
8868 env.CacheDir()
8869 will
8870 only
8871 affect
8872 tar‐
8873 gets
8874 built
8875 through
8876 the
8877 spec‐
8878 i‐
8879 fied
8880 con‐
8881 struc‐
8882 tion
8883 envi‐
8884 ron‐
8885 ment.
8886 Call‐
8887 ing
8888 CacheDir()
8889 sets
8890 a
8891 global
8892 default
8893 that
8894 will
8895 be
8896 used
8897 by
8898 all
8899 tar‐
8900 gets
8901 built
8902 through
8903 con‐
8904 struc‐
8905 tion
8906 envi‐
8907 ron‐
8908 ments
8909 that
8910 do
8911 not
8912 have
8913 an
8914 env.CacheDir()
8915 spec‐
8916 i‐
8917 fied.
8918
8919 When
8920 a
8921 CacheDir()
8922 is
8923 being
8924 used
8925 and
8926 scons
8927 finds
8928 a
8929 derived
8930 file
8931 that
8932 needs
8933 to
8934 be
8935 rebuilt,
8936 it
8937 will
8938 first
8939 look
8940 in
8941 the
8942 cache
8943 to
8944 see
8945 if
8946 a
8947 derived
8948 file
8949 has
8950 already
8951 been
8952 built
8953 from
8954 iden‐
8955 ti‐
8956 cal
8957 input
8958 files
8959 and
8960 an
8961 iden‐
8962 ti‐
8963 cal
8964 build
8965 action
8966 (as
8967 incor‐
8968 po‐
8969 rated
8970 into
8971 the
8972 MD5
8973 build
8974 sig‐
8975 na‐
8976 ture).
8977 If
8978 so,
8979 scons
8980 will
8981 retrieve
8982 the
8983 file
8984 from
8985 the
8986 cache.
8987 If
8988 the
8989 derived
8990 file
8991 is
8992 not
8993 present
8994 in
8995 the
8996 cache,
8997 scons
8998 will
8999 rebuild
9000 it
9001 and
9002 then
9003 place
9004 a
9005 copy
9006 of
9007 the
9008 built
9009 file
9010 in
9011 the
9012 cache
9013 (iden‐
9014 ti‐
9015 fied
9016 by
9017 its
9018 MD5
9019 build
9020 sig‐
9021 na‐
9022 ture),
9023 so
9024 that
9025 it
9026 may
9027 be
9028 retrieved
9029 by
9030 other
9031 builds
9032 that
9033 need
9034 to
9035 build
9036 the
9037 same
9038 derived
9039 file
9040 from
9041 iden‐
9042 ti‐
9043 cal
9044 inputs.
9045
9046 Use
9047 of
9048 a
9049 spec‐
9050 i‐
9051 fied
9052 CacheDir()
9053 may
9054 be
9055 dis‐
9056 abled
9057 for
9058 any
9059 invo‐
9060 ca‐
9061 tion
9062 by
9063 using
9064 the
9065 --cache-
9066 dis‐
9067 able
9068 option.
9069
9070 If
9071 the
9072 --cache-
9073 force
9074 option
9075 is
9076 used,
9077 scons
9078 will
9079 place
9080 a
9081 copy
9082 of
9083 all
9084 derived
9085 files
9086 in
9087 the
9088 cache,
9089 even
9090 if
9091 they
9092 already
9093 existed
9094 and
9095 were
9096 not
9097 built
9098 by
9099 this
9100 invo‐
9101 ca‐
9102 tion.
9103 This
9104 is
9105 use‐
9106 ful
9107 to
9108 pop‐
9109 u‐
9110 late
9111 a
9112 cache
9113 the
9114 first
9115 time
9116 CacheDir()
9117 is
9118 added
9119 to
9120 a
9121 build,
9122 or
9123 after
9124 using
9125 the
9126 --cache-
9127 dis‐
9128 able
9129 option.
9130
9131 When
9132 using
9133 CacheDir(),
9134 scons
9135 will
9136 report,
9137 "Retrieved
9138 `file'
9139 from
9140 cache,"
9141 unless
9142 the
9143 --cache-
9144 show
9145 option
9146 is
9147 being
9148 used.
9149 When
9150 the
9151 --cache-
9152 show
9153 option
9154 is
9155 used,
9156 scons
9157 will
9158 print
9159 the
9160 action
9161 that
9162 would
9163 have
9164 been
9165 used
9166 to
9167 build
9168 the
9169 file,
9170 with‐
9171 out
9172 any
9173 indi‐
9174 ca‐
9175 tion
9176 that
9177 the
9178 file
9179 was
9180 actu‐
9181 ally
9182 retrieved
9183 from
9184 the
9185 cache.
9186 This
9187 is
9188 use‐
9189 ful
9190 to
9191 gen‐
9192 er‐
9193 ate
9194 build
9195 logs
9196 that
9197 are
9198 equiv‐
9199 a‐
9200 lent
9201 regard‐
9202 less
9203 of
9204 whether
9205 a
9206 given
9207 derived
9208 file
9209 has
9210 been
9211 built
9212 in-
9213 place
9214 or
9215 retrieved
9216 from
9217 the
9218 cache.
9219
9220 The
9221 NoCache()
9222 method
9223 can
9224 be
9225 used
9226 to
9227 dis‐
9228 able
9229 caching
9230 of
9231 spe‐
9232 cific
9233 files.
9234 This
9235 can
9236 be
9237 use‐
9238 ful
9239 if
9240 inputs
9241 and/or
9242 out‐
9243 puts
9244 of
9245 some
9246 tool
9247 are
9248 impos‐
9249 si‐
9250 ble
9251 to
9252 pre‐
9253 dict
9254 or
9255 pro‐
9256 hib‐
9257 i‐
9258 tive‐
9259 ly
9260 large.
9261
9262
9263 Clean(tar‐
9264 gets,
9265 files_or_dirs)
9266
9267 env.Clean(tar‐
9268 gets,
9269 files_or_dirs)
9270 This
9271 spec‐
9272 i‐
9273 fies
9274 a
9275 list
9276 of
9277 files
9278 or
9279 direc‐
9280 to‐
9281 ries
9282 which
9283 should
9284 be
9285 removed
9286 when‐
9287 ever
9288 the
9289 tar‐
9290 gets
9291 are
9292 spec‐
9293 i‐
9294 fied
9295 with
9296 the
9297 -c
9298 com‐
9299 mand
9300 line
9301 option.
9302 The
9303 spec‐
9304 i‐
9305 fied
9306 tar‐
9307 gets
9308 may
9309 be
9310 a
9311 list
9312 or
9313 an
9314 indi‐
9315 vid‐
9316 ual
9317 tar‐
9318 get.
9319 Mul‐
9320 ti‐
9321 ple
9322 calls
9323 to
9324 Clean()
9325 are
9326 legal,
9327 and
9328 cre‐
9329 ate
9330 new
9331 tar‐
9332 gets
9333 or
9334 add
9335 files
9336 and
9337 direc‐
9338 to‐
9339 ries
9340 to
9341 the
9342 clean
9343 list
9344 for
9345 the
9346 spec‐
9347 i‐
9348 fied
9349 tar‐
9350 gets.
9351
9352 Mul‐
9353 ti‐
9354 ple
9355 files
9356 or
9357 direc‐
9358 to‐
9359 ries
9360 should
9361 be
9362 spec‐
9363 i‐
9364 fied
9365 either
9366 as
9367 sep‐
9368 a‐
9369 rate
9370 argu‐
9371 ments
9372 to
9373 the
9374 Clean()
9375 method,
9376 or
9377 as
9378 a
9379 list.
9380 Clean()
9381 will
9382 also
9383 accept
9384 the
9385 return
9386 value
9387 of
9388 any
9389 of
9390 the
9391 con‐
9392 struc‐
9393 tion
9394 envi‐
9395 ron‐
9396 ment
9397 Builder
9398 meth‐
9399 ods.
9400 Exam‐
9401 ples:
9402
9403 The
9404 related
9405 NoClean()
9406 func‐
9407 tion
9408 over‐
9409 rides
9410 call‐
9411 ing
9412 Clean()
9413 for
9414 the
9415 same
9416 tar‐
9417 get,
9418 and
9419 any
9420 tar‐
9421 gets
9422 passed
9423 to
9424 both
9425 func‐
9426 tions
9427 will
9428 not
9429 be
9430 removed
9431 by
9432 the
9433 -c
9434 option.
9435
9436 Exam‐
9437 ples:
9438
9439 Clean('foo', ['bar', 'baz'])
9440 Clean('dist', env.Program('hello', 'hello.c'))
9441 Clean(['foo', 'bar'], 'something_else_to_clean')
9442
9443
9444 Com‐
9445 mand(tar‐
9446 get,
9447 source,
9448 action,
9449 [key=val,
9450 ...])
9451
9452 env.Com‐
9453 mand(tar‐
9454 get,
9455 source,
9456 action,
9457 [key=val,
9458 ...])
9459 Exe‐
9460 cutes
9461 a
9462 spe‐
9463 cific
9464 action
9465 (or
9466 list
9467 of
9468 actions)
9469 to
9470 build
9471 a
9472 tar‐
9473 get
9474 file
9475 or
9476 files.
9477 This
9478 is
9479 more
9480 con‐
9481 ve‐
9482 nient
9483 than
9484 defin‐
9485 ing
9486 a
9487 sep‐
9488 a‐
9489 rate
9490 Builder
9491 object
9492 for
9493 a
9494 sin‐
9495 gle
9496 spe‐
9497 cial-
9498 case
9499 build.
9500
9501 As
9502 a
9503 spe‐
9504 cial
9505 case,
9506 the
9507 source_scan‐
9508 ner
9509 key‐
9510 word
9511 argu‐
9512 ment
9513 can
9514 be
9515 used
9516 to
9517 spec‐
9518 ify
9519 a
9520 Scan‐
9521 ner
9522 object
9523 that
9524 will
9525 be
9526 used
9527 to
9528 scan
9529 the
9530 sources.
9531 (The
9532 global
9533 DirScan‐
9534 ner
9535 object
9536 can
9537 be
9538 used
9539 if
9540 any
9541 of
9542 the
9543 sources
9544 will
9545 be
9546 direc‐
9547 to‐
9548 ries
9549 that
9550 must
9551 be
9552 scanned
9553 on-
9554 disk
9555 for
9556 changes
9557 to
9558 files
9559 that
9560 aren't
9561 already
9562 spec‐
9563 i‐
9564 fied
9565 in
9566 other
9567 Builder
9568 of
9569 func‐
9570 tion
9571 calls.)
9572
9573 Any
9574 other
9575 key‐
9576 word
9577 argu‐
9578 ments
9579 spec‐
9580 i‐
9581 fied
9582 over‐
9583 ride
9584 any
9585 same-
9586 named
9587 exist‐
9588 ing
9589 con‐
9590 struc‐
9591 tion
9592 vari‐
9593 ables.
9594
9595 An
9596 action
9597 can
9598 be
9599 an
9600 exter‐
9601 nal
9602 com‐
9603 mand,
9604 spec‐
9605 i‐
9606 fied
9607 as
9608 a
9609 string,
9610 or
9611 a
9612 callable
9613 Python
9614 object;
9615 see
9616 "Action
9617 Objects,"
9618 below,
9619 for
9620 more
9621 com‐
9622 plete
9623 infor‐
9624 ma‐
9625 tion.
9626 Also
9627 note
9628 that
9629 a
9630 string
9631 spec‐
9632 i‐
9633 fy‐
9634 ing
9635 an
9636 exter‐
9637 nal
9638 com‐
9639 mand
9640 may
9641 be
9642 pre‐
9643 ceded
9644 by
9645 an
9646 @
9647 (at-
9648 sign)
9649 to
9650 sup‐
9651 press
9652 print‐
9653 ing
9654 the
9655 com‐
9656 mand
9657 in
9658 ques‐
9659 tion,
9660 or
9661 by
9662 a
9663 -
9664 (hyphen)
9665 to
9666 ignore
9667 the
9668 exit
9669 sta‐
9670 tus
9671 of
9672 the
9673 exter‐
9674 nal
9675 com‐
9676 mand.
9677
9678 Exam‐
9679 ples:
9680
9681 env.Command('foo.out', 'foo.in',
9682 "$FOO_BUILD < $SOURCES > $TARGET")
9683
9684 env.Command('bar.out', 'bar.in',
9685 ["rm -f $TARGET",
9686 "$BAR_BUILD < $SOURCES > $TARGET"],
9687 ENV = {'PATH' : '/usr/local/bin/'})
9688
9689 def rename(env, target, source):
9690 import os
9691 os.rename('.tmp', str(target[0]))
9692
9693 env.Command('baz.out', 'baz.in',
9694 ["$BAZ_BUILD < $SOURCES > .tmp",
9695 rename ])
9696
9697
9698 Note
9699 that
9700 the
9701 Com‐
9702 mand()
9703 func‐
9704 tion
9705 will
9706 usu‐
9707 ally
9708 assume,
9709 by
9710 default,
9711 that
9712 the
9713 spec‐
9714 i‐
9715 fied
9716 tar‐
9717 gets
9718 and/or
9719 sources
9720 are
9721 Files,
9722 if
9723 no
9724 other
9725 part
9726 of
9727 the
9728 con‐
9729 fig‐
9730 u‐
9731 ra‐
9732 tion
9733 iden‐
9734 ti‐
9735 fies
9736 what
9737 type
9738 of
9739 entry
9740 it
9741 is.
9742 If
9743 nec‐
9744 es‐
9745 sary,
9746 you
9747 can
9748 explic‐
9749 itly
9750 spec‐
9751 ify
9752 that
9753 tar‐
9754 gets
9755 or
9756 source
9757 nodes
9758 should
9759 be
9760 treated
9761 as
9762 direc‐
9763 to‐
9764 riese
9765 by
9766 using
9767 the
9768 Dir()
9769 or
9770 env.Dir()
9771 func‐
9772 tions.
9773
9774 Exam‐
9775 ples:
9776
9777 env.Command('ddd.list', Dir('ddd'), 'ls -l $SOURCE > $TARGET')
9778
9779 env['DISTDIR'] = 'destination/directory'
9780 env.Command(env.Dir('$DISTDIR')), None, make_distdir)
9781
9782
9783 (Also
9784 note
9785 that
9786 SCons
9787 will
9788 usu‐
9789 ally
9790 auto‐
9791 mat‐
9792 i‐
9793 cally
9794 cre‐
9795 ate
9796 any
9797 direc‐
9798 tory
9799 nec‐
9800 es‐
9801 sary
9802 to
9803 hold
9804 a
9805 tar‐
9806 get
9807 file,
9808 so
9809 you
9810 nor‐
9811 mally
9812 don't
9813 need
9814 to
9815 cre‐
9816 ate
9817 direc‐
9818 to‐
9819 ries
9820 by
9821 hand.)
9822
9823
9824 Con‐
9825 fig‐
9826 ure(env,
9827 [cus‐
9828 tom_tests,
9829 conf_dir,
9830 log_file,
9831 con‐
9832 fig_h])
9833
9834 env.Con‐
9835 fig‐
9836 ure([cus‐
9837 tom_tests,
9838 conf_dir,
9839 log_file,
9840 con‐
9841 fig_h])
9842 Cre‐
9843 ates
9844 a
9845 Con‐
9846 fig‐
9847 ure
9848 object
9849 for
9850 inte‐
9851 grated
9852 func‐
9853 tion‐
9854 al‐
9855 ity
9856 sim‐
9857 i‐
9858 lar
9859 to
9860 GNU
9861 auto‐
9862 conf.
9863 See
9864 the
9865 sec‐
9866 tion
9867 "Con‐
9868 fig‐
9869 ure
9870 Con‐
9871 texts,"
9872 below,
9873 for
9874 a
9875 com‐
9876 plete
9877 expla‐
9878 na‐
9879 tion
9880 of
9881 the
9882 argu‐
9883 ments
9884 and
9885 behav‐
9886 ior.
9887
9888
9889 env.Clone([key=val,
9890 ...])
9891 Return
9892 a
9893 sep‐
9894 a‐
9895 rate
9896 copy
9897 of
9898 a
9899 con‐
9900 struc‐
9901 tion
9902 envi‐
9903 ron‐
9904 ment.
9905 If
9906 there
9907 are
9908 any
9909 key‐
9910 word
9911 argu‐
9912 ments
9913 spec‐
9914 i‐
9915 fied,
9916 they
9917 are
9918 added
9919 to
9920 the
9921 returned
9922 copy,
9923 over‐
9924 writ‐
9925 ing
9926 any
9927 exist‐
9928 ing
9929 val‐
9930 ues
9931 for
9932 the
9933 key‐
9934 words.
9935
9936 Exam‐
9937 ple:
9938
9939 env2 = env.Clone()
9940 env3 = env.Clone(CCFLAGS = '-g')
9941
9942 Addi‐
9943 tion‐
9944 ally,
9945 a
9946 list
9947 of
9948 tools
9949 and
9950 a
9951 tool‐
9952 path
9953 may
9954 be
9955 spec‐
9956 i‐
9957 fied,
9958 as
9959 in
9960 the
9961 Envi‐
9962 ron‐
9963 ment
9964 con‐
9965 struc‐
9966 tor:
9967
9968 def MyTool(env): env['FOO'] = 'bar'
9969 env4 = env.Clone(tools = ['msvc', MyTool])
9970
9971 The
9972 parse_flags
9973 key‐
9974 word
9975 argu‐
9976 ment
9977 is
9978 also
9979 rec‐
9980 og‐
9981 nized:
9982
9983 # create an environment for compiling programs that use wxWidgets
9984 wx_env = env.Clone(parse_flags = '!wx-config --cflags --cxxflags')
9985
9986
9987 env.Copy([key=val,
9988 ...])
9989 A
9990 now-
9991 dep‐
9992 re‐
9993 cated
9994 syn‐
9995 onym
9996 for
9997 env.Clone().
9998
9999
10000 env.CVS(repos‐
10001 i‐
10002 tory,
10003 mod‐
10004 ule)
10005 A
10006 fac‐
10007 tory
10008 func‐
10009 tion
10010 that
10011 returns
10012 a
10013 Builder
10014 object
10015 to
10016 be
10017 used
10018 to
10019 fetch
10020 source
10021 files
10022 from
10023 the
10024 spec‐
10025 i‐
10026 fied
10027 CVS
10028 repos‐
10029 i‐
10030 tory.
10031 The
10032 returned
10033 Builder
10034 is
10035 intended
10036 to
10037 be
10038 passed
10039 to
10040 the
10041 Source‐
10042 Code
10043 func‐
10044 tion.
10045
10046 The
10047 optional
10048 spec‐
10049 i‐
10050 fied
10051 mod‐
10052 ule
10053 will
10054 be
10055 added
10056 to
10057 the
10058 begin‐
10059 ning
10060 of
10061 all
10062 repos‐
10063 i‐
10064 tory
10065 path
10066 names;
10067 this
10068 can
10069 be
10070 used,
10071 in
10072 essence,
10073 to
10074 strip
10075 ini‐
10076 tial
10077 direc‐
10078 tory
10079 names
10080 from
10081 the
10082 repos‐
10083 i‐
10084 tory
10085 path
10086 names,
10087 so
10088 that
10089 you
10090 only
10091 have
10092 to
10093 repli‐
10094 cate
10095 part
10096 of
10097 the
10098 repos‐
10099 i‐
10100 tory
10101 direc‐
10102 tory
10103 hier‐
10104 ar‐
10105 chy
10106 in
10107 your
10108 local
10109 build
10110 direc‐
10111 tory.
10112
10113 Exam‐
10114 ples:
10115
10116 # Will fetch foo/bar/src.c
10117 # from /usr/local/CVSROOT/foo/bar/src.c.
10118 env.SourceCode('.', env.CVS('/usr/local/CVSROOT'))
10119
10120 # Will fetch bar/src.c
10121 # from /usr/local/CVSROOT/foo/bar/src.c.
10122 env.SourceCode('.', env.CVS('/usr/local/CVSROOT', 'foo'))
10123
10124 # Will fetch src.c
10125 # from /usr/local/CVSROOT/foo/bar/src.c.
10126 env.SourceCode('.', env.CVS('/usr/local/CVSROOT', 'foo/bar'))
10127
10128
10129 Decider(func‐
10130 tion)
10131
10132 env.Decider(func‐
10133 tion)
10134 Spec‐
10135 i‐
10136 fies
10137 that
10138 all
10139 up-
10140 to-
10141 date
10142 deci‐
10143 sions
10144 for
10145 tar‐
10146 gets
10147 built
10148 through
10149 this
10150 con‐
10151 struc‐
10152 tion
10153 envi‐
10154 ron‐
10155 ment
10156 will
10157 be
10158 han‐
10159 dled
10160 by
10161 the
10162 spec‐
10163 i‐
10164 fied
10165 func‐
10166 tion.
10167 The
10168 func‐
10169 tion
10170 can
10171 be
10172 one
10173 of
10174 the
10175 fol‐
10176 low‐
10177 ing
10178 strings
10179 that
10180 spec‐
10181 ify
10182 the
10183 type
10184 of
10185 deci‐
10186 sion
10187 func‐
10188 tion
10189 to
10190 be
10191 per‐
10192 formed:
10193
10194
10195 time‐
10196 stamp-
10197 newer
10198 Spec‐
10199 i‐
10200 fies
10201 that
10202 a
10203 tar‐
10204 get
10205 shall
10206 be
10207 con‐
10208 sid‐
10209 ered
10210 out
10211 of
10212 date
10213 and
10214 rebuilt
10215 if
10216 the
10217 depen‐
10218 dency's
10219 time‐
10220 stamp
10221 is
10222 newer
10223 than
10224 the
10225 tar‐
10226 get
10227 file's
10228 time‐
10229 stamp.
10230 This
10231 is
10232 the
10233 behav‐
10234 ior
10235 of
10236 the
10237 clas‐
10238 sic
10239 Make
10240 util‐
10241 ity,
10242 and
10243 make
10244 can
10245 be
10246 used
10247 a
10248 syn‐
10249 onym
10250 for
10251 time‐
10252 stamp-
10253 newer.
10254
10255
10256 time‐
10257 stamp-
10258 match
10259 Spec‐
10260 i‐
10261 fies
10262 that
10263 a
10264 tar‐
10265 get
10266 shall
10267 be
10268 con‐
10269 sid‐
10270 ered
10271 out
10272 of
10273 date
10274 and
10275 rebuilt
10276 if
10277 the
10278 depen‐
10279 dency's
10280 time‐
10281 stamp
10282 is
10283 dif‐
10284 fer‐
10285 ent
10286 than
10287 the
10288 time‐
10289 stamp
10290 recorded
10291 the
10292 last
10293 time
10294 the
10295 tar‐
10296 get
10297 was
10298 built.
10299 This
10300 pro‐
10301 vides
10302 behav‐
10303 ior
10304 very
10305 sim‐
10306 i‐
10307 lar
10308 to
10309 the
10310 clas‐
10311 sic
10312 Make
10313 util‐
10314 ity
10315 (in
10316 par‐
10317 tic‐
10318 u‐
10319 lar,
10320 files
10321 are
10322 not
10323 opened
10324 up
10325 so
10326 that
10327 their
10328 con‐
10329 tents
10330 can
10331 be
10332 check‐
10333 summed)
10334 except
10335 that
10336 the
10337 tar‐
10338 get
10339 will
10340 also
10341 be
10342 rebuilt
10343 if
10344 a
10345 depen‐
10346 dency
10347 file
10348 has
10349 been
10350 restored
10351 to
10352 a
10353 ver‐
10354 sion
10355 with
10356 an
10357 ear‐
10358 lier
10359 time‐
10360 stamp,
10361 such
10362 as
10363 can
10364 hap‐
10365 pen
10366 when
10367 restor‐
10368 ing
10369 files
10370 from
10371 backup
10372 ar‐
10373 chives.
10374
10375
10376 MD5
10377 Spec‐
10378 i‐
10379 fies
10380 that
10381 a
10382 tar‐
10383 get
10384 shall
10385 be
10386 con‐
10387 sid‐
10388 ered
10389 out
10390 of
10391 date
10392 and
10393 rebuilt
10394 if
10395 the
10396 depen‐
10397 dency's
10398 con‐
10399 tent
10400 has
10401 changed
10402 sine
10403 the
10404 last
10405 time
10406 the
10407 tar‐
10408 get
10409 was
10410 built,
10411 as
10412 deter‐
10413 mined
10414 be
10415 per‐
10416 form‐
10417 ing
10418 an
10419 MD5
10420 check‐
10421 sum
10422 on
10423 the
10424 depen‐
10425 dency's
10426 con‐
10427 tents
10428 and
10429 com‐
10430 par‐
10431 ing
10432 it
10433 to
10434 the
10435 check‐
10436 sum
10437 recorded
10438 the
10439 last
10440 time
10441 the
10442 tar‐
10443 get
10444 was
10445 built.
10446 con‐
10447 tent
10448 can
10449 be
10450 used
10451 as
10452 a
10453 syn‐
10454 onym
10455 for
10456 MD5.
10457
10458
10459 MD5-time‐
10460 stamp
10461 Spec‐
10462 i‐
10463 fies
10464 that
10465 a
10466 tar‐
10467 get
10468 shall
10469 be
10470 con‐
10471 sid‐
10472 ered
10473 out
10474 of
10475 date
10476 and
10477 rebuilt
10478 if
10479 the
10480 depen‐
10481 dency's
10482 con‐
10483 tent
10484 has
10485 changed
10486 sine
10487 the
10488 last
10489 time
10490 the
10491 tar‐
10492 get
10493 was
10494 built,
10495 except
10496 that
10497 depen‐
10498 den‐
10499 cies
10500 with
10501 a
10502 time‐
10503 stamp
10504 that
10505 matches
10506 the
10507 last
10508 time
10509 the
10510 tar‐
10511 get
10512 was
10513 rebuilt
10514 will
10515 be
10516 assumed
10517 to
10518 be
10519 up-
10520 to-
10521 date
10522 and
10523 not
10524 rebuilt.
10525 This
10526 pro‐
10527 vides
10528 behav‐
10529 ior
10530 very
10531 sim‐
10532 i‐
10533 lar
10534 to
10535 the
10536 MD5
10537 behav‐
10538 ior
10539 of
10540 always
10541 check‐
10542 sum‐
10543 ming
10544 file
10545 con‐
10546 tents,
10547 with
10548 an
10549 opti‐
10550 miza‐
10551 tion
10552 of
10553 not
10554 check‐
10555 ing
10556 the
10557 con‐
10558 tents
10559 of
10560 files
10561 whose
10562 time‐
10563 stamps
10564 haven't
10565 changed.
10566 The
10567 draw‐
10568 back
10569 is
10570 that
10571 SCons
10572 will
10573 not
10574 detect
10575 if
10576 a
10577 file's
10578 con‐
10579 tent
10580 has
10581 changed
10582 but
10583 its
10584 time‐
10585 stamp
10586 is
10587 the
10588 same,
10589 as
10590 might
10591 hap‐
10592 pen
10593 in
10594 an
10595 auto‐
10596 mated
10597 script
10598 that
10599 runs
10600 a
10601 build,
10602 updates
10603 a
10604 file,
10605 and
10606 runs
10607 the
10608 build
10609 again,
10610 all
10611 within
10612 a
10613 sin‐
10614 gle
10615 sec‐
10616 ond.
10617
10618
10619 Exam‐
10620 ples:
10621
10622 # Use exact timestamp matches by default.
10623 Decider('timestamp-match')
10624
10625 # Use MD5 content signatures for any targets built
10626 # with the attached construction environment.
10627 env.Decider('content')
10628
10629
10630 In
10631 addi‐
10632 tion
10633 to
10634 the
10635 above
10636 already-
10637 avail‐
10638 able
10639 func‐
10640 tions,
10641 the
10642 func‐
10643 tion
10644 argu‐
10645 ment
10646 may
10647 be
10648 an
10649 actual
10650 Python
10651 func‐
10652 tion
10653 that
10654 takes
10655 the
10656 fol‐
10657 low‐
10658 ing
10659 three
10660 argu‐
10661 ments:
10662
10663
10664 depen‐
10665 dency The
10666 Node
10667 (file)
10668 which
10669 should
10670 cause
10671 the
10672 tar‐
10673 get
10674 to
10675 be
10676 rebuilt
10677 if
10678 it
10679 has
10680 "changed"
10681 since
10682 the
10683 last
10684 tme
10685 tar‐
10686 get
10687 was
10688 built.
10689
10690
10691 tar‐
10692 get The
10693 Node
10694 (file)
10695 being
10696 built.
10697 In
10698 the
10699 nor‐
10700 mal
10701 case,
10702 this
10703 is
10704 what
10705 should
10706 get
10707 rebuilt
10708 if
10709 the
10710 depen‐
10711 dency
10712 has
10713 "changed."
10714
10715
10716 prev_ni
10717 Stored
10718 infor‐
10719 ma‐
10720 tion
10721 about
10722 the
10723 state
10724 of
10725 the
10726 depen‐
10727 dency
10728 the
10729 last
10730 time
10731 the
10732 tar‐
10733 get
10734 was
10735 built.
10736 This
10737 can
10738 be
10739 con‐
10740 sulted
10741 to
10742 match
10743 var‐
10744 i‐
10745 ous
10746 file
10747 char‐
10748 ac‐
10749 ter‐
10750 is‐
10751 tics
10752 such
10753 as
10754 the
10755 time‐
10756 stamp,
10757 size,
10758 or
10759 con‐
10760 tent
10761 sig‐
10762 na‐
10763 ture.
10764
10765
10766 The
10767 func‐
10768 tion
10769 should
10770 return
10771 a
10772 True
10773 (non-
10774 zero)
10775 value
10776 if
10777 the
10778 depen‐
10779 dency
10780 has
10781 "changed"
10782 since
10783 the
10784 last
10785 time
10786 the
10787 tar‐
10788 get
10789 was
10790 built
10791 (indi‐
10792 cat‐
10793 ing
10794 that
10795 the
10796 tar‐
10797 get
10798 should
10799 be
10800 rebuilt),
10801 and
10802 False
10803 (zero)
10804 oth‐
10805 er‐
10806 wise
10807 (indi‐
10808 cat‐
10809 ing
10810 that
10811 the
10812 tar‐
10813 get
10814 should
10815 not
10816 be
10817 rebuilt).
10818 Note
10819 that
10820 the
10821 deci‐
10822 sion
10823 can
10824 be
10825 made
10826 using
10827 what‐
10828 ever
10829 cri‐
10830 te‐
10831 ria
10832 are
10833 appopri‐
10834 ate.
10835 Ignor‐
10836 ing
10837 some
10838 or
10839 all
10840 of
10841 the
10842 func‐
10843 tion
10844 argu‐
10845 ments
10846 is
10847 per‐
10848 fectly
10849 nor‐
10850 mal.
10851
10852 Exam‐
10853 ple:
10854
10855 def my_decider(dependency, target, prev_ni):
10856 return not os.path.exists(str(target))
10857
10858 env.Decider(my_decider)
10859
10860
10861 Default(tar‐
10862 gets)
10863
10864 env.Default(tar‐
10865 gets)
10866 This
10867 spec‐
10868 i‐
10869 fies
10870 a
10871 list
10872 of
10873 default
10874 tar‐
10875 gets,
10876 which
10877 will
10878 be
10879 built
10880 by
10881 scons
10882 if
10883 no
10884 explicit
10885 tar‐
10886 gets
10887 are
10888 given
10889 on
10890 the
10891 com‐
10892 mand
10893 line.
10894 Mul‐
10895 ti‐
10896 ple
10897 calls
10898 to
10899 Default()
10900 are
10901 legal,
10902 and
10903 add
10904 to
10905 the
10906 list
10907 of
10908 default
10909 tar‐
10910 gets.
10911
10912 Mul‐
10913 ti‐
10914 ple
10915 tar‐
10916 gets
10917 should
10918 be
10919 spec‐
10920 i‐
10921 fied
10922 as
10923 sep‐
10924 a‐
10925 rate
10926 argu‐
10927 ments
10928 to
10929 the
10930 Default()
10931 method,
10932 or
10933 as
10934 a
10935 list.
10936 Default()
10937 will
10938 also
10939 accept
10940 the
10941 Node
10942 returned
10943 by
10944 any
10945 of
10946 a
10947 con‐
10948 struc‐
10949 tion
10950 envi‐
10951 ron‐
10952 ment's
10953 builder
10954 meth‐
10955 ods.
10956
10957 Exam‐
10958 ples:
10959
10960 Default('foo', 'bar', 'baz')
10961 env.Default(['a', 'b', 'c'])
10962 hello = env.Program('hello', 'hello.c')
10963 env.Default(hello)
10964
10965 An
10966 argu‐
10967 ment
10968 to
10969 Default()
10970 of
10971 None
10972 will
10973 clear
10974 all
10975 default
10976 tar‐
10977 gets.
10978 Later
10979 calls
10980 to
10981 Default()
10982 will
10983 add
10984 to
10985 the
10986 (now
10987 empty)
10988 default-
10989 tar‐
10990 get
10991 list
10992 like
10993 nor‐
10994 mal.
10995
10996 The
10997 cur‐
10998 rent
10999 list
11000 of
11001 tar‐
11002 gets
11003 added
11004 using
11005 the
11006 Default()
11007 func‐
11008 tion
11009 or
11010 method
11011 is
11012 avail‐
11013 able
11014 in
11015 the
11016 DEFAULT_TAR‐
11017 GETS
11018 list;
11019 see
11020 below.
11021
11022
11023 Default‐
11024 Envi‐
11025 ron‐
11026 ment([args])
11027 Cre‐
11028 ates
11029 and
11030 returns
11031 a
11032 default
11033 con‐
11034 struc‐
11035 tion
11036 envi‐
11037 ron‐
11038 ment
11039 object.
11040 This
11041 con‐
11042 struc‐
11043 tion
11044 envi‐
11045 ron‐
11046 ment
11047 is
11048 used
11049 inter‐
11050 nally
11051 by
11052 SCons
11053 in
11054 order
11055 to
11056 exe‐
11057 cute
11058 many
11059 of
11060 the
11061 global
11062 func‐
11063 tions
11064 in
11065 this
11066 list,
11067 and
11068 to
11069 fetch
11070 source
11071 files
11072 trans‐
11073 par‐
11074 ently
11075 from
11076 source
11077 code
11078 man‐
11079 age‐
11080 ment
11081 sys‐
11082 tems.
11083
11084
11085 Depends(tar‐
11086 get,
11087 depen‐
11088 dency)
11089
11090 env.Depends(tar‐
11091 get,
11092 depen‐
11093 dency)
11094 Spec‐
11095 i‐
11096 fies
11097 an
11098 explicit
11099 depen‐
11100 dency;
11101 the
11102 tar‐
11103 get
11104 file(s)
11105 will
11106 be
11107 rebuilt
11108 when‐
11109 ever
11110 the
11111 depen‐
11112 dency
11113 file(s)
11114 has
11115 changed.
11116 This
11117 should
11118 only
11119 be
11120 nec‐
11121 es‐
11122 sary
11123 for
11124 cases
11125 where
11126 the
11127 depen‐
11128 dency
11129 is
11130 not
11131 caught
11132 by
11133 a
11134 Scan‐
11135 ner
11136 for
11137 the
11138 file.
11139
11140 Exam‐
11141 ple:
11142
11143 env.Depends('foo', 'other-input-file-for-foo')
11144
11145
11146 env.Dic‐
11147 tio‐
11148 nary([vars])
11149 Returns
11150 a
11151 dic‐
11152 tio‐
11153 nary
11154 object
11155 con‐
11156 tain‐
11157 ing
11158 copies
11159 of
11160 all
11161 of
11162 the
11163 con‐
11164 struc‐
11165 tion
11166 vari‐
11167 ables
11168 in
11169 the
11170 envi‐
11171 ron‐
11172 ment.
11173 If
11174 there
11175 are
11176 any
11177 vari‐
11178 able
11179 names
11180 spec‐
11181 i‐
11182 fied,
11183 only
11184 the
11185 spec‐
11186 i‐
11187 fied
11188 con‐
11189 struc‐
11190 tion
11191 vari‐
11192 ables
11193 are
11194 returned
11195 in
11196 the
11197 dic‐
11198 tio‐
11199 nary.
11200
11201 Exam‐
11202 ple:
11203
11204 dict = env.Dictionary()
11205 cc_dict = env.Dictionary('CC', 'CCFLAGS', 'CCCOM')
11206
11207
11208 Dir(name,
11209 [direc‐
11210 tory])
11211
11212 env.Dir(name,
11213 [direc‐
11214 tory])
11215 This
11216 returns
11217 a
11218 Direc‐
11219 tory
11220 Node,
11221 an
11222 object
11223 that
11224 rep‐
11225 re‐
11226 sents
11227 the
11228 spec‐
11229 i‐
11230 fied
11231 direc‐
11232 tory
11233 name.
11234 name
11235 can
11236 be
11237 a
11238 rel‐
11239 a‐
11240 tive
11241 or
11242 abso‐
11243 lute
11244 path.
11245 direc‐
11246 tory
11247 is
11248 an
11249 optional
11250 direc‐
11251 tory
11252 that
11253 will
11254 be
11255 used
11256 as
11257 the
11258 par‐
11259 ent
11260 direc‐
11261 tory.
11262 If
11263 no
11264 direc‐
11265 tory
11266 is
11267 spec‐
11268 i‐
11269 fied,
11270 the
11271 cur‐
11272 rent
11273 script's
11274 direc‐
11275 tory
11276 is
11277 used
11278 as
11279 the
11280 par‐
11281 ent.
11282
11283 If
11284 name
11285 is
11286 a
11287 list,
11288 SCons
11289 returns
11290 a
11291 list
11292 of
11293 Dir
11294 nodes.
11295 Con‐
11296 struc‐
11297 tion
11298 vari‐
11299 ables
11300 are
11301 expanded
11302 in
11303 name.
11304
11305 Direc‐
11306 tory
11307 Nodes
11308 can
11309 be
11310 used
11311 any‐
11312 where
11313 you
11314 would
11315 sup‐
11316 ply
11317 a
11318 string
11319 as
11320 a
11321 direc‐
11322 tory
11323 name
11324 to
11325 a
11326 Builder
11327 method
11328 or
11329 func‐
11330 tion.
11331 Direc‐
11332 tory
11333 Nodes
11334 have
11335 attributes
11336 and
11337 meth‐
11338 ods
11339 that
11340 are
11341 use‐
11342 ful
11343 in
11344 many
11345 sit‐
11346 u‐
11347 a‐
11348 tions;
11349 see
11350 "File
11351 and
11352 Direc‐
11353 tory
11354 Nodes,"
11355 below.
11356
11357
11358 env.Dump([key])
11359 Returns
11360 a
11361 pretty
11362 print‐
11363 able
11364 rep‐
11365 re‐
11366 sen‐
11367 ta‐
11368 tion
11369 of
11370 the
11371 envi‐
11372 ron‐
11373 ment.
11374 key,
11375 if
11376 not
11377 None,
11378 should
11379 be
11380 a
11381 string
11382 con‐
11383 tain‐
11384 ing
11385 the
11386 name
11387 of
11388 the
11389 vari‐
11390 able
11391 of
11392 inter‐
11393 est.
11394
11395 This
11396 SCon‐
11397 struct:
11398 env=Environment()
11399 print env.Dump('CCCOM')
11400
11401 will
11402 print:
11403
11404 env=Environment()
11405 print env.Dump()
11406
11407 will
11408 print:
11409 { 'AR': 'ar',
11410 'ARCOM': '$AR $ARFLAGS $TARGET $SOURCES0RANLIB $RANLIBFLAGS $TARGET',
11411 'ARFLAGS': ['r'],
11412 'AS': 'as',
11413 'ASCOM': '$AS $ASFLAGS -o $TARGET $SOURCES',
11414 'ASFLAGS': [],
11415 ...
11416
11417
11418 EnsurePython‐
11419 Ver‐
11420 sion(major,
11421 minor)
11422
11423 env.EnsurePython‐
11424 Ver‐
11425 sion(major,
11426 minor)
11427 Ensure
11428 that
11429 the
11430 Python
11431 ver‐
11432 sion
11433 is
11434 at
11435 least
11436 major.minor.
11437 This
11438 func‐
11439 tion
11440 will
11441 print
11442 out
11443 an
11444 error
11445 mes‐
11446 sage
11447 and
11448 exit
11449 SCons
11450 with
11451 a
11452 non-
11453 zero
11454 exit
11455 code
11456 if
11457 the
11458 actual
11459 Python
11460 ver‐
11461 sion
11462 is
11463 not
11464 late
11465 enough.
11466
11467 Exam‐
11468 ple:
11469
11470 EnsurePythonVersion(2,2)
11471
11472
11473 EnsureSConsVer‐
11474 sion(major,
11475 minor,
11476 [revi‐
11477 sion])
11478
11479 env.EnsureSConsVer‐
11480 sion(major,
11481 minor,
11482 [revi‐
11483 sion])
11484 Ensure
11485 that
11486 the
11487 SCons
11488 ver‐
11489 sion
11490 is
11491 at
11492 least
11493 major.minor,
11494 or
11495 major.minor.revi‐
11496 sion.
11497 if
11498 revi‐
11499 sion
11500 is
11501 spec‐
11502 i‐
11503 fied.
11504 This
11505 func‐
11506 tion
11507 will
11508 print
11509 out
11510 an
11511 error
11512 mes‐
11513 sage
11514 and
11515 exit
11516 SCons
11517 with
11518 a
11519 non-
11520 zero
11521 exit
11522 code
11523 if
11524 the
11525 actual
11526 SCons
11527 ver‐
11528 sion
11529 is
11530 not
11531 late
11532 enough.
11533
11534 Exam‐
11535 ples:
11536
11537 EnsureSConsVersion(0,14)
11538
11539 EnsureSConsVersion(0,96,90)
11540
11541
11542 Envi‐
11543 ron‐
11544 ment([key=value,
11545 ...])
11546
11547 env.Envi‐
11548 ron‐
11549 ment([key=value,
11550 ...])
11551 Return
11552 a
11553 new
11554 con‐
11555 struc‐
11556 tion
11557 envi‐
11558 ron‐
11559 ment
11560 ini‐
11561 tial‐
11562 ized
11563 with
11564 the
11565 spec‐
11566 i‐
11567 fied
11568 key=value
11569 pairs.
11570
11571
11572 Exe‐
11573 cute(action,
11574 [str‐
11575 func‐
11576 tion,
11577 varlist])
11578
11579 env.Exe‐
11580 cute(action,
11581 [str‐
11582 func‐
11583 tion,
11584 varlist])
11585 Exe‐
11586 cutes
11587 an
11588 Action
11589 object.
11590 The
11591 spec‐
11592 i‐
11593 fied
11594 action
11595 may
11596 be
11597 an
11598 Action
11599 object
11600 (see
11601 the
11602 sec‐
11603 tion
11604 "Action
11605 Objects,"
11606 below,
11607 for
11608 a
11609 com‐
11610 plete
11611 expla‐
11612 na‐
11613 tion
11614 of
11615 the
11616 argu‐
11617 ments
11618 and
11619 behav‐
11620 ior),
11621 or
11622 it
11623 may
11624 be
11625 a
11626 com‐
11627 mand-
11628 line
11629 string,
11630 list
11631 of
11632 com‐
11633 mands,
11634 or
11635 exe‐
11636 cutable
11637 Python
11638 func‐
11639 tion,
11640 each
11641 of
11642 which
11643 will
11644 be
11645 con‐
11646 verted
11647 into
11648 an
11649 Action
11650 object
11651 and
11652 then
11653 exe‐
11654 cuted.
11655 The
11656 exit
11657 value
11658 of
11659 the
11660 com‐
11661 mand
11662 or
11663 return
11664 value
11665 of
11666 the
11667 Python
11668 func‐
11669 tion
11670 will
11671 be
11672 returned.
11673
11674
11675 Exit([value])
11676
11677 env.Exit([value])
11678 This
11679 tells
11680 scons
11681 to
11682 exit
11683 imme‐
11684 di‐
11685 ately
11686 with
11687 the
11688 spec‐
11689 i‐
11690 fied
11691 value.
11692 A
11693 default
11694 exit
11695 value
11696 of
11697 0
11698 (zero)
11699 is
11700 used
11701 if
11702 no
11703 value
11704 is
11705 spec‐
11706 i‐
11707 fied.
11708
11709
11710 Export(vars)
11711
11712 env.Export(vars)
11713 This
11714 tells
11715 scons
11716 to
11717 export
11718 a
11719 list
11720 of
11721 vari‐
11722 ables
11723 from
11724 the
11725 cur‐
11726 rent
11727 SCon‐
11728 script
11729 file
11730 to
11731 all
11732 other
11733 SCon‐
11734 script
11735 files.
11736 The
11737 exported
11738 vari‐
11739 ables
11740 are
11741 kept
11742 in
11743 a
11744 global
11745 col‐
11746 lec‐
11747 tion,
11748 so
11749 sub‐
11750 se‐
11751 quent
11752 calls
11753 to
11754 Export()
11755 will
11756 over-
11757 write
11758 pre‐
11759 vi‐
11760 ous
11761 exports
11762 that
11763 have
11764 the
11765 same
11766 name.
11767 Mul‐
11768 ti‐
11769 ple
11770 vari‐
11771 able
11772 names
11773 can
11774 be
11775 passed
11776 to
11777 Export()
11778 as
11779 sep‐
11780 a‐
11781 rate
11782 argu‐
11783 ments
11784 or
11785 as
11786 a
11787 list.
11788 A
11789 dic‐
11790 tio‐
11791 nary
11792 can
11793 be
11794 used
11795 to
11796 map
11797 vari‐
11798 ables
11799 to
11800 a
11801 dif‐
11802 fer‐
11803 ent
11804 name
11805 when
11806 exported.
11807 Both
11808 local
11809 vari‐
11810 ables
11811 and
11812 global
11813 vari‐
11814 ables
11815 can
11816 be
11817 exported.
11818
11819 Exam‐
11820 ples:
11821
11822 env = Environment()
11823 # Make env available for all SConscript files to Import().
11824 Export("env")
11825
11826 package = 'my_name'
11827 # Make env and package available for all SConscript files:.
11828 Export("env", "package")
11829
11830 # Make env and package available for all SConscript files:
11831 Export(["env", "package"])
11832
11833 # Make env available using the name debug:.
11834 Export({"debug":env})
11835
11836
11837 Note
11838 that
11839 the
11840 SCon‐
11841 script()
11842 func‐
11843 tion
11844 sup‐
11845 ports
11846 an
11847 exports
11848 argu‐
11849 ment
11850 that
11851 makes
11852 it
11853 eas‐
11854 ier
11855 to
11856 to
11857 export
11858 a
11859 vari‐
11860 able
11861 or
11862 set
11863 of
11864 vari‐
11865 ables
11866 to
11867 a
11868 sin‐
11869 gle
11870 SCon‐
11871 script
11872 file.
11873 See
11874 the
11875 descrip‐
11876 tion
11877 of
11878 the
11879 SCon‐
11880 script()
11881 func‐
11882 tion,
11883 below.
11884
11885
11886 File(name,
11887 [direc‐
11888 tory])
11889
11890 env.File(name,
11891 [direc‐
11892 tory])
11893 This
11894 returns
11895 a
11896 File
11897 Node,
11898 an
11899 object
11900 that
11901 rep‐
11902 re‐
11903 sents
11904 the
11905 spec‐
11906 i‐
11907 fied
11908 file
11909 name.
11910 name
11911 can
11912 be
11913 a
11914 rel‐
11915 a‐
11916 tive
11917 or
11918 abso‐
11919 lute
11920 path.
11921 direc‐
11922 tory
11923 is
11924 an
11925 optional
11926 direc‐
11927 tory
11928 that
11929 will
11930 be
11931 used
11932 as
11933 the
11934 par‐
11935 ent
11936 direc‐
11937 tory.
11938
11939 If
11940 name
11941 is
11942 a
11943 list,
11944 SCons
11945 returns
11946 a
11947 list
11948 of
11949 File
11950 nodes.
11951 Con‐
11952 struc‐
11953 tion
11954 vari‐
11955 ables
11956 are
11957 expanded
11958 in
11959 name.
11960
11961 File
11962 Nodes
11963 can
11964 be
11965 used
11966 any‐
11967 where
11968 you
11969 would
11970 sup‐
11971 ply
11972 a
11973 string
11974 as
11975 a
11976 file
11977 name
11978 to
11979 a
11980 Builder
11981 method
11982 or
11983 func‐
11984 tion.
11985 File
11986 Nodes
11987 have
11988 attributes
11989 and
11990 meth‐
11991 ods
11992 that
11993 are
11994 use‐
11995 ful
11996 in
11997 many
11998 sit‐
11999 u‐
12000 a‐
12001 tions;
12002 see
12003 "File
12004 and
12005 Direc‐
12006 tory
12007 Nodes,"
12008 below.
12009
12010
12011 Find‐
12012 File(file,
12013 dirs)
12014
12015 env.Find‐
12016 File(file,
12017 dirs)
12018 Search
12019 for
12020 file
12021 in
12022 the
12023 path
12024 spec‐
12025 i‐
12026 fied
12027 by
12028 dirs.
12029 file
12030 may
12031 be
12032 a
12033 list
12034 of
12035 file
12036 names
12037 or
12038 a
12039 sin‐
12040 gle
12041 file
12042 name.
12043 In
12044 addi‐
12045 tion
12046 to
12047 search‐
12048 ing
12049 for
12050 files
12051 that
12052 exist
12053 in
12054 the
12055 filesytem,
12056 this
12057 func‐
12058 tion
12059 also
12060 searches
12061 for
12062 derived
12063 files
12064 that
12065 have
12066 not
12067 yet
12068 been
12069 built.
12070
12071 Exam‐
12072 ple:
12073
12074 foo = env.FindFile('foo', ['dir1', 'dir2'])
12075
12076
12077 Find‐
12078 In‐
12079 stalled‐
12080 Files()
12081
12082 env.Find‐
12083 In‐
12084 stalled‐
12085 Files()
12086 Returns
12087 the
12088 list
12089 of
12090 tar‐
12091 gets
12092 set
12093 up
12094 by
12095 the
12096 Install()
12097 or
12098 Instal‐
12099 lAs()
12100 builders.
12101
12102 This
12103 func‐
12104 tion
12105 serves
12106 as
12107 a
12108 con‐
12109 ve‐
12110 nient
12111 method
12112 to
12113 select
12114 the
12115 con‐
12116 tents
12117 of
12118 a
12119 binary
12120 pack‐
12121 age.
12122
12123 Exam‐
12124 ple:
12125
12126 Install( '/bin', [ 'executable_a', 'executable_b' ] )
12127
12128 # will return the file node list
12129 # [ '/bin/executable_a', '/bin/executable_b' ]
12130 FindInstalledFiles()
12131
12132 Install( '/lib', [ 'some_library' ] )
12133
12134 # will return the file node list
12135 # [ '/bin/executable_a', '/bin/executable_b', '/lib/some_library' ]
12136 FindInstalledFiles()
12137
12138
12139 Find‐
12140 Source‐
12141 Files(node='"."')
12142
12143 env.Find‐
12144 Source‐
12145 Files(node='"."')
12146
12147 Returns
12148 the
12149 list
12150 of
12151 nodes
12152 which
12153 serve
12154 as
12155 the
12156 source
12157 of
12158 the
12159 built
12160 files.
12161 It
12162 does
12163 so
12164 by
12165 inspect‐
12166 ing
12167 the
12168 depen‐
12169 dency
12170 tree
12171 start‐
12172 ing
12173 at
12174 the
12175 optional
12176 argu‐
12177 ment
12178 node
12179 which
12180 defaults
12181 to
12182 the
12183 '"."'-node.
12184 It
12185 will
12186 then
12187 return
12188 all
12189 leaves
12190 of
12191 node.
12192 These
12193 are
12194 all
12195 chil‐
12196 dren
12197 which
12198 have
12199 no
12200 fur‐
12201 ther
12202 chil‐
12203 dren.
12204
12205 This
12206 func‐
12207 tion
12208 is
12209 a
12210 con‐
12211 ve‐
12212 nient
12213 method
12214 to
12215 select
12216 the
12217 con‐
12218 tents
12219 of
12220 a
12221 Source
12222 Pack‐
12223 age.
12224
12225 Exam‐
12226 ple:
12227
12228 Program( 'src/main_a.c' )
12229 Program( 'src/main_b.c' )
12230 Program( 'main_c.c' )
12231
12232 # returns ['main_c.c', 'src/main_a.c', 'SConstruct', 'src/main_b.c']
12233 FindSourceFiles()
12234
12235 # returns ['src/main_b.c', 'src/main_a.c' ]
12236 FindSourceFiles( 'src' )
12237
12238
12239 As
12240 you
12241 can
12242 see
12243 build
12244 sup‐
12245 port
12246 files
12247 (SCon‐
12248 struct
12249 in
12250 the
12251 above
12252 exam‐
12253 ple)
12254 will
12255 also
12256 be
12257 returned
12258 by
12259 this
12260 func‐
12261 tion.
12262
12263
12264 Find‐
12265 PathDirs(vari‐
12266 able)
12267 Returns
12268 a
12269 func‐
12270 tion
12271 (actu‐
12272 ally
12273 a
12274 callable
12275 Python
12276 object)
12277 intended
12278 to
12279 be
12280 used
12281 as
12282 the
12283 path_func‐
12284 tion
12285 of
12286 a
12287 Scan‐
12288 ner
12289 object.
12290 The
12291 returned
12292 object
12293 will
12294 look
12295 up
12296 the
12297 spec‐
12298 i‐
12299 fied
12300 vari‐
12301 able
12302 in
12303 a
12304 con‐
12305 struc‐
12306 tion
12307 envi‐
12308 ron‐
12309 ment
12310 and
12311 treat
12312 the
12313 con‐
12314 struc‐
12315 tion
12316 vari‐
12317 able's
12318 value
12319 as
12320 a
12321 list
12322 of
12323 direc‐
12324 tory
12325 paths
12326 that
12327 should
12328 be
12329 searched
12330 (like
12331 CPP‐
12332 PATH,
12333 LIB‐
12334 PATH,
12335 etc.).
12336
12337 Note
12338 that
12339 use
12340 of
12341 Find‐
12342 PathDirs()
12343 is
12344 gen‐
12345 er‐
12346 ally
12347 prefer‐
12348 able
12349 to
12350 writ‐
12351 ing
12352 your
12353 own
12354 path_func‐
12355 tion
12356 for
12357 the
12358 fol‐
12359 low‐
12360 ing
12361 rea‐
12362 sons:
12363 1)
12364 The
12365 returned
12366 list
12367 will
12368 con‐
12369 tain
12370 all
12371 appro‐
12372 pri‐
12373 ate
12374 direc‐
12375 to‐
12376 ries
12377 found
12378 in
12379 source
12380 trees
12381 (when
12382 Vari‐
12383 ant‐
12384 Dir()
12385 is
12386 used)
12387 or
12388 in
12389 code
12390 repos‐
12391 i‐
12392 to‐
12393 ries
12394 (when
12395 Repos‐
12396 i‐
12397 tory()
12398 or
12399 the
12400 -Y
12401 option
12402 are
12403 used).
12404 2)
12405 scons
12406 will
12407 iden‐
12408 tify
12409 expan‐
12410 sions
12411 of
12412 vari‐
12413 able
12414 that
12415 eval‐
12416 u‐
12417 ate
12418 to
12419 the
12420 same
12421 list
12422 of
12423 direc‐
12424 to‐
12425 ries
12426 as,
12427 in
12428 fact,
12429 the
12430 same
12431 list,
12432 and
12433 avoid
12434 re-
12435 scan‐
12436 ning
12437 the
12438 direc‐
12439 to‐
12440 ries
12441 for
12442 files,
12443 when
12444 pos‐
12445 si‐
12446 ble.
12447
12448 Exam‐
12449 ple:
12450
12451 def my_scan(node, env, path, arg):
12452 # Code to scan file contents goes here...
12453 return include_files
12454
12455 scanner = Scanner(name = 'myscanner',
12456 function = my_scan,
12457 path_function = FindPathDirs('MYPATH'))
12458
12459
12460 Flat‐
12461 ten(sequence)
12462
12463 env.Flat‐
12464 ten(sequence)
12465 Takes
12466 a
12467 sequence
12468 (that
12469 is,
12470 a
12471 Python
12472 list
12473 or
12474 tuple)
12475 that
12476 may
12477 con‐
12478 tain
12479 nested
12480 sequences
12481 and
12482 returns
12483 a
12484 flat‐
12485 tened
12486 list
12487 con‐
12488 tain‐
12489 ing
12490 all
12491 of
12492 the
12493 indi‐
12494 vid‐
12495 ual
12496 ele‐
12497 ments
12498 in
12499 any
12500 sequence.
12501 This
12502 can
12503 be
12504 help‐
12505 ful
12506 for
12507 col‐
12508 lect‐
12509 ing
12510 the
12511 lists
12512 returned
12513 by
12514 calls
12515 to
12516 Builders;
12517 other
12518 Builders
12519 will
12520 auto‐
12521 mat‐
12522 i‐
12523 cally
12524 flat‐
12525 ten
12526 lists
12527 spec‐
12528 i‐
12529 fied
12530 as
12531 input,
12532 but
12533 direct
12534 Python
12535 manip‐
12536 u‐
12537 la‐
12538 tion
12539 of
12540 these
12541 lists
12542 does
12543 not.
12544
12545 Exam‐
12546 ples:
12547
12548 foo = Object('foo.c')
12549 bar = Object('bar.c')
12550
12551 # Because `foo' and `bar' are lists returned by the Object() Builder,
12552 # `objects' will be a list containing nested lists:
12553 objects = ['f1.o', foo, 'f2.o', bar, 'f3.o']
12554
12555 # Passing such a list to another Builder is all right because
12556 # the Builder will flatten the list automatically:
12557 Program(source = objects)
12558
12559 # If you need to manipulate the list directly using Python, you need to
12560 # call Flatten() yourself, or otherwise handle nested lists:
12561 for object in Flatten(objects):
12562 print str(object)
12563
12564
12565 Get‐
12566 Build‐
12567 Fail‐
12568 ures()
12569 Returns
12570 a
12571 list
12572 of
12573 excep‐
12574 tions
12575 for
12576 the
12577 actions
12578 that
12579 failed
12580 while
12581 attempt‐
12582 ing
12583 to
12584 build
12585 tar‐
12586 gets.
12587 Each
12588 ele‐
12589 ment
12590 in
12591 the
12592 returned
12593 list
12594 is
12595 a
12596 BuildEr‐
12597 ror
12598 object
12599 with
12600 the
12601 fol‐
12602 low‐
12603 ing
12604 attributes
12605 that
12606 record
12607 var‐
12608 i‐
12609 ous
12610 aspects
12611 of
12612 the
12613 build
12614 fail‐
12615 ure:
12616
12617 .node
12618 The
12619 node
12620 that
12621 was
12622 being
12623 built
12624 when
12625 the
12626 build
12627 fail‐
12628 ure
12629 occurred.
12630
12631 .sta‐
12632 tus
12633 The
12634 numeric
12635 exit
12636 sta‐
12637 tus
12638 returned
12639 by
12640 the
12641 com‐
12642 mand
12643 or
12644 Python
12645 func‐
12646 tion
12647 that
12648 failed
12649 when
12650 try‐
12651 ing
12652 to
12653 build
12654 the
12655 spec‐
12656 i‐
12657 fied
12658 Node.
12659
12660 .errstr
12661 The
12662 SCons
12663 error
12664 string
12665 describ‐
12666 ing
12667 the
12668 build
12669 fail‐
12670 ure.
12671 (This
12672 is
12673 often
12674 a
12675 generic
12676 mes‐
12677 sage
12678 like
12679 "Error
12680 2"
12681 to
12682 indi‐
12683 cate
12684 that
12685 an
12686 exe‐
12687 cuted
12688 com‐
12689 mand
12690 exited
12691 with
12692 a
12693 sta‐
12694 tus
12695 of
12696 2.)
12697
12698 .file‐
12699 name
12700 The
12701 name
12702 of
12703 the
12704 file
12705 or
12706 direc‐
12707 tory
12708 that
12709 actu‐
12710 ally
12711 caused
12712 the
12713 fail‐
12714 ure.
12715 This
12716 may
12717 be
12718 dif‐
12719 fer‐
12720 ent
12721 from
12722 the
12723 .node
12724 attribute.
12725 For
12726 exam‐
12727 ple,
12728 if
12729 an
12730 attempt
12731 to
12732 build
12733 a
12734 tar‐
12735 get
12736 named
12737 sub/dir/tar‐
12738 get
12739 fails
12740 because
12741 the
12742 sub/dir
12743 direc‐
12744 tory
12745 could
12746 not
12747 be
12748 cre‐
12749 ated,
12750 then
12751 the
12752 .node
12753 attribute
12754 will
12755 be
12756 sub/dir/tar‐
12757 get
12758 but
12759 the
12760 .file‐
12761 name
12762 attribute
12763 will
12764 be
12765 sub/dir.
12766
12767 .execu‐
12768 tor
12769 The
12770 SCons
12771 Execu‐
12772 tor
12773 object
12774 for
12775 the
12776 tar‐
12777 get
12778 Node
12779 being
12780 built.
12781 This
12782 can
12783 be
12784 used
12785 to
12786 retrieve
12787 the
12788 con‐
12789 struc‐
12790 tion
12791 envi‐
12792 ron‐
12793 ment
12794 used
12795 for
12796 the
12797 failed
12798 action.
12799
12800 .action
12801 The
12802 actual
12803 SCons
12804 Action
12805 object
12806 that
12807 failed.
12808 This
12809 will
12810 be
12811 one
12812 spe‐
12813 cific
12814 action
12815 out
12816 of
12817 the
12818 pos‐
12819 si‐
12820 ble
12821 list
12822 of
12823 actions
12824 that
12825 would
12826 have
12827 been
12828 exe‐
12829 cuted
12830 to
12831 build
12832 the
12833 tar‐
12834 get.
12835
12836 .com‐
12837 mand
12838 The
12839 actual
12840 expanded
12841 com‐
12842 mand
12843 that
12844 was
12845 exe‐
12846 cuted
12847 and
12848 failed,
12849 after
12850 expan‐
12851 sion
12852 of
12853 $TAR‐
12854 GET,
12855 $SOURCE,
12856 and
12857 other
12858 con‐
12859 struc‐
12860 tion
12861 vari‐
12862 ables.
12863
12864 Note
12865 that
12866 the
12867 Get‐
12868 Build‐
12869 Fail‐
12870 ures()
12871 func‐
12872 tion
12873 will
12874 always
12875 return
12876 an
12877 empty
12878 list
12879 until
12880 any
12881 build
12882 fail‐
12883 ure
12884 has
12885 occurred,
12886 which
12887 means
12888 that
12889 Get‐
12890 Build‐
12891 Fail‐
12892 ures()
12893 will
12894 always
12895 return
12896 an
12897 empty
12898 list
12899 while
12900 the
12901 SCon‐
12902 script
12903 files
12904 are
12905 being
12906 read.
12907 Its
12908 pri‐
12909 mary
12910 intended
12911 use
12912 is
12913 for
12914 func‐
12915 tions
12916 that
12917 will
12918 be
12919 exe‐
12920 cuted
12921 before
12922 SCons
12923 exits
12924 by
12925 pass‐
12926 ing
12927 them
12928 to
12929 the
12930 stan‐
12931 dard
12932 Python
12933 atexit.reg‐
12934 is‐
12935 ter()
12936 func‐
12937 tion.
12938 Exam‐
12939 ple:
12940
12941 import atexit
12942
12943 def print_build_failures():
12944 from SCons.Script import GetBuildFailures
12945 for bf in GetBuildFailures():
12946 print "%s failed: %s" % (bf.node, bf.errstr)
12947
12948 atexit.register(print_build_failures)
12949
12950
12951 Get‐
12952 Build‐
12953 Path(file,
12954 [...])
12955
12956 env.Get‐
12957 Build‐
12958 Path(file,
12959 [...])
12960 Returns
12961 the
12962 scons
12963 path
12964 name
12965 (or
12966 names)
12967 for
12968 the
12969 spec‐
12970 i‐
12971 fied
12972 file
12973 (or
12974 files).
12975 The
12976 spec‐
12977 i‐
12978 fied
12979 file
12980 or
12981 files
12982 may
12983 be
12984 scons
12985 Nodes
12986 or
12987 strings
12988 rep‐
12989 re‐
12990 sent‐
12991 ing
12992 path
12993 names.
12994
12995
12996 Get‐
12997 LaunchDir()
12998
12999 env.Get‐
13000 LaunchDir()
13001 Returns
13002 the
13003 abso‐
13004 lute
13005 path
13006 name
13007 of
13008 the
13009 direc‐
13010 tory
13011 from
13012 which
13013 scons
13014 was
13015 ini‐
13016 tially
13017 invoked.
13018 This
13019 can
13020 be
13021 use‐
13022 ful
13023 when
13024 using
13025 the
13026 -u,
13027 -U
13028 or
13029 -D
13030 options,
13031 which
13032 inter‐
13033 nally
13034 change
13035 to
13036 the
13037 direc‐
13038 tory
13039 in
13040 which
13041 the
13042 SCon‐
13043 struct
13044 file
13045 is
13046 found.
13047
13048
13049 GetOp‐
13050 tion(name)
13051
13052 env.GetOp‐
13053 tion(name)
13054 This
13055 func‐
13056 tion
13057 pro‐
13058 vides
13059 a
13060 way
13061 to
13062 query
13063 the
13064 value
13065 of
13066 SCons
13067 options
13068 set
13069 on
13070 scons
13071 com‐
13072 mand
13073 line
13074 (or
13075 set
13076 using
13077 the
13078 SetOp‐
13079 tion()
13080 func‐
13081 tion).
13082 The
13083 options
13084 sup‐
13085 ported
13086 are:
13087
13088
13089 cache_debug
13090
13091 which
13092 cor‐
13093 re‐
13094 sponds
13095 to
13096 --cache-
13097 debug;
13098
13099 cache_dis‐
13100 able
13101 which
13102 cor‐
13103 re‐
13104 sponds
13105 to
13106 --cache-
13107 dis‐
13108 able;
13109
13110 cache_force
13111 which
13112 cor‐
13113 re‐
13114 sponds
13115 to
13116 --cache-
13117 force;
13118
13119 cache_show
13120 which
13121 cor‐
13122 re‐
13123 sponds
13124 to
13125 --cache-
13126 show;
13127
13128 clean which
13129 cor‐
13130 re‐
13131 sponds
13132 to
13133 -c,
13134 --clean
13135 and
13136 --remove;
13137
13138 con‐
13139 fig which
13140 cor‐
13141 re‐
13142 sponds
13143 to
13144 --con‐
13145 fig;
13146
13147 direc‐
13148 tory
13149 which
13150 cor‐
13151 re‐
13152 sponds
13153 to
13154 -C
13155 and
13156 --direc‐
13157 tory;
13158
13159 diskcheck
13160 which
13161 cor‐
13162 re‐
13163 sponds
13164 to
13165 --diskcheck
13166
13167 dupli‐
13168 cate
13169 which
13170 cor‐
13171 re‐
13172 sponds
13173 to
13174 --dupli‐
13175 cate;
13176
13177 file which
13178 cor‐
13179 re‐
13180 sponds
13181 to
13182 -f,
13183 --file,
13184 --make‐
13185 file
13186 and
13187 --scon‐
13188 struct;
13189
13190 help which
13191 cor‐
13192 re‐
13193 sponds
13194 to
13195 -h
13196 and
13197 --help;
13198
13199 ignore_errors
13200 which
13201 cor‐
13202 re‐
13203 sponds
13204 to
13205 --ignore-
13206 errors;
13207
13208 implicit_cache
13209 which
13210 cor‐
13211 re‐
13212 sponds
13213 to
13214 --implicit-
13215 cache;
13216
13217 implicit_deps_changed
13218 which
13219 cor‐
13220 re‐
13221 sponds
13222 to
13223 --implicit-
13224 deps-
13225 changed;
13226
13227 implicit_deps_unchanged
13228 which
13229 cor‐
13230 re‐
13231 sponds
13232 to
13233 --implicit-
13234 deps-
13235 unchanged;
13236
13237 inter‐
13238 ac‐
13239 tive
13240 which
13241 cor‐
13242 re‐
13243 sponds
13244 to
13245 --inter‐
13246 act
13247 and
13248 --inter‐
13249 ac‐
13250 tive;
13251
13252 keep_going
13253 which
13254 cor‐
13255 re‐
13256 sponds
13257 to
13258 -k
13259 and
13260 --keep-
13261 going;
13262
13263 max_drift
13264 which
13265 cor‐
13266 re‐
13267 sponds
13268 to
13269 --max-
13270 drift;
13271
13272 no_exec
13273 which
13274 cor‐
13275 re‐
13276 sponds
13277 to
13278 -n,
13279 --no-
13280 exec,
13281 --just-
13282 print,
13283 --dry-
13284 run
13285 and
13286 --recon;
13287
13288 no_site_dir
13289 which
13290 cor‐
13291 re‐
13292 sponds
13293 to
13294 --no-
13295 site-
13296 dir;
13297
13298 num_jobs
13299 which
13300 cor‐
13301 re‐
13302 sponds
13303 to
13304 -j
13305 and
13306 --jobs;
13307
13308 pro‐
13309 file_file
13310 which
13311 cor‐
13312 re‐
13313 sponds
13314 to
13315 --pro‐
13316 file;
13317
13318 ques‐
13319 tion which
13320 cor‐
13321 re‐
13322 sponds
13323 to
13324 -q
13325 and
13326 --ques‐
13327 tion;
13328
13329 ran‐
13330 dom which
13331 cor‐
13332 re‐
13333 sponds
13334 to
13335 --ran‐
13336 dom;
13337
13338 repos‐
13339 i‐
13340 tory
13341 which
13342 cor‐
13343 re‐
13344 sponds
13345 to
13346 -Y,
13347 --repos‐
13348 i‐
13349 tory
13350 and
13351 --srcdir;
13352
13353 silent
13354 which
13355 cor‐
13356 re‐
13357 sponds
13358 to
13359 -s,
13360 --silent
13361 and
13362 --quiet;
13363
13364 site_dir
13365 which
13366 cor‐
13367 re‐
13368 sponds
13369 to
13370 --site-
13371 dir;
13372
13373 stack_size
13374 which
13375 cor‐
13376 re‐
13377 sponds
13378 to
13379 --stack-
13380 size;
13381
13382 taskmas‐
13383 ter‐
13384 trace_file
13385 which
13386 cor‐
13387 re‐
13388 sponds
13389 to
13390 --taskmas‐
13391 ter‐
13392 trace;
13393 and
13394
13395 warn which
13396 cor‐
13397 re‐
13398 sponds
13399 to
13400 --warn
13401 and
13402 --warn‐
13403 ing.
13404
13405
13406 See
13407 the
13408 doc‐
13409 u‐
13410 men‐
13411 ta‐
13412 tion
13413 for
13414 the
13415 cor‐
13416 re‐
13417 spond‐
13418 ing
13419 com‐
13420 mand
13421 line
13422 object
13423 for
13424 infor‐
13425 ma‐
13426 tion
13427 about
13428 each
13429 spe‐
13430 cific
13431 option.
13432
13433
13434 Glob(pat‐
13435 tern,
13436 [ondisk,
13437 source,
13438 strings])
13439
13440 env.Glob(pat‐
13441 tern,
13442 [ondisk,
13443 source,
13444 strings])
13445 Returns
13446 Nodes
13447 (or
13448 strings)
13449 that
13450 match
13451 the
13452 spec‐
13453 i‐
13454 fied
13455 pat‐
13456 tern,
13457 rel‐
13458 a‐
13459 tive
13460 to
13461 the
13462 direc‐
13463 tory
13464 of
13465 the
13466 cur‐
13467 rent
13468 SCon‐
13469 script
13470 file.
13471 The
13472 env.Glob()
13473 form
13474 per‐
13475 forms
13476 string
13477 sub‐
13478 sti‐
13479 tion
13480 on
13481 pat‐
13482 tern
13483 and
13484 returns
13485 what‐
13486 ever
13487 matches
13488 the
13489 result‐
13490 ing
13491 expanded
13492 pat‐
13493 tern.
13494
13495 The
13496 spec‐
13497 i‐
13498 fied
13499 pat‐
13500 tern
13501 uses
13502 Unix
13503 shell
13504 style
13505 metachar‐
13506 ac‐
13507 ters
13508 for
13509 match‐
13510 ing:
13511
13512 * matches everything
13513 ? matches any single character
13514 [seq] matches any character in seq
13515 [!seq] matches any char not in seq
13516
13517
13518 Char‐
13519 ac‐
13520 ter
13521 matches
13522 do
13523 not
13524 span
13525 direc‐
13526 tory
13527 sep‐
13528 a‐
13529 ra‐
13530 tors.
13531
13532 The
13533 Glob()
13534 knows
13535 about
13536 repos‐
13537 i‐
13538 to‐
13539 ries
13540 (see
13541 the
13542 Repos‐
13543 i‐
13544 tory()
13545 func‐
13546 tion)
13547 and
13548 source
13549 direc‐
13550 to‐
13551 ries
13552 (see
13553 the
13554 Vari‐
13555 ant‐
13556 Dir()
13557 func‐
13558 tion)
13559 and
13560 returns
13561 a
13562 Node
13563 (or
13564 string,
13565 if
13566 so
13567 con‐
13568 fig‐
13569 ured)
13570 in
13571 the
13572 local
13573 (SCon‐
13574 script)
13575 direc‐
13576 tory
13577 if
13578 match‐
13579 ing
13580 Node
13581 is
13582 found
13583 any‐
13584 where
13585 in
13586 a
13587 cor‐
13588 re‐
13589 spond‐
13590 ing
13591 repos‐
13592 i‐
13593 tory
13594 or
13595 source
13596 direc‐
13597 tory.
13598
13599 The
13600 ondisk
13601 argu‐
13602 ment
13603 may
13604 be
13605 set
13606 to
13607 False
13608 (or
13609 any
13610 other
13611 non-
13612 true
13613 value)
13614 to
13615 dis‐
13616 able
13617 the
13618 search
13619 for
13620 matches
13621 on
13622 disk,
13623 thereby
13624 only
13625 return‐
13626 ing
13627 matches
13628 among
13629 already-
13630 con‐
13631 fig‐
13632 ured
13633 File
13634 or
13635 Dir
13636 Nodes.
13637 The
13638 default
13639 behav‐
13640 ior
13641 is
13642 to
13643 return
13644 cor‐
13645 re‐
13646 spond‐
13647 ing
13648 Nodes
13649 for
13650 any
13651 on-
13652 disk
13653 matches
13654 found.
13655
13656 The
13657 source
13658 argu‐
13659 ment
13660 may
13661 be
13662 set
13663 to
13664 True
13665 (or
13666 any
13667 equiv‐
13668 a‐
13669 lent
13670 value)
13671 to
13672 spec‐
13673 ify
13674 that,
13675 when
13676 the
13677 local
13678 direc‐
13679 tory
13680 is
13681 a
13682 Vari‐
13683 ant‐
13684 Dir(),
13685 the
13686 returned
13687 Nodes
13688 should
13689 be
13690 from
13691 the
13692 cor‐
13693 re‐
13694 spond‐
13695 ing
13696 source
13697 direc‐
13698 tory,
13699 not
13700 the
13701 local
13702 direc‐
13703 tory.
13704
13705 The
13706 strings
13707 argu‐
13708 ment
13709 may
13710 be
13711 set
13712 to
13713 True
13714 (or
13715 any
13716 equiv‐
13717 a‐
13718 lent
13719 value)
13720 to
13721 have
13722 the
13723 Glob()
13724 func‐
13725 tion
13726 return
13727 strings,
13728 not
13729 Nodes,
13730 that
13731 rep‐
13732 re‐
13733 sent
13734 the
13735 matched
13736 files
13737 or
13738 direc‐
13739 to‐
13740 ries.
13741 The
13742 returned
13743 strings
13744 will
13745 be
13746 rel‐
13747 a‐
13748 tive
13749 to
13750 the
13751 local
13752 (SCon‐
13753 script)
13754 direc‐
13755 tory.
13756 (Note
13757 that
13758 This
13759 may
13760 make
13761 it
13762 eas‐
13763 ier
13764 to
13765 per‐
13766 form
13767 arbi‐
13768 trary
13769 manip‐
13770 u‐
13771 la‐
13772 tion
13773 of
13774 file
13775 names,
13776 but
13777 if
13778 the
13779 returned
13780 strings
13781 are
13782 passed
13783 to
13784 a
13785 dif‐
13786 fer‐
13787 ent
13788 SCon‐
13789 script
13790 file,
13791 any
13792 Node
13793 trans‐
13794 la‐
13795 tion
13796 will
13797 be
13798 rel‐
13799 a‐
13800 tive
13801 to
13802 the
13803 other
13804 SCon‐
13805 script
13806 direc‐
13807 tory,
13808 not
13809 the
13810 orig‐
13811 i‐
13812 nal
13813 SCon‐
13814 script
13815 direc‐
13816 tory.)
13817
13818 Exam‐
13819 ple:
13820
13821 Program('foo', Glob('*.c'))
13822
13823
13824
13825 Help(text)
13826
13827 env.Help(text)
13828 This
13829 spec‐
13830 i‐
13831 fies
13832 help
13833 text
13834 to
13835 be
13836 printed
13837 if
13838 the
13839 -h
13840 argu‐
13841 ment
13842 is
13843 given
13844 to
13845 scons.
13846 If
13847 Help
13848 is
13849 called
13850 mul‐
13851 ti‐
13852 ple
13853 times,
13854 the
13855 text
13856 is
13857 appended
13858 together
13859 in
13860 the
13861 order
13862 that
13863 Help
13864 is
13865 called.
13866
13867
13868 Ignore(tar‐
13869 get,
13870 depen‐
13871 dency)
13872
13873 env.Ignore(tar‐
13874 get,
13875 depen‐
13876 dency)
13877 The
13878 spec‐
13879 i‐
13880 fied
13881 depen‐
13882 dency
13883 file(s)
13884 will
13885 be
13886 ignored
13887 when
13888 decid‐
13889 ing
13890 if
13891 the
13892 tar‐
13893 get
13894 file(s)
13895 need
13896 to
13897 be
13898 rebuilt.
13899
13900 Exam‐
13901 ples:
13902
13903 env.Ignore('foo', 'foo.c')
13904 env.Ignore('bar', ['bar1.h', 'bar2.h'])
13905
13906
13907 Import(vars)
13908
13909 env.Import(vars)
13910 This
13911 tells
13912 scons
13913 to
13914 import
13915 a
13916 list
13917 of
13918 vari‐
13919 ables
13920 into
13921 the
13922 cur‐
13923 rent
13924 SCon‐
13925 script
13926 file.
13927 This
13928 will
13929 import
13930 vari‐
13931 ables
13932 that
13933 were
13934 exported
13935 with
13936 Export()
13937 or
13938 in
13939 the
13940 exports
13941 argu‐
13942 ment
13943 to
13944 SCon‐
13945 script().
13946 Vari‐
13947 ables
13948 exported
13949 by
13950 SCon‐
13951 script()
13952 have
13953 prece‐
13954 dence.
13955 Mul‐
13956 ti‐
13957 ple
13958 vari‐
13959 able
13960 names
13961 can
13962 be
13963 passed
13964 to
13965 Import()
13966 as
13967 sep‐
13968 a‐
13969 rate
13970 argu‐
13971 ments
13972 or
13973 as
13974 a
13975 list.
13976 The
13977 vari‐
13978 able
13979 "*"
13980 can
13981 be
13982 used
13983 to
13984 import
13985 all
13986 vari‐
13987 ables.
13988
13989 Exam‐
13990 ples:
13991
13992 Import("env")
13993 Import("env", "variable")
13994 Import(["env", "variable"])
13995 Import("*")
13996
13997
13998 Lit‐
13999 eral(string)
14000
14001 env.Lit‐
14002 eral(string)
14003 The
14004 spec‐
14005 i‐
14006 fied
14007 string
14008 will
14009 be
14010 pre‐
14011 served
14012 as-
14013 is
14014 and
14015 not
14016 have
14017 con‐
14018 struc‐
14019 tion
14020 vari‐
14021 ables
14022 expanded.
14023
14024
14025 Local(tar‐
14026 gets)
14027
14028 env.Local(tar‐
14029 gets)
14030 The
14031 spec‐
14032 i‐
14033 fied
14034 tar‐
14035 gets
14036 will
14037 have
14038 copies
14039 made
14040 in
14041 the
14042 local
14043 tree,
14044 even
14045 if
14046 an
14047 already
14048 up-
14049 to-
14050 date
14051 copy
14052 exists
14053 in
14054 a
14055 repos‐
14056 i‐
14057 tory.
14058 Returns
14059 a
14060 list
14061 of
14062 the
14063 tar‐
14064 get
14065 Node
14066 or
14067 Nodes.
14068
14069
14070 env.Merge‐
14071 Flags(arg,
14072 [unique])
14073 Merges
14074 the
14075 spec‐
14076 i‐
14077 fied
14078 arg
14079 val‐
14080 ues
14081 to
14082 the
14083 con‐
14084 struc‐
14085 tion
14086 envri‐
14087 on‐
14088 ment's
14089 con‐
14090 struc‐
14091 tion
14092 vari‐
14093 ables.
14094 If
14095 the
14096 arg
14097 argu‐
14098 ment
14099 is
14100 not
14101 a
14102 dic‐
14103 tio‐
14104 nary,
14105 it
14106 is
14107 con‐
14108 verted
14109 to
14110 one
14111 by
14112 call‐
14113 ing
14114 env.Parse‐
14115 Flags()
14116 on
14117 the
14118 argu‐
14119 ment
14120 before
14121 the
14122 val‐
14123 ues
14124 are
14125 merged.
14126 Note
14127 that
14128 arg
14129 must
14130 be
14131 a
14132 sin‐
14133 gle
14134 value,
14135 so
14136 mul‐
14137 ti‐
14138 ple
14139 strings
14140 must
14141 be
14142 passed
14143 in
14144 as
14145 a
14146 list,
14147 not
14148 as
14149 sep‐
14150 a‐
14151 rate
14152 argu‐
14153 ments
14154 to
14155 env.Merge‐
14156 Flags().
14157
14158 By
14159 default,
14160 dupli‐
14161 cate
14162 val‐
14163 ues
14164 are
14165 elim‐
14166 i‐
14167 nated;
14168 you
14169 can,
14170 how‐
14171 ever,
14172 spec‐
14173 ify
14174 unique=0
14175 to
14176 allow
14177 dupli‐
14178 cate
14179 val‐
14180 ues
14181 to
14182 be
14183 added.
14184 When
14185 elim‐
14186 i‐
14187 nat‐
14188 ing
14189 dupli‐
14190 cate
14191 val‐
14192 ues,
14193 any
14194 con‐
14195 struc‐
14196 tion
14197 vari‐
14198 ables
14199 that
14200 end
14201 with
14202 the
14203 string
14204 PATH
14205 keep
14206 the
14207 left-
14208 most
14209 unique
14210 value.
14211 All
14212 other
14213 con‐
14214 struc‐
14215 tion
14216 vari‐
14217 ables
14218 keep
14219 the
14220 right-
14221 most
14222 unique
14223 value.
14224
14225 Exam‐
14226 ples:
14227
14228 # Add an optimization flag to $CCFLAGS.
14229 env.MergeFlags('-O3')
14230
14231 # Combine the flags returned from running pkg-config with an optimization
14232 # flag and merge the result into the construction variables.
14233 env.MergeFlags(['!pkg-config gtk+-2.0 --cflags', '-O3'])
14234
14235 # Combine an optimization flag with the flags returned from running pkg-config
14236 # twice and merge the result into the construction variables.
14237 env.MergeFlags(['-O3',
14238 '!pkg-config gtk+-2.0 --cflags --libs',
14239 '!pkg-config libpng12 --cflags --libs'])
14240
14241
14242 NoCache(tar‐
14243 get,
14244 ...)
14245
14246 env.NoCache(tar‐
14247 get,
14248 ...)
14249 Spec‐
14250 i‐
14251 fies
14252 a
14253 list
14254 of
14255 files
14256 which
14257 should
14258 not
14259 be
14260 cached
14261 when‐
14262 ever
14263 the
14264 CacheDir()
14265 method
14266 has
14267 been
14268 acti‐
14269 vated.
14270 The
14271 spec‐
14272 i‐
14273 fied
14274 tar‐
14275 gets
14276 may
14277 be
14278 a
14279 list
14280 or
14281 an
14282 indi‐
14283 vid‐
14284 ual
14285 tar‐
14286 get.
14287
14288 Mul‐
14289 ti‐
14290 ple
14291 files
14292 should
14293 be
14294 spec‐
14295 i‐
14296 fied
14297 either
14298 as
14299 sep‐
14300 a‐
14301 rate
14302 argu‐
14303 ments
14304 to
14305 the
14306 NoCache()
14307 method,
14308 or
14309 as
14310 a
14311 list.
14312 NoCache()
14313 will
14314 also
14315 accept
14316 the
14317 return
14318 value
14319 of
14320 any
14321 of
14322 the
14323 con‐
14324 struc‐
14325 tion
14326 envi‐
14327 ron‐
14328 ment
14329 Builder
14330 meth‐
14331 ods.
14332
14333 Call‐
14334 ing
14335 NoCache()
14336 on
14337 direc‐
14338 to‐
14339 ries
14340 and
14341 other
14342 non-
14343 File
14344 Node
14345 types
14346 has
14347 no
14348 effect
14349 because
14350 only
14351 File
14352 Nodes
14353 are
14354 cached.
14355
14356 Exam‐
14357 ples:
14358
14359 NoCache('foo.elf')
14360 NoCache(env.Program('hello', 'hello.c'))
14361
14362
14363 NoClean(tar‐
14364 get,
14365 ...)
14366
14367 env.NoClean(tar‐
14368 get,
14369 ...)
14370 Spec‐
14371 i‐
14372 fies
14373 a
14374 list
14375 of
14376 files
14377 or
14378 direc‐
14379 to‐
14380 ries
14381 which
14382 should
14383 not
14384 be
14385 removed
14386 when‐
14387 ever
14388 the
14389 tar‐
14390 gets
14391 (or
14392 their
14393 depen‐
14394 den‐
14395 cies)
14396 are
14397 spec‐
14398 i‐
14399 fied
14400 with
14401 the
14402 -c
14403 com‐
14404 mand
14405 line
14406 option.
14407 The
14408 spec‐
14409 i‐
14410 fied
14411 tar‐
14412 gets
14413 may
14414 be
14415 a
14416 list
14417 or
14418 an
14419 indi‐
14420 vid‐
14421 ual
14422 tar‐
14423 get.
14424 Mul‐
14425 ti‐
14426 ple
14427 calls
14428 to
14429 NoClean()
14430 are
14431 legal,
14432 and
14433 pre‐
14434 vent
14435 each
14436 spec‐
14437 i‐
14438 fied
14439 tar‐
14440 get
14441 from
14442 being
14443 removed
14444 by
14445 calls
14446 to
14447 the
14448 -c
14449 option.
14450
14451 Mul‐
14452 ti‐
14453 ple
14454 files
14455 or
14456 direc‐
14457 to‐
14458 ries
14459 should
14460 be
14461 spec‐
14462 i‐
14463 fied
14464 either
14465 as
14466 sep‐
14467 a‐
14468 rate
14469 argu‐
14470 ments
14471 to
14472 the
14473 NoClean()
14474 method,
14475 or
14476 as
14477 a
14478 list.
14479 NoClean()
14480 will
14481 also
14482 accept
14483 the
14484 return
14485 value
14486 of
14487 any
14488 of
14489 the
14490 con‐
14491 struc‐
14492 tion
14493 envi‐
14494 ron‐
14495 ment
14496 Builder
14497 meth‐
14498 ods.
14499
14500 Call‐
14501 ing
14502 NoClean()
14503 for
14504 a
14505 tar‐
14506 get
14507 over‐
14508 rides
14509 call‐
14510 ing
14511 Clean()
14512 for
14513 the
14514 same
14515 tar‐
14516 get,
14517 and
14518 any
14519 tar‐
14520 gets
14521 passed
14522 to
14523 both
14524 func‐
14525 tions
14526 will
14527 not
14528 be
14529 removed
14530 by
14531 the
14532 -c
14533 option.
14534
14535 Exam‐
14536 ples:
14537
14538 NoClean('foo.elf')
14539 NoClean(env.Program('hello', 'hello.c'))
14540
14541
14542 env.Par‐
14543 seC‐
14544 on‐
14545 fig(com‐
14546 mand,
14547 [func‐
14548 tion,
14549 unique])
14550 Calls
14551 the
14552 spec‐
14553 i‐
14554 fied
14555 func‐
14556 tion
14557 to
14558 mod‐
14559 ify
14560 the
14561 envi‐
14562 ron‐
14563 ment
14564 as
14565 spec‐
14566 i‐
14567 fied
14568 by
14569 the
14570 out‐
14571 put
14572 of
14573 com‐
14574 mand
14575 .
14576 The
14577 default
14578 func‐
14579 tion
14580 is
14581 env.Merge‐
14582 Flags(),
14583 which
14584 expects
14585 the
14586 out‐
14587 put
14588 of
14589 a
14590 typ‐
14591 i‐
14592 cal
14593 *-con‐
14594 fig
14595 com‐
14596 mand
14597 (for
14598 exam‐
14599 ple,
14600 gtk-
14601 con‐
14602 fig)
14603 and
14604 adds
14605 the
14606 options
14607 to
14608 the
14609 appro‐
14610 pri‐
14611 ate
14612 con‐
14613 struc‐
14614 tion
14615 vari‐
14616 ables.
14617 By
14618 default,
14619 dupli‐
14620 cate
14621 val‐
14622 ues
14623 are
14624 not
14625 added
14626 to
14627 any
14628 con‐
14629 struc‐
14630 tion
14631 vari‐
14632 ables;
14633 you
14634 can
14635 spec‐
14636 ify
14637 unique=0
14638 to
14639 allow
14640 dupli‐
14641 cate
14642 val‐
14643 ues
14644 to
14645 be
14646 added.
14647
14648 Inter‐
14649 preted
14650 options
14651 and
14652 the
14653 con‐
14654 struc‐
14655 tion
14656 vari‐
14657 ables
14658 they
14659 affect
14660 are
14661 as
14662 spec‐
14663 i‐
14664 fied
14665 for
14666 the
14667 env.Parse‐
14668 Flags()
14669 method
14670 (which
14671 thie
14672 method
14673 calls).
14674 See
14675 that
14676 method's
14677 descrip‐
14678 tion,
14679 below,
14680 for
14681 a
14682 ta‐
14683 ble
14684 of
14685 options
14686 and
14687 con‐
14688 struc‐
14689 tion
14690 vari‐
14691 ables.
14692
14693
14694 ParseDe‐
14695 pends(file‐
14696 name,
14697 [must_exist,
14698 only_one])
14699
14700 env.ParseDe‐
14701 pends(file‐
14702 name,
14703 [must_exist,
14704 only_one])
14705 Parses
14706 the
14707 con‐
14708 tents
14709 of
14710 the
14711 spec‐
14712 i‐
14713 fied
14714 file‐
14715 name
14716 as
14717 a
14718 list
14719 of
14720 depen‐
14721 den‐
14722 cies
14723 in
14724 the
14725 style
14726 of
14727 Make
14728 or
14729 mkdep,
14730 and
14731 explic‐
14732 itly
14733 estab‐
14734 lishes
14735 all
14736 of
14737 the
14738 listed
14739 depen‐
14740 den‐
14741 cies.
14742
14743 By
14744 default,
14745 it
14746 is
14747 not
14748 an
14749 error
14750 if
14751 the
14752 spec‐
14753 i‐
14754 fied
14755 file‐
14756 name
14757 does
14758 not
14759 exist.
14760 The
14761 optional
14762 must_exist
14763 argu‐
14764 ment
14765 may
14766 be
14767 set
14768 to
14769 a
14770 non-
14771 zero
14772 value
14773 to
14774 have
14775 scons
14776 throw
14777 an
14778 excep‐
14779 tion
14780 and
14781 gen‐
14782 er‐
14783 ate
14784 an
14785 error
14786 if
14787 the
14788 file
14789 does
14790 not
14791 exist,
14792 or
14793 is
14794 oth‐
14795 er‐
14796 wise
14797 inac‐
14798 ces‐
14799 si‐
14800 ble.
14801
14802 The
14803 optional
14804 only_one
14805 argu‐
14806 ment
14807 may
14808 be
14809 set
14810 to
14811 a
14812 non-
14813 zero
14814 value
14815 to
14816 have
14817 scons
14818 thrown
14819 an
14820 excep‐
14821 tion
14822 and
14823 gen‐
14824 er‐
14825 ate
14826 an
14827 error
14828 if
14829 the
14830 file
14831 con‐
14832 tains
14833 depen‐
14834 dency
14835 infor‐
14836 ma‐
14837 tion
14838 for
14839 more
14840 than
14841 one
14842 tar‐
14843 get.
14844 This
14845 can
14846 pro‐
14847 vide
14848 a
14849 small
14850 san‐
14851 ity
14852 check
14853 for
14854 files
14855 intended
14856 to
14857 be
14858 gen‐
14859 er‐
14860 ated
14861 by,
14862 for
14863 exam‐
14864 ple,
14865 the
14866 gcc
14867 -M
14868 flag,
14869 which
14870 should
14871 typ‐
14872 i‐
14873 cally
14874 only
14875 write
14876 depen‐
14877 dency
14878 infor‐
14879 ma‐
14880 tion
14881 for
14882 one
14883 out‐
14884 put
14885 file
14886 into
14887 a
14888 cor‐
14889 re‐
14890 spond‐
14891 ing
14892 .d
14893 file.
14894
14895 The
14896 file‐
14897 name
14898 and
14899 all
14900 of
14901 the
14902 files
14903 listed
14904 therein
14905 will
14906 be
14907 inter‐
14908 preted
14909 rel‐
14910 a‐
14911 tive
14912 to
14913 the
14914 direc‐
14915 tory
14916 of
14917 the
14918 SCon‐
14919 script
14920 file
14921 which
14922 calls
14923 the
14924 ParseDe‐
14925 pends
14926 func‐
14927 tion.
14928
14929
14930 env.Parse‐
14931 Flags(flags,
14932 ...)
14933 Parses
14934 one
14935 or
14936 more
14937 strings
14938 con‐
14939 tain‐
14940 ing
14941 typ‐
14942 i‐
14943 cal
14944 com‐
14945 mand-
14946 line
14947 flags
14948 for
14949 GCC
14950 tool
14951 chains
14952 and
14953 returns
14954 a
14955 dic‐
14956 tio‐
14957 nary
14958 with
14959 the
14960 flag
14961 val‐
14962 ues
14963 sep‐
14964 a‐
14965 rated
14966 into
14967 the
14968 appro‐
14969 pri‐
14970 ate
14971 SCons
14972 con‐
14973 struc‐
14974 tion
14975 vari‐
14976 ables.
14977 This
14978 is
14979 intended
14980 as
14981 a
14982 com‐
14983 pan‐
14984 ion
14985 to
14986 the
14987 env.Merge‐
14988 Flags()
14989 method,
14990 but
14991 allows
14992 for
14993 the
14994 val‐
14995 ues
14996 in
14997 the
14998 returned
14999 dic‐
15000 tio‐
15001 nary
15002 to
15003 be
15004 mod‐
15005 i‐
15006 fied,
15007 if
15008 nec‐
15009 es‐
15010 sary,
15011 before
15012 merg‐
15013 ing
15014 them
15015 into
15016 the
15017 con‐
15018 struc‐
15019 tion
15020 envi‐
15021 ron‐
15022 ment.
15023 (Note
15024 that
15025 env.Merge‐
15026 Flags()
15027 will
15028 call
15029 this
15030 method
15031 if
15032 its
15033 argu‐
15034 ment
15035 is
15036 not
15037 a
15038 dic‐
15039 tio‐
15040 nary,
15041 so
15042 it
15043 is
15044 usu‐
15045 ally
15046 not
15047 nec‐
15048 es‐
15049 sary
15050 to
15051 call
15052 env.Parse‐
15053 Flags()
15054 directly
15055 unless
15056 you
15057 want
15058 to
15059 manip‐
15060 u‐
15061 late
15062 the
15063 val‐
15064 ues.)
15065
15066 If
15067 the
15068 first
15069 char‐
15070 ac‐
15071 ter
15072 in
15073 any
15074 string
15075 is
15076 an
15077 excla‐
15078 ma‐
15079 tion
15080 mark
15081 (!),
15082 the
15083 rest
15084 of
15085 the
15086 string
15087 is
15088 exe‐
15089 cuted
15090 as
15091 a
15092 com‐
15093 mand,
15094 and
15095 the
15096 out‐
15097 put
15098 from
15099 the
15100 com‐
15101 mand
15102 is
15103 parsed
15104 as
15105 GCC
15106 tool
15107 chain
15108 com‐
15109 mand-
15110 line
15111 flags
15112 and
15113 added
15114 to
15115 the
15116 result‐
15117 ing
15118 dic‐
15119 tio‐
15120 nary.
15121
15122 Flag
15123 val‐
15124 ues
15125 are
15126 trans‐
15127 lated
15128 accordig
15129 to
15130 the
15131 pre‐
15132 fix
15133 found,
15134 and
15135 added
15136 to
15137 the
15138 fol‐
15139 low‐
15140 ing
15141 con‐
15142 struc‐
15143 tion
15144 vari‐
15145 ables:
15146
15147 -arch CCFLAGS, LINKFLAGS
15148 -D CPPDEFINES
15149 -framework FRAMEWORKS
15150 -frameworkdir= FRAMEWORKPATH
15151 -include CCFLAGS
15152 -isysroot CCFLAGS, LINKFLAGS
15153 -I CPPPATH
15154 -l LIBS
15155 -L LIBPATH
15156 -mno-cygwin CCFLAGS, LINKFLAGS
15157 -mwindows LINKFLAGS
15158 -pthread CCFLAGS, LINKFLAGS
15159 -std= CFLAGS
15160 -Wa, ASFLAGS, CCFLAGS
15161 -Wl,-rpath= RPATH
15162 -Wl,-R, RPATH
15163 -Wl,-R RPATH
15164 -Wl, LINKFLAGS
15165 -Wp, CPPFLAGS
15166 - CCFLAGS
15167 + CCFLAGS, LINKFLAGS
15168
15169
15170 Any
15171 other
15172 strings
15173 not
15174 asso‐
15175 ci‐
15176 ated
15177 with
15178 options
15179 are
15180 assumed
15181 to
15182 be
15183 the
15184 names
15185 of
15186 libraries
15187 and
15188 added
15189 to
15190 the
15191 LIBS
15192 con‐
15193 struc‐
15194 tion
15195 vari‐
15196 able.
15197
15198 Exam‐
15199 ples
15200 (all
15201 of
15202 which
15203 pro‐
15204 duce
15205 the
15206 same
15207 result):
15208
15209 dict = env.ParseFlags('-O2 -Dfoo -Dbar=1')
15210 dict = env.ParseFlags('-O2', '-Dfoo', '-Dbar=1')
15211 dict = env.ParseFlags(['-O2', '-Dfoo -Dbar=1'])
15212 dict = env.ParseFlags('-O2', '!echo -Dfoo -Dbar=1')
15213
15214
15215 env.Per‐
15216 force()
15217 A
15218 fac‐
15219 tory
15220 func‐
15221 tion
15222 that
15223 returns
15224 a
15225 Builder
15226 object
15227 to
15228 be
15229 used
15230 to
15231 fetch
15232 source
15233 files
15234 from
15235 the
15236 Per‐
15237 force
15238 source
15239 code
15240 man‐
15241 age‐
15242 ment
15243 sys‐
15244 tem.
15245 The
15246 returned
15247 Builder
15248 is
15249 intended
15250 to
15251 be
15252 passed
15253 to
15254 the
15255 Source‐
15256 Code
15257 func‐
15258 tion.
15259
15260 Exam‐
15261 ple:
15262
15263 env.SourceCode('.', env.Perforce())
15264
15265 Per‐
15266 force
15267 uses
15268 a
15269 num‐
15270 ber
15271 of
15272 exter‐
15273 nal
15274 envi‐
15275 ron‐
15276 ment
15277 vari‐
15278 ables
15279 for
15280 its
15281 oper‐
15282 a‐
15283 tion.
15284 Con‐
15285 se‐
15286 quently,
15287 this
15288 func‐
15289 tion
15290 adds
15291 the
15292 fol‐
15293 low‐
15294 ing
15295 vari‐
15296 ables
15297 from
15298 the
15299 user's
15300 exter‐
15301 nal
15302 envi‐
15303 ron‐
15304 ment
15305 to
15306 the
15307 con‐
15308 struc‐
15309 tion
15310 envi‐
15311 ron‐
15312 ment's
15313 ENV
15314 dic‐
15315 tio‐
15316 nary:
15317 P4CHARSET,
15318 P4CLIENT,
15319 P4LAN‐
15320 GUAGE,
15321 P4PASSWD,
15322 P4PORT,
15323 P4USER,
15324 SYS‐
15325 TEM‐
15326 ROOT,
15327 USER,
15328 and
15329 USER‐
15330 NAME.
15331
15332
15333 Plat‐
15334 form(string)
15335 Returns
15336 a
15337 callable
15338 object
15339 that
15340 can
15341 be
15342 used
15343 to
15344 ini‐
15345 tial‐
15346 ize
15347 a
15348 con‐
15349 struc‐
15350 tion
15351 envi‐
15352 ron‐
15353 ment
15354 using
15355 the
15356 plat‐
15357 form
15358 key‐
15359 word
15360 of
15361 the
15362 Envi‐
15363 ron‐
15364 ment()
15365 method.
15366
15367 Exam‐
15368 ple:
15369
15370 env = Environment(platform = Platform('win32'))
15371
15372 env.Plat‐
15373 form(string)
15374 Applies
15375 the
15376 callable
15377 object
15378 for
15379 the
15380 spec‐
15381 i‐
15382 fied
15383 plat‐
15384 form
15385 string
15386 to
15387 the
15388 envi‐
15389 ron‐
15390 ment
15391 through
15392 which
15393 the
15394 method
15395 was
15396 called.
15397
15398 env.Platform('posix')
15399
15400 Note
15401 that
15402 the
15403 win32
15404 plat‐
15405 form
15406 adds
15407 the
15408 SYS‐
15409 TEM‐
15410 DRIVE
15411 and
15412 SYS‐
15413 TEM‐
15414 ROOT
15415 vari‐
15416 ables
15417 from
15418 the
15419 user's
15420 exter‐
15421 nal
15422 envi‐
15423 ron‐
15424 ment
15425 to
15426 the
15427 con‐
15428 struc‐
15429 tion
15430 envi‐
15431 ron‐
15432 ment's
15433 ENV
15434 dic‐
15435 tio‐
15436 nary.
15437 This
15438 is
15439 so
15440 that
15441 any
15442 exe‐
15443 cuted
15444 com‐
15445 mands
15446 that
15447 use
15448 sock‐
15449 ets
15450 to
15451 con‐
15452 nect
15453 with
15454 other
15455 sys‐
15456 tems
15457 (such
15458 as
15459 fetch‐
15460 ing
15461 source
15462 files
15463 from
15464 exter‐
15465 nal
15466 CVS
15467 repos‐
15468 i‐
15469 tory
15470 spec‐
15471 i‐
15472 fi‐
15473 ca‐
15474 tions
15475 like
15476 :pserver:anony‐
15477 mous@cvs.source‐
15478 forge.net:/cvs‐
15479 root/scons)
15480 will
15481 work
15482 on
15483 Win‐
15484 dows
15485 sys‐
15486 tems.
15487
15488
15489 Progress(callable,
15490 [inter‐
15491 val])
15492
15493 Progress(string,
15494 [inter‐
15495 val,
15496 file,
15497 over‐
15498 write])
15499
15500 Progress(list_of_strings,
15501 [inter‐
15502 val,
15503 file,
15504 over‐
15505 write])
15506 Allows
15507 SCons
15508 to
15509 show
15510 progress
15511 made
15512 dur‐
15513 ing
15514 the
15515 build
15516 by
15517 dis‐
15518 play‐
15519 ing
15520 a
15521 string
15522 or
15523 call‐
15524 ing
15525 a
15526 func‐
15527 tion
15528 while
15529 eval‐
15530 u‐
15531 at‐
15532 ing
15533 Nodes
15534 (e.g.
15535 files).
15536
15537 If
15538 the
15539 first
15540 spec‐
15541 i‐
15542 fied
15543 argu‐
15544 ment
15545 is
15546 a
15547 Python
15548 callable
15549 (a
15550 func‐
15551 tion
15552 or
15553 an
15554 object
15555 that
15556 has
15557 a
15558 __call__()
15559 method),
15560 the
15561 func‐
15562 tion
15563 will
15564 be
15565 called
15566 once
15567 every
15568 inter‐
15569 val
15570 times
15571 a
15572 Node
15573 is
15574 eval‐
15575 u‐
15576 ated.
15577 The
15578 callable
15579 will
15580 be
15581 passed
15582 the
15583 eval‐
15584 u‐
15585 ated
15586 Node
15587 as
15588 its
15589 only
15590 argu‐
15591 ment.
15592 (For
15593 future
15594 com‐
15595 pat‐
15596 i‐
15597 bil‐
15598 ity,
15599 it's
15600 a
15601 good
15602 idea
15603 to
15604 also
15605 add
15606 *args
15607 and
15608 **kw
15609 as
15610 argu‐
15611 ments
15612 to
15613 your
15614 func‐
15615 tion
15616 or
15617 method.
15618 This
15619 will
15620 pre‐
15621 vent
15622 the
15623 code
15624 from
15625 break‐
15626 ing
15627 if
15628 SCons
15629 ever
15630 changes
15631 the
15632 inter‐
15633 face
15634 to
15635 call
15636 the
15637 func‐
15638 tion
15639 with
15640 addi‐
15641 tional
15642 argu‐
15643 ments
15644 in
15645 the
15646 future.)
15647
15648 An
15649 exam‐
15650 ple
15651 of
15652 a
15653 sim‐
15654 ple
15655 cus‐
15656 tom
15657 progress
15658 func‐
15659 tion
15660 that
15661 prints
15662 a
15663 string
15664 con‐
15665 tain‐
15666 ing
15667 the
15668 Node
15669 name
15670 every
15671 10
15672 Nodes:
15673
15674 def my_progress_function(node, *args, **kw):
15675 print 'Evaluating node %s!' % node
15676 Progress(my_progress_function, interval=10)
15677
15678 A
15679 more
15680 com‐
15681 pli‐
15682 cated
15683 exam‐
15684 ple
15685 of
15686 a
15687 cus‐
15688 tom
15689 progress
15690 dis‐
15691 play
15692 object
15693 that
15694 prints
15695 a
15696 string
15697 con‐
15698 tain‐
15699 ing
15700 a
15701 count
15702 every
15703 100
15704 eval‐
15705 u‐
15706 ated
15707 Nodes.
15708 Note
15709 the
15710 use
15711 of
15712 \r
15713 (a
15714 car‐
15715 riage
15716 return)
15717 at
15718 the
15719 end
15720 so
15721 that
15722 the
15723 string
15724 will
15725 over‐
15726 write
15727 itself
15728 on
15729 a
15730 dis‐
15731 play:
15732
15733 import sys
15734 class ProgressCounter:
15735 count = 0
15736 def __call__(self, node, *args, **kw):
15737 self.count += 100
15738 sys.stderr.write('Evaluated %s nodes\r' % self.count)
15739 Progress(ProgressCounter(), interval=100)
15740
15741 If
15742 the
15743 first
15744 argu‐
15745 ment
15746 Progress()
15747 is
15748 a
15749 string,
15750 the
15751 string
15752 will
15753 be
15754 dis‐
15755 played
15756 every
15757 inter‐
15758 val
15759 eval‐
15760 u‐
15761 ated
15762 Nodes.
15763 The
15764 default
15765 is
15766 to
15767 print
15768 the
15769 string
15770 on
15771 stan‐
15772 dard
15773 out‐
15774 put;
15775 an
15776 alter‐
15777 nate
15778 out‐
15779 put
15780 stream
15781 may
15782 be
15783 spec‐
15784 i‐
15785 fied
15786 with
15787 the
15788 file=
15789 argu‐
15790 ment.
15791 The
15792 fol‐
15793 low‐
15794 ing
15795 will
15796 print
15797 a
15798 series
15799 of
15800 dots
15801 on
15802 the
15803 error
15804 out‐
15805 put,
15806 one
15807 dot
15808 for
15809 every
15810 100
15811 eval‐
15812 u‐
15813 ated
15814 Nodes:
15815
15816 import sys
15817 Progress('.', interval=100, file=sys.stderr)
15818
15819 If
15820 the
15821 string
15822 con‐
15823 tains
15824 the
15825 ver‐
15826 ba‐
15827 tim
15828 sub‐
15829 string
15830 $TAR‐
15831 GET,
15832 it
15833 will
15834 be
15835 replaced
15836 with
15837 the
15838 Node.
15839 Note
15840 that,
15841 for
15842 per‐
15843 for‐
15844 mance
15845 rea‐
15846 sons,
15847 this
15848 is
15849 not
15850 a
15851 reg‐
15852 u‐
15853 lar
15854 SCons
15855 vari‐
15856 able
15857 sub‐
15858 sti‐
15859 tion,
15860 so
15861 you
15862 can
15863 not
15864 use
15865 other
15866 vari‐
15867 ables
15868 or
15869 use
15870 curly
15871 braces.
15872 The
15873 fol‐
15874 low‐
15875 ing
15876 exam‐
15877 ple
15878 will
15879 print
15880 the
15881 name
15882 of
15883 every
15884 eval‐
15885 u‐
15886 ated
15887 Node,
15888 using
15889 a
15890 \r
15891 (car‐
15892 riage
15893 return)
15894 to
15895 cause
15896 each
15897 line
15898 to
15899 over‐
15900 writ‐
15901 ten
15902 by
15903 the
15904 next
15905 line,
15906 and
15907 the
15908 over‐
15909 write=
15910 key‐
15911 word
15912 argu‐
15913 ment
15914 to
15915 make
15916 sure
15917 the
15918 pre‐
15919 vi‐
15920 ously-
15921 printed
15922 file
15923 name
15924 is
15925 over‐
15926 writ‐
15927 ten
15928 with
15929 blank
15930 spa‐
15931 ces:
15932
15933 import sys
15934 Progress('$TARGET\r', overwrite=True)
15935
15936 If
15937 the
15938 first
15939 argu‐
15940 ment
15941 to
15942 Progress()
15943 is
15944 a
15945 list
15946 of
15947 strings,
15948 then
15949 each
15950 string
15951 in
15952 the
15953 list
15954 will
15955 be
15956 dis‐
15957 played
15958 in
15959 rotat‐
15960 ing
15961 fash‐
15962 ion
15963 every
15964 inter‐
15965 val
15966 eval‐
15967 u‐
15968 ated
15969 Nodes.
15970 This
15971 can
15972 be
15973 used
15974 to
15975 imple‐
15976 ment
15977 a
15978 "spin‐
15979 ner"
15980 on
15981 the
15982 user's
15983 screen
15984 as
15985 fol‐
15986 lows:
15987
15988 Progress(['-\r', '\\\r', '|\r', '/\r'], interval=5)
15989
15990
15991 Pre‐
15992 cious(tar‐
15993 get,
15994 ...)
15995
15996 env.Pre‐
15997 cious(tar‐
15998 get,
15999 ...)
16000 Marks
16001 each
16002 given
16003 tar‐
16004 get
16005 as
16006 pre‐
16007 cious
16008 so
16009 it
16010 is
16011 not
16012 deleted
16013 before
16014 it
16015 is
16016 rebuilt.
16017 Nor‐
16018 mally
16019 scons
16020 deletes
16021 a
16022 tar‐
16023 get
16024 before
16025 build‐
16026 ing
16027 it.
16028 Mul‐
16029 ti‐
16030 ple
16031 tar‐
16032 gets
16033 can
16034 be
16035 passed
16036 in
16037 to
16038 a
16039 sin‐
16040 gle
16041 call
16042 to
16043 Pre‐
16044 cious().
16045
16046
16047 env.Prepend(key=val,
16048 [...])
16049 Appends
16050 the
16051 spec‐
16052 i‐
16053 fied
16054 key‐
16055 word
16056 argu‐
16057 ments
16058 to
16059 the
16060 begin‐
16061 ning
16062 of
16063 con‐
16064 struc‐
16065 tion
16066 vari‐
16067 ables
16068 in
16069 the
16070 envi‐
16071 ron‐
16072 ment.
16073 If
16074 the
16075 Envi‐
16076 ron‐
16077 ment
16078 does
16079 not
16080 have
16081 the
16082 spec‐
16083 i‐
16084 fied
16085 con‐
16086 struc‐
16087 tion
16088 vari‐
16089 able,
16090 it
16091 is
16092 sim‐
16093 ply
16094 added
16095 to
16096 the
16097 envi‐
16098 ron‐
16099 ment.
16100 If
16101 the
16102 val‐
16103 ues
16104 of
16105 the
16106 con‐
16107 struc‐
16108 tion
16109 vari‐
16110 able
16111 and
16112 the
16113 key‐
16114 word
16115 argu‐
16116 ment
16117 are
16118 the
16119 same
16120 type,
16121 then
16122 the
16123 two
16124 val‐
16125 ues
16126 will
16127 be
16128 sim‐
16129 ply
16130 added
16131 together.
16132 Oth‐
16133 er‐
16134 wise,
16135 the
16136 con‐
16137 struc‐
16138 tion
16139 vari‐
16140 able
16141 and
16142 the
16143 value
16144 of
16145 the
16146 key‐
16147 word
16148 argu‐
16149 ment
16150 are
16151 both
16152 coerced
16153 to
16154 lists,
16155 and
16156 the
16157 lists
16158 are
16159 added
16160 together.
16161 (See
16162 also
16163 the
16164 Append
16165 method,
16166 above.)
16167
16168 Exam‐
16169 ple:
16170
16171 env.Prepend(CCFLAGS = '-g ', FOO = ['foo.yyy'])
16172
16173
16174 env.Prepen‐
16175 dEN‐
16176 VPath(name,
16177 new‐
16178 path,
16179 [envname,
16180 sep])
16181 This
16182 appends
16183 new
16184 path
16185 ele‐
16186 ments
16187 to
16188 the
16189 given
16190 path
16191 in
16192 the
16193 spec‐
16194 i‐
16195 fied
16196 exter‐
16197 nal
16198 envi‐
16199 ron‐
16200 ment
16201 (ENV
16202 by
16203 default).
16204 This
16205 will
16206 only
16207 add
16208 any
16209 par‐
16210 tic‐
16211 u‐
16212 lar
16213 path
16214 once
16215 (leav‐
16216 ing
16217 the
16218 first
16219 one
16220 it
16221 encoun‐
16222 ters
16223 and
16224 ignor‐
16225 ing
16226 the
16227 rest,
16228 to
16229 pre‐
16230 serve
16231 path
16232 order),
16233 and
16234 to
16235 help
16236 assure
16237 this,
16238 will
16239 nor‐
16240 mal‐
16241 ize
16242 all
16243 paths
16244 (using
16245 os.path.norm‐
16246 path
16247 and
16248 os.path.norm‐
16249 case).
16250 This
16251 can
16252 also
16253 han‐
16254 dle
16255 the
16256 case
16257 where
16258 the
16259 given
16260 old
16261 path
16262 vari‐
16263 able
16264 is
16265 a
16266 list
16267 instead
16268 of
16269 a
16270 string,
16271 in
16272 which
16273 case
16274 a
16275 list
16276 will
16277 be
16278 returned
16279 instead
16280 of
16281 a
16282 string.
16283
16284 Exam‐
16285 ple:
16286
16287 print 'before:',env['ENV']['INCLUDE']
16288 include_path = '/foo/bar:/foo'
16289 env.PrependENVPath('INCLUDE', include_path)
16290 print 'after:',env['ENV']['INCLUDE']
16291
16292 The
16293 above
16294 exmaple
16295 will
16296 print:
16297
16298 before: /biz:/foo
16299 after: /foo/bar:/foo:/biz
16300
16301
16302 env.Prepen‐
16303 dUnique(key=val,
16304 [...])
16305 Appends
16306 the
16307 spec‐
16308 i‐
16309 fied
16310 key‐
16311 word
16312 argu‐
16313 ments
16314 to
16315 the
16316 begin‐
16317 ning
16318 of
16319 con‐
16320 struc‐
16321 tion
16322 vari‐
16323 ables
16324 in
16325 the
16326 envi‐
16327 ron‐
16328 ment.
16329 If
16330 the
16331 Envi‐
16332 ron‐
16333 ment
16334 does
16335 not
16336 have
16337 the
16338 spec‐
16339 i‐
16340 fied
16341 con‐
16342 struc‐
16343 tion
16344 vari‐
16345 able,
16346 it
16347 is
16348 sim‐
16349 ply
16350 added
16351 to
16352 the
16353 envi‐
16354 ron‐
16355 ment.
16356 If
16357 the
16358 con‐
16359 struc‐
16360 tion
16361 vari‐
16362 able
16363 being
16364 appended
16365 to
16366 is
16367 a
16368 list,
16369 then
16370 any
16371 value(s)
16372 that
16373 already
16374 exist
16375 in
16376 the
16377 con‐
16378 struc‐
16379 tion
16380 vari‐
16381 able
16382 will
16383 not
16384 be
16385 added
16386 again
16387 to
16388 the
16389 list.
16390
16391 Exam‐
16392 ple:
16393
16394 env.PrependUnique(CCFLAGS = '-g', FOO = ['foo.yyy'])
16395
16396
16397 env.RCS()
16398 A
16399 fac‐
16400 tory
16401 func‐
16402 tion
16403 that
16404 returns
16405 a
16406 Builder
16407 object
16408 to
16409 be
16410 used
16411 to
16412 fetch
16413 source
16414 files
16415 from
16416 RCS.
16417 The
16418 returned
16419 Builder
16420 is
16421 intended
16422 to
16423 be
16424 passed
16425 to
16426 the
16427 Source‐
16428 Code
16429 func‐
16430 tion:
16431
16432 Exam‐
16433 ples:
16434
16435 env.SourceCode('.', env.RCS())
16436
16437 Note
16438 that
16439 scons
16440 will
16441 fetch
16442 source
16443 files
16444 from
16445 RCS
16446 sub‐
16447 di‐
16448 rec‐
16449 to‐
16450 ries
16451 auto‐
16452 mat‐
16453 i‐
16454 cally,
16455 so
16456 con‐
16457 fig‐
16458 ur‐
16459 ing
16460 RCS
16461 as
16462 demon‐
16463 strated
16464 in
16465 the
16466 above
16467 exam‐
16468 ple
16469 should
16470 only
16471 be
16472 nec‐
16473 es‐
16474 sary
16475 if
16476 you
16477 are
16478 fetch‐
16479 ing
16480 from
16481 RCS,v
16482 files
16483 in
16484 the
16485 same
16486 direc‐
16487 tory
16488 as
16489 the
16490 source
16491 files,
16492 or
16493 if
16494 you
16495 need
16496 to
16497 explic‐
16498 itly
16499 spec‐
16500 ify
16501 RCS
16502 for
16503 a
16504 spe‐
16505 cific
16506 sub‐
16507 di‐
16508 rec‐
16509 tory.
16510
16511
16512 env.Replace(key=val,
16513 [...])
16514 Replaces
16515 con‐
16516 struc‐
16517 tion
16518 vari‐
16519 ables
16520 in
16521 the
16522 Envi‐
16523 ron‐
16524 ment
16525 with
16526 the
16527 spec‐
16528 i‐
16529 fied
16530 key‐
16531 word
16532 argu‐
16533 ments.
16534
16535 Exam‐
16536 ple:
16537
16538 env.Replace(CCFLAGS = '-g', FOO = 'foo.xxx')
16539
16540
16541 Repos‐
16542 i‐
16543 tory(direc‐
16544 tory)
16545
16546 env.Repos‐
16547 i‐
16548 tory(direc‐
16549 tory)
16550 Spec‐
16551 i‐
16552 fies
16553 that
16554 direc‐
16555 tory
16556 is
16557 a
16558 repos‐
16559 i‐
16560 tory
16561 to
16562 be
16563 searched
16564 for
16565 files.
16566 Mul‐
16567 ti‐
16568 ple
16569 calls
16570 to
16571 Repos‐
16572 i‐
16573 tory()
16574 are
16575 legal,
16576 and
16577 each
16578 one
16579 adds
16580 to
16581 the
16582 list
16583 of
16584 repos‐
16585 i‐
16586 to‐
16587 ries
16588 that
16589 will
16590 be
16591 searched.
16592
16593 To
16594 scons,
16595 a
16596 repos‐
16597 i‐
16598 tory
16599 is
16600 a
16601 copy
16602 of
16603 the
16604 source
16605 tree,
16606 from
16607 the
16608 top-
16609 level
16610 direc‐
16611 tory
16612 on
16613 down,
16614 which
16615 may
16616 con‐
16617 tain
16618 both
16619 source
16620 files
16621 and
16622 derived
16623 files
16624 that
16625 can
16626 be
16627 used
16628 to
16629 build
16630 tar‐
16631 gets
16632 in
16633 the
16634 local
16635 source
16636 tree.
16637 The
16638 canon‐
16639 i‐
16640 cal
16641 exam‐
16642 ple
16643 would
16644 be
16645 an
16646 offi‐
16647 cial
16648 source
16649 tree
16650 main‐
16651 tained
16652 by
16653 an
16654 inte‐
16655 gra‐
16656 tor.
16657 If
16658 the
16659 repos‐
16660 i‐
16661 tory
16662 con‐
16663 tains
16664 derived
16665 files,
16666 then
16667 the
16668 derived
16669 files
16670 should
16671 have
16672 been
16673 built
16674 using
16675 scons,
16676 so
16677 that
16678 the
16679 repos‐
16680 i‐
16681 tory
16682 con‐
16683 tains
16684 the
16685 nec‐
16686 es‐
16687 sary
16688 sig‐
16689 na‐
16690 ture
16691 infor‐
16692 ma‐
16693 tion
16694 to
16695 allow
16696 scons
16697 to
16698 fig‐
16699 ure
16700 out
16701 when
16702 it
16703 is
16704 appro‐
16705 pri‐
16706 ate
16707 to
16708 use
16709 the
16710 repos‐
16711 i‐
16712 tory
16713 copy
16714 of
16715 a
16716 derived
16717 file,
16718 instead
16719 of
16720 build‐
16721 ing
16722 one
16723 locally.
16724
16725 Note
16726 that
16727 if
16728 an
16729 up-
16730 to-
16731 date
16732 derived
16733 file
16734 already
16735 exists
16736 in
16737 a
16738 repos‐
16739 i‐
16740 tory,
16741 scons
16742 will
16743 not
16744 make
16745 a
16746 copy
16747 in
16748 the
16749 local
16750 direc‐
16751 tory
16752 tree.
16753 In
16754 order
16755 to
16756 guar‐
16757 an‐
16758 tee
16759 that
16760 a
16761 local
16762 copy
16763 will
16764 be
16765 made,
16766 use
16767 the
16768 Local()
16769 method.
16770
16771
16772 Requires(tar‐
16773 get,
16774 pre‐
16775 req‐
16776 ui‐
16777 site)
16778
16779 env.Requires(tar‐
16780 get,
16781 pre‐
16782 req‐
16783 ui‐
16784 site)
16785 Spec‐
16786 i‐
16787 fies
16788 an
16789 order-
16790 only
16791 rela‐
16792 tion‐
16793 ship
16794 between
16795 the
16796 spec‐
16797 i‐
16798 fied
16799 tar‐
16800 get
16801 file(s)
16802 and
16803 the
16804 spec‐
16805 i‐
16806 fied
16807 pre‐
16808 req‐
16809 ui‐
16810 site
16811 file(s).
16812 The
16813 pre‐
16814 req‐
16815 ui‐
16816 site
16817 file(s)
16818 will
16819 be
16820 (re)built,
16821 if
16822 nec‐
16823 es‐
16824 sary,
16825 before
16826 the
16827 tar‐
16828 get
16829 file(s),
16830 but
16831 the
16832 tar‐
16833 get
16834 file(s)
16835 do
16836 not
16837 actu‐
16838 ally
16839 depend
16840 on
16841 the
16842 pre‐
16843 req‐
16844 ui‐
16845 sites
16846 and
16847 will
16848 not
16849 be
16850 rebuilt
16851 sim‐
16852 ply
16853 because
16854 the
16855 pre‐
16856 req‐
16857 ui‐
16858 site
16859 file(s)
16860 change.
16861
16862 Exam‐
16863 ple:
16864
16865 env.Requires('foo', 'file-that-must-be-built-before-foo')
16866
16867
16868 Return([vars...
16869 ,
16870 stop=])
16871 By
16872 default,
16873 this
16874 stops
16875 pro‐
16876 cess‐
16877 ing
16878 the
16879 cur‐
16880 rent
16881 SCon‐
16882 script
16883 file
16884 and
16885 returns
16886 to
16887 the
16888 call‐
16889 ing
16890 SCon‐
16891 script
16892 file
16893 the
16894 val‐
16895 ues
16896 of
16897 the
16898 vari‐
16899 ables
16900 named
16901 in
16902 the
16903 vars
16904 string
16905 argu‐
16906 ments.
16907 Mul‐
16908 ti‐
16909 ple
16910 strings
16911 con‐
16912 tan‐
16913 ing
16914 vari‐
16915 able
16916 names
16917 may
16918 be
16919 passed
16920 to
16921 Return().
16922 Any
16923 strings
16924 that
16925 con‐
16926 tain
16927 white
16928 space
16929
16930 The
16931 optional
16932 stop=
16933 key‐
16934 word
16935 argu‐
16936 ment
16937 may
16938 be
16939 set
16940 to
16941 a
16942 false
16943 value
16944 to
16945 con‐
16946 tinue
16947 pro‐
16948 cess‐
16949 ing
16950 the
16951 rest
16952 of
16953 the
16954 SCon‐
16955 script
16956 file
16957 after
16958 the
16959 Return()
16960 call.
16961 This
16962 was
16963 the
16964 default
16965 behav‐
16966 ior
16967 prior
16968 to
16969 SCons
16970 0.98.
16971 How‐
16972 ever,
16973 the
16974 val‐
16975 ues
16976 returned
16977 are
16978 still
16979 the
16980 val‐
16981 ues
16982 of
16983 the
16984 vari‐
16985 ables
16986 in
16987 the
16988 named
16989 vars
16990 at
16991 the
16992 point
16993 Return()
16994 is
16995 called.
16996
16997 Exam‐
16998 ples:
16999
17000 # Returns without returning a value.
17001 Return()
17002
17003 # Returns the value of the 'foo' Python variable.
17004 Return("foo")
17005
17006 # Returns the values of the Python variables 'foo' and 'bar'.
17007 Return("foo", "bar")
17008
17009 # Returns the values of Python variables 'val1' and 'val2'.
17010 Return('val1 val2')
17011
17012
17013 Scan‐
17014 ner(func‐
17015 tion,
17016 [argu‐
17017 ment,
17018 keys,
17019 path_func‐
17020 tion,
17021 node_class,
17022 node_fac‐
17023 tory,
17024 scan_check,
17025 recur‐
17026 sive])
17027
17028 env.Scan‐
17029 ner(func‐
17030 tion,
17031 [argu‐
17032 ment,
17033 keys,
17034 path_func‐
17035 tion,
17036 node_class,
17037 node_fac‐
17038 tory,
17039 scan_check,
17040 recur‐
17041 sive])
17042 Cre‐
17043 ates
17044 a
17045 Scan‐
17046 ner
17047 object
17048 for
17049 the
17050 spec‐
17051 i‐
17052 fied
17053 func‐
17054 tion.
17055 See
17056 the
17057 sec‐
17058 tion
17059 "Scan‐
17060 ner
17061 Objects,"
17062 below,
17063 for
17064 a
17065 com‐
17066 plete
17067 expla‐
17068 na‐
17069 tion
17070 of
17071 the
17072 argu‐
17073 ments
17074 and
17075 behav‐
17076 ior.
17077
17078
17079 env.SCCS()
17080 A
17081 fac‐
17082 tory
17083 func‐
17084 tion
17085 that
17086 returns
17087 a
17088 Builder
17089 object
17090 to
17091 be
17092 used
17093 to
17094 fetch
17095 source
17096 files
17097 from
17098 SCCS.
17099 The
17100 returned
17101 Builder
17102 is
17103 intended
17104 to
17105 be
17106 passed
17107 to
17108 the
17109 Source‐
17110 Code
17111 func‐
17112 tion.
17113
17114 Exam‐
17115 ple:
17116
17117 env.SourceCode('.', env.SCCS())
17118
17119 Note
17120 that
17121 scons
17122 will
17123 fetch
17124 source
17125 files
17126 from
17127 SCCS
17128 sub‐
17129 di‐
17130 rec‐
17131 to‐
17132 ries
17133 auto‐
17134 mat‐
17135 i‐
17136 cally,
17137 so
17138 con‐
17139 fig‐
17140 ur‐
17141 ing
17142 SCCS
17143 as
17144 demon‐
17145 strated
17146 in
17147 the
17148 above
17149 exam‐
17150 ple
17151 should
17152 only
17153 be
17154 nec‐
17155 es‐
17156 sary
17157 if
17158 you
17159 are
17160 fetch‐
17161 ing
17162 from
17163 s.SCCS
17164 files
17165 in
17166 the
17167 same
17168 direc‐
17169 tory
17170 as
17171 the
17172 source
17173 files,
17174 or
17175 if
17176 you
17177 need
17178 to
17179 explic‐
17180 itly
17181 spec‐
17182 ify
17183 SCCS
17184 for
17185 a
17186 spe‐
17187 cific
17188 sub‐
17189 di‐
17190 rec‐
17191 tory.
17192
17193
17194 SCon‐
17195 script(scripts,
17196 [exports,
17197 vari‐
17198 ant_dir,
17199 src_dir,
17200 dupli‐
17201 cate])
17202
17203 env.SCon‐
17204 script(scripts,
17205 [exports,
17206 vari‐
17207 ant_dir,
17208 src_dir,
17209 dupli‐
17210 cate])
17211
17212 SCon‐
17213 script(dirs=sub‐
17214 dirs,
17215 [name=script,
17216 exports,
17217 vari‐
17218 ant_dir,
17219 src_dir,
17220 dupli‐
17221 cate])
17222
17223 env.SCon‐
17224 script(dirs=sub‐
17225 dirs,
17226 [name=script,
17227 exports,
17228 vari‐
17229 ant_dir,
17230 src_dir,
17231 dupli‐
17232 cate])
17233 This
17234 tells
17235 scons
17236 to
17237 exe‐
17238 cute
17239 one
17240 or
17241 more
17242 sub‐
17243 sidiary
17244 SCon‐
17245 script
17246 (con‐
17247 fig‐
17248 u‐
17249 ra‐
17250 tion)
17251 files.
17252 There
17253 are
17254 two
17255 ways
17256 to
17257 call
17258 the
17259 SCon‐
17260 script()
17261 func‐
17262 tion.
17263
17264 The
17265 first
17266 way
17267 you
17268 can
17269 call
17270 SCon‐
17271 script()
17272 is
17273 to
17274 explic‐
17275 itly
17276 spec‐
17277 ify
17278 one
17279 or
17280 more
17281 scripts
17282 as
17283 the
17284 first
17285 argu‐
17286 ment.
17287 A
17288 sin‐
17289 gle
17290 script
17291 may
17292 be
17293 spec‐
17294 i‐
17295 fied
17296 as
17297 a
17298 string;
17299 mul‐
17300 ti‐
17301 ple
17302 scripts
17303 must
17304 be
17305 spec‐
17306 i‐
17307 fied
17308 as
17309 a
17310 list
17311 (either
17312 explic‐
17313 itly
17314 or
17315 as
17316 cre‐
17317 ated
17318 by
17319 a
17320 func‐
17321 tion
17322 like
17323 Split()).
17324
17325 The
17326 sec‐
17327 ond
17328 way
17329 you
17330 can
17331 call
17332 SCon‐
17333 script()
17334 is
17335 to
17336 spec‐
17337 ify
17338 a
17339 list
17340 of
17341 (sub)direc‐
17342 tory
17343 names
17344 as
17345 a
17346 dirs=sub‐
17347 dirs
17348 key‐
17349 word
17350 argu‐
17351 ment.
17352 In
17353 this
17354 case,
17355 scons
17356 will,
17357 by
17358 default,
17359 exe‐
17360 cute
17361 a
17362 sub‐
17363 sidiary
17364 con‐
17365 fig‐
17366 u‐
17367 ra‐
17368 tion
17369 file
17370 named
17371 SCon‐
17372 script
17373 in
17374 each
17375 of
17376 the
17377 spec‐
17378 i‐
17379 fied
17380 direc‐
17381 to‐
17382 ries.
17383 You
17384 may
17385 spec‐
17386 ify
17387 a
17388 name
17389 other
17390 than
17391 SCon‐
17392 script
17393 by
17394 sup‐
17395 ply‐
17396 ing
17397 an
17398 optional
17399 name=script
17400 key‐
17401 word
17402 argu‐
17403 ment.
17404
17405 The
17406 optional
17407 exports
17408 argu‐
17409 ment
17410 pro‐
17411 vides
17412 a
17413 list
17414 of
17415 vari‐
17416 able
17417 names
17418 or
17419 a
17420 dic‐
17421 tio‐
17422 nary
17423 of
17424 named
17425 val‐
17426 ues
17427 to
17428 export
17429 to
17430 the
17431 script(s).
17432 These
17433 vari‐
17434 ables
17435 are
17436 locally
17437 exported
17438 only
17439 to
17440 the
17441 spec‐
17442 i‐
17443 fied
17444 script(s),
17445 and
17446 do
17447 not
17448 affect
17449 the
17450 global
17451 pool
17452 of
17453 vari‐
17454 ables
17455 used
17456 by
17457 the
17458 Export()
17459 func‐
17460 tion.
17461 The
17462 sub‐
17463 sidiary
17464 script(s)
17465 must
17466 use
17467 the
17468 Import()
17469 func‐
17470 tion
17471 to
17472 import
17473 the
17474 vari‐
17475 ables.
17476
17477 In
17478 effect,
17479 the
17480 optional
17481 vari‐
17482 ant_dir
17483 argu‐
17484 ment
17485 causes
17486 the
17487 files
17488 (and
17489 sub‐
17490 di‐
17491 rec‐
17492 to‐
17493 ries)
17494 in
17495 the
17496 direc‐
17497 tory
17498 where
17499 script
17500 resides
17501 to
17502 be
17503 copied
17504 to
17505 vari‐
17506 ant_dir
17507 and
17508 the
17509 build
17510 per‐
17511 formed
17512 in
17513 vari‐
17514 ant_dir.
17515 Thus,
17516 all
17517 of
17518 the
17519 tar‐
17520 gets
17521 (for
17522 exam‐
17523 ple,
17524 object
17525 files
17526 and
17527 exe‐
17528 cuta‐
17529 bles)
17530 that
17531 would
17532 nor‐
17533 mally
17534 be
17535 built
17536 in
17537 (or
17538 under‐
17539 neath)
17540 the
17541 direc‐
17542 tory
17543 con‐
17544 tain‐
17545 ing
17546 script
17547 would
17548 actu‐
17549 ally
17550 be
17551 built
17552 in
17553 (or
17554 under‐
17555 neath)
17556 vari‐
17557 ant_dir.
17558 See
17559 the
17560 descrip‐
17561 tion
17562 of
17563 the
17564 Vari‐
17565 ant‐
17566 Dir()
17567 func‐
17568 tion
17569 below
17570 for
17571 the
17572 details
17573 and
17574 restric‐
17575 tions.
17576 vari‐
17577 ant_dir
17578 is
17579 inter‐
17580 preted
17581 rel‐
17582 a‐
17583 tive
17584 to
17585 the
17586 direc‐
17587 tory
17588 of
17589 the
17590 call‐
17591 ing
17592 SCon‐
17593 script
17594 file.
17595
17596 Nor‐
17597 mally,
17598 the
17599 source
17600 for
17601 the
17602 vari‐
17603 ant
17604 build
17605 is
17606 the
17607 direc‐
17608 tory
17609 con‐
17610 tain‐
17611 ing
17612 script.
17613 If
17614 the
17615 sources
17616 are
17617 not
17618 in
17619 script's
17620 direc‐
17621 tory,
17622 the
17623 optional
17624 src_dir
17625 argu‐
17626 ment
17627 pro‐
17628 vides
17629 the
17630 loca‐
17631 tion
17632 of
17633 the
17634 sources.
17635 src_dir
17636 is
17637 inter‐
17638 preted
17639 rel‐
17640 a‐
17641 tive
17642 to
17643 the
17644 direc‐
17645 tory
17646 of
17647 the
17648 call‐
17649 ing
17650 SCon‐
17651 script
17652 file.
17653
17654 By
17655 default,
17656 scons
17657 will
17658 link
17659 or
17660 copy
17661 (depend‐
17662 ing
17663 on
17664 the
17665 plat‐
17666 form)
17667 all
17668 the
17669 source
17670 files
17671 into
17672 the
17673 vari‐
17674 ant
17675 direc‐
17676 tory
17677 tree.
17678 This
17679 behav‐
17680 ior
17681 may
17682 be
17683 dis‐
17684 abled
17685 by
17686 set‐
17687 ting
17688 the
17689 optional
17690 dupli‐
17691 cate
17692 argu‐
17693 ment
17694 to
17695 0
17696 (it
17697 is
17698 set
17699 to
17700 1
17701 by
17702 default),
17703 in
17704 which
17705 case
17706 scons
17707 will
17708 refer
17709 directly
17710 to
17711 the
17712 source
17713 files
17714 in
17715 their
17716 source
17717 direc‐
17718 tory
17719 when
17720 build‐
17721 ing
17722 tar‐
17723 get
17724 files.
17725 See
17726 the
17727 descrip‐
17728 tion
17729 for
17730 Vari‐
17731 ant‐
17732 Dir()
17733 below
17734 for
17735 the
17736 details
17737 and
17738 restric‐
17739 tions.
17740
17741 Any
17742 vari‐
17743 ables
17744 returned
17745 by
17746 script
17747 using
17748 Return()
17749 will
17750 be
17751 returned
17752 by
17753 the
17754 call
17755 to
17756 SCon‐
17757 script().
17758
17759 Exam‐
17760 ples:
17761
17762 SConscript('subdir/SConscript')
17763 foo = SConscript('sub/SConscript', exports='env')
17764 SConscript('dir/SConscript', exports=['env', 'variable'])
17765 SConscript('src/SConscript', variant_dir='build', duplicate=0)
17766 SConscript('bld/SConscript', src_dir='src', exports='env variable')
17767 SConscript(dirs=['sub1', 'sub2'])
17768 SConscript(dirs=['sub3', 'sub4'], name='MySConscript')
17769
17770
17771 SCon‐
17772 scriptChdir(value)
17773
17774 env.SCon‐
17775 scriptChdir(value)
17776 By
17777 default,
17778 scons
17779 changes
17780 its
17781 work‐
17782 ing
17783 direc‐
17784 tory
17785 to
17786 the
17787 direc‐
17788 tory
17789 in
17790 which
17791 each
17792 sub‐
17793 sidiary
17794 SCon‐
17795 script
17796 file
17797 lives.
17798 This
17799 behav‐
17800 ior
17801 may
17802 be
17803 dis‐
17804 abled
17805 by
17806 spec‐
17807 i‐
17808 fy‐
17809 ing
17810 either:
17811
17812 SConscriptChdir(0)
17813 env.SConscriptChdir(0)
17814
17815 in
17816 which
17817 case
17818 scons
17819 will
17820 stay
17821 in
17822 the
17823 top-
17824 level
17825 direc‐
17826 tory
17827 while
17828 read‐
17829 ing
17830 all
17831 SCon‐
17832 script
17833 files.
17834 (This
17835 may
17836 be
17837 nec‐
17838 es‐
17839 sary
17840 when
17841 build‐
17842 ing
17843 from
17844 repos‐
17845 i‐
17846 to‐
17847 ries,
17848 when
17849 all
17850 the
17851 direc‐
17852 to‐
17853 ries
17854 in
17855 which
17856 SCon‐
17857 script
17858 files
17859 may
17860 be
17861 found
17862 don't
17863 nec‐
17864 es‐
17865 sar‐
17866 ily
17867 exist
17868 locally.)
17869 You
17870 may
17871 enable
17872 and
17873 dis‐
17874 able
17875 this
17876 abil‐
17877 ity
17878 by
17879 call‐
17880 ing
17881 SCon‐
17882 scriptChdir()
17883 mul‐
17884 ti‐
17885 ple
17886 times.
17887
17888 Exam‐
17889 ple:
17890
17891 env = Environment()
17892 SConscriptChdir(0)
17893 SConscript('foo/SConscript') # will not chdir to foo
17894 env.SConscriptChdir(1)
17895 SConscript('bar/SConscript') # will chdir to bar
17896
17897
17898 SCon‐
17899 sign‐
17900 File([file,dbm_mod‐
17901 ule])
17902
17903 env.SCon‐
17904 sign‐
17905 File([file,dbm_mod‐
17906 ule])
17907 This
17908 tells
17909 scons
17910 to
17911 store
17912 all
17913 file
17914 sig‐
17915 na‐
17916 tures
17917 in
17918 the
17919 spec‐
17920 i‐
17921 fied
17922 data‐
17923 base
17924 file.
17925 If
17926 the
17927 file
17928 name
17929 is
17930 omit‐
17931 ted,
17932 .scon‐
17933 sign
17934 is
17935 used
17936 by
17937 default.
17938 (The
17939 actual
17940 file
17941 name(s)
17942 stored
17943 on
17944 disk
17945 may
17946 have
17947 an
17948 appro‐
17949 pri‐
17950 ated
17951 suf‐
17952 fix
17953 appended
17954 by
17955 the
17956 dbm_mod‐
17957 ule.)
17958 If
17959 file
17960 is
17961 not
17962 an
17963 abso‐
17964 lute
17965 path
17966 name,
17967 the
17968 file
17969 is
17970 placed
17971 in
17972 the
17973 same
17974 direc‐
17975 tory
17976 as
17977 the
17978 top-
17979 level
17980 SCon‐
17981 struct
17982 file.
17983
17984 If
17985 file
17986 is
17987 None,
17988 then
17989 scons
17990 will
17991 store
17992 file
17993 sig‐
17994 na‐
17995 tures
17996 in
17997 a
17998 sep‐
17999 a‐
18000 rate
18001 .scon‐
18002 sign
18003 file
18004 in
18005 each
18006 direc‐
18007 tory,
18008 not
18009 in
18010 one
18011 global
18012 data‐
18013 base
18014 file.
18015 (This
18016 was
18017 the
18018 default
18019 behav‐
18020 ior
18021 prior
18022 to
18023 SCons
18024 0.96.91
18025 and
18026 0.97.)
18027
18028 The
18029 optional
18030 dbm_mod‐
18031 ule
18032 argu‐
18033 ment
18034 can
18035 be
18036 used
18037 to
18038 spec‐
18039 ify
18040 which
18041 Python
18042 data‐
18043 base
18044 mod‐
18045 ule
18046 The
18047 default
18048 is
18049 to
18050 use
18051 a
18052 cus‐
18053 tom
18054 SCons.dblite
18055 mod‐
18056 ule
18057 that
18058 uses
18059 pick‐
18060 led
18061 Python
18062 data
18063 struc‐
18064 tures,
18065 and
18066 which
18067 works
18068 on
18069 all
18070 Python
18071 ver‐
18072 sions
18073 from
18074 1.5.2
18075 on.
18076
18077 Exam‐
18078 ples:
18079
18080 # Explicitly stores signatures in ".sconsign.dblite"
18081 # in the top-level SConstruct directory (the
18082 # default behavior).
18083 SConsignFile()
18084
18085 # Stores signatures in the file "etc/scons-signatures"
18086 # relative to the top-level SConstruct directory.
18087 SConsignFile("etc/scons-signatures")
18088
18089 # Stores signatures in the specified absolute file name.
18090 SConsignFile("/home/me/SCons/signatures")
18091
18092 # Stores signatures in a separate .sconsign file
18093 # in each directory.
18094 SConsignFile(None)
18095
18096
18097 env.Set‐
18098 De‐
18099 fault(key=val,
18100 [...])
18101 Sets
18102 con‐
18103 struc‐
18104 tion
18105 vari‐
18106 ables
18107 to
18108 default
18109 val‐
18110 ues
18111 spec‐
18112 i‐
18113 fied
18114 with
18115 the
18116 key‐
18117 word
18118 argu‐
18119 ments
18120 if
18121 (and
18122 only
18123 if)
18124 the
18125 vari‐
18126 ables
18127 are
18128 not
18129 already
18130 set.
18131 The
18132 fol‐
18133 low‐
18134 ing
18135 state‐
18136 ments
18137 are
18138 equiv‐
18139 a‐
18140 lent:
18141
18142 env.SetDefault(FOO = 'foo')
18143
18144 if not env.has_key('FOO'): env['FOO'] = 'foo'
18145
18146
18147 SetOp‐
18148 tion(name,
18149 value)
18150
18151 env.SetOp‐
18152 tion(name,
18153 value)
18154 This
18155 func‐
18156 tion
18157 pro‐
18158 vides
18159 a
18160 way
18161 to
18162 set
18163 a
18164 select
18165 sub‐
18166 set
18167 of
18168 the
18169 scons
18170 com‐
18171 mand
18172 line
18173 options
18174 from
18175 a
18176 SCon‐
18177 script
18178 file.
18179 The
18180 options
18181 sup‐
18182 ported
18183 are:
18184
18185
18186 clean which
18187 cor‐
18188 re‐
18189 sponds
18190 to
18191 -c,
18192 --clean
18193 and
18194 --remove;
18195
18196 dupli‐
18197 cate
18198 which
18199 cor‐
18200 re‐
18201 sponds
18202 to
18203 --dupli‐
18204 cate;
18205
18206 help which
18207 cor‐
18208 re‐
18209 sponds
18210 to
18211 -h
18212 and
18213 --help;
18214
18215 implicit_cache
18216 which
18217 cor‐
18218 re‐
18219 sponds
18220 to
18221 --implicit-
18222 cache;
18223
18224 max_drift
18225 which
18226 cor‐
18227 re‐
18228 sponds
18229 to
18230 --max-
18231 drift;
18232
18233 no_exec
18234 which
18235 cor‐
18236 re‐
18237 sponds
18238 to
18239 -n,
18240 --no-
18241 exec,
18242 --just-
18243 print,
18244 --dry-
18245 run
18246 and
18247 --recon;
18248
18249 num_jobs
18250 which
18251 cor‐
18252 re‐
18253 sponds
18254 to
18255 -j
18256 and
18257 --jobs;
18258
18259 ran‐
18260 dom which
18261 cor‐
18262 re‐
18263 sponds
18264 to
18265 --ran‐
18266 dom;
18267 and
18268
18269 stack_size
18270 which
18271 cor‐
18272 re‐
18273 sponds
18274 to
18275 --stack-
18276 size.
18277
18278
18279 See
18280 the
18281 doc‐
18282 u‐
18283 men‐
18284 ta‐
18285 tion
18286 for
18287 the
18288 cor‐
18289 re‐
18290 spond‐
18291 ing
18292 com‐
18293 mand
18294 line
18295 object
18296 for
18297 infor‐
18298 ma‐
18299 tion
18300 about
18301 each
18302 spe‐
18303 cific
18304 option.
18305
18306 Exam‐
18307 ple:
18308
18309 SetOption('max_drift', 1)
18310
18311
18312 Side‐
18313 Ef‐
18314 fect(side_effect,
18315 tar‐
18316 get)
18317
18318 env.Side‐
18319 Ef‐
18320 fect(side_effect,
18321 tar‐
18322 get)
18323 Declares
18324 side_effect
18325 as
18326 a
18327 side
18328 effect
18329 of
18330 build‐
18331 ing
18332 tar‐
18333 get.
18334 Both
18335 side_effect
18336 and
18337 tar‐
18338 get
18339 can
18340 be
18341 a
18342 list,
18343 a
18344 file
18345 name,
18346 or
18347 a
18348 node.
18349 A
18350 side
18351 effect
18352 is
18353 a
18354 tar‐
18355 get
18356 that
18357 is
18358 cre‐
18359 ated
18360 as
18361 a
18362 side
18363 effect
18364 of
18365 build‐
18366 ing
18367 other
18368 tar‐
18369 gets.
18370 For
18371 exam‐
18372 ple,
18373 a
18374 Win‐
18375 dows
18376 PDB
18377 file
18378 is
18379 cre‐
18380 ated
18381 as
18382 a
18383 side
18384 effect
18385 of
18386 build‐
18387 ing
18388 the
18389 .obj
18390 files
18391 for
18392 a
18393 static
18394 library.
18395 If
18396 a
18397 tar‐
18398 get
18399 is
18400 a
18401 side
18402 effect
18403 of
18404 mul‐
18405 ti‐
18406 ple
18407 build
18408 com‐
18409 mands,
18410 scons
18411 will
18412 ensure
18413 that
18414 only
18415 one
18416 set
18417 of
18418 com‐
18419 mands
18420 is
18421 exe‐
18422 cuted
18423 at
18424 a
18425 time.
18426 Con‐
18427 se‐
18428 quently,
18429 you
18430 only
18431 need
18432 to
18433 use
18434 this
18435 method
18436 for
18437 side-
18438 effect
18439 tar‐
18440 gets
18441 that
18442 are
18443 built
18444 as
18445 a
18446 result
18447 of
18448 mul‐
18449 ti‐
18450 ple
18451 build
18452 com‐
18453 mands.
18454
18455
18456 Source‐
18457 Code(entries,
18458 builder)
18459
18460 env.Source‐
18461 Code(entries,
18462 builder)
18463 Arrange
18464 for
18465 non-
18466 exis‐
18467 tent
18468 source
18469 files
18470 to
18471 be
18472 fetched
18473 from
18474 a
18475 source
18476 code
18477 man‐
18478 age‐
18479 ment
18480 sys‐
18481 tem
18482 using
18483 the
18484 spec‐
18485 i‐
18486 fied
18487 builder.
18488 The
18489 spec‐
18490 i‐
18491 fied
18492 entries
18493 may
18494 be
18495 a
18496 Node,
18497 string
18498 or
18499 list
18500 of
18501 both,
18502 and
18503 may
18504 rep‐
18505 re‐
18506 sent
18507 either
18508 indi‐
18509 vid‐
18510 ual
18511 source
18512 files
18513 or
18514 direc‐
18515 to‐
18516 ries
18517 in
18518 which
18519 source
18520 files
18521 can
18522 be
18523 found.
18524
18525 For
18526 any
18527 non-
18528 exis‐
18529 tent
18530 source
18531 files,
18532 scons
18533 will
18534 search
18535 up
18536 the
18537 direc‐
18538 tory
18539 tree
18540 and
18541 use
18542 the
18543 first
18544 Source‐
18545 Code
18546 builder
18547 it
18548 finds.
18549 The
18550 spec‐
18551 i‐
18552 fied
18553 builder
18554 may
18555 be
18556 None,
18557 in
18558 which
18559 case
18560 scons
18561 will
18562 not
18563 use
18564 a
18565 builder
18566 to
18567 fetch
18568 source
18569 files
18570 for
18571 the
18572 spec‐
18573 i‐
18574 fied
18575 entries,
18576 even
18577 if
18578 a
18579 Source‐
18580 Code
18581 builder
18582 has
18583 been
18584 spec‐
18585 i‐
18586 fied
18587 for
18588 a
18589 direc‐
18590 tory
18591 higher
18592 up
18593 the
18594 tree.
18595
18596 scons
18597 will,
18598 by
18599 default,
18600 fetch
18601 files
18602 from
18603 SCCS
18604 or
18605 RCS
18606 sub‐
18607 di‐
18608 rec‐
18609 to‐
18610 ries
18611 with‐
18612 out
18613 explicit
18614 con‐
18615 fig‐
18616 u‐
18617 ra‐
18618 tion.
18619 This
18620 takes
18621 some
18622 extra
18623 pro‐
18624 cess‐
18625 ing
18626 time
18627 to
18628 search
18629 for
18630 the
18631 nec‐
18632 es‐
18633 sary
18634 source
18635 code
18636 man‐
18637 age‐
18638 ment
18639 files
18640 on
18641 disk.
18642 You
18643 can
18644 avoid
18645 these
18646 extra
18647 searches
18648 and
18649 speed
18650 up
18651 your
18652 build
18653 a
18654 lit‐
18655 tle
18656 by
18657 dis‐
18658 abling
18659 these
18660 searches
18661 as
18662 fol‐
18663 lows:
18664
18665 env.SourceCode('.', None)
18666
18667
18668 Note
18669 that
18670 if
18671 the
18672 spec‐
18673 i‐
18674 fied
18675 builder
18676 is
18677 one
18678 you
18679 cre‐
18680 ate
18681 by
18682 hand,
18683 it
18684 must
18685 have
18686 an
18687 asso‐
18688 ci‐
18689 ated
18690 con‐
18691 struc‐
18692 tion
18693 envi‐
18694 ron‐
18695 ment
18696 to
18697 use
18698 when
18699 fetch‐
18700 ing
18701 a
18702 source
18703 file.
18704
18705 scons
18706 pro‐
18707 vides
18708 a
18709 set
18710 of
18711 canned
18712 fac‐
18713 tory
18714 func‐
18715 tions
18716 that
18717 return
18718 appro‐
18719 pri‐
18720 ate
18721 Builders
18722 for
18723 var‐
18724 i‐
18725 ous
18726 pop‐
18727 u‐
18728 lar
18729 source
18730 code
18731 man‐
18732 age‐
18733 ment
18734 sys‐
18735 tems.
18736 Canon‐
18737 i‐
18738 cal
18739 exam‐
18740 ples
18741 of
18742 invo‐
18743 ca‐
18744 tion
18745 include:
18746
18747 env.SourceCode('.', env.BitKeeper('/usr/local/BKsources'))
18748 env.SourceCode('src', env.CVS('/usr/local/CVSROOT'))
18749 env.SourceCode('/', env.RCS())
18750 env.SourceCode(['f1.c', 'f2.c'], env.SCCS())
18751 env.SourceCode('no_source.c', None)
18752
18753
18754 env.subst(input,
18755 [raw,
18756 tar‐
18757 get,
18758 source,
18759 conv])
18760 Per‐
18761 forms
18762 con‐
18763 struc‐
18764 tion
18765 vari‐
18766 able
18767 inter‐
18768 po‐
18769 la‐
18770 tion
18771 on
18772 the
18773 spec‐
18774 i‐
18775 fied
18776 string
18777 or
18778 sequence
18779 argu‐
18780 ment
18781 input.
18782
18783 By
18784 default,
18785 lead‐
18786 ing
18787 or
18788 trail‐
18789 ing
18790 white
18791 space
18792 will
18793 be
18794 removed
18795 from
18796 the
18797 result.
18798 and
18799 all
18800 sequences
18801 of
18802 white
18803 space
18804 will
18805 be
18806 com‐
18807 pressed
18808 to
18809 a
18810 sin‐
18811 gle
18812 space
18813 char‐
18814 ac‐
18815 ter.
18816 Addi‐
18817 tion‐
18818 ally,
18819 any
18820 $(
18821 and
18822 $)
18823 char‐
18824 ac‐
18825 ter
18826 sequences
18827 will
18828 be
18829 stripped
18830 from
18831 the
18832 returned
18833 string,
18834 The
18835 optional
18836 raw
18837 argu‐
18838 ment
18839 may
18840 be
18841 set
18842 to
18843 1
18844 if
18845 you
18846 want
18847 to
18848 pre‐
18849 serve
18850 white
18851 space
18852 and
18853 $(-$)
18854 sequences.
18855 The
18856 raw
18857 argu‐
18858 ment
18859 may
18860 be
18861 set
18862 to
18863 2
18864 if
18865 you
18866 want
18867 to
18868 strip
18869 all
18870 char‐
18871 ac‐
18872 ters
18873 between
18874 any
18875 $(
18876 and
18877 $)
18878 pairs
18879 (as
18880 is
18881 done
18882 for
18883 sig‐
18884 na‐
18885 ture
18886 cal‐
18887 cu‐
18888 la‐
18889 tion).
18890
18891 If
18892 the
18893 input
18894 is
18895 a
18896 sequence
18897 (list
18898 or
18899 tuple),
18900 the
18901 indi‐
18902 vid‐
18903 ual
18904 ele‐
18905 ments
18906 of
18907 the
18908 sequence
18909 will
18910 be
18911 expanded,
18912 and
18913 the
18914 results
18915 will
18916 be
18917 returned
18918 as
18919 a
18920 list.
18921
18922 The
18923 optional
18924 tar‐
18925 get
18926 and
18927 source
18928 key‐
18929 word
18930 argu‐
18931 ments
18932 must
18933 be
18934 set
18935 to
18936 lists
18937 of
18938 tar‐
18939 get
18940 and
18941 source
18942 nodes,
18943 respec‐
18944 tively,
18945 if
18946 you
18947 want
18948 the
18949 $TAR‐
18950 GET,
18951 $TAR‐
18952 GETS,
18953 $SOURCE
18954 and
18955 $SOURCES
18956 to
18957 be
18958 avail‐
18959 able
18960 for
18961 expan‐
18962 sion.
18963 This
18964 is
18965 usu‐
18966 ally
18967 nec‐
18968 es‐
18969 sary
18970 if
18971 you
18972 are
18973 call‐
18974 ing
18975 env.subst()
18976 from
18977 within
18978 a
18979 Python
18980 func‐
18981 tion
18982 used
18983 as
18984 an
18985 SCons
18986 action.
18987
18988 Returned
18989 string
18990 val‐
18991 ues
18992 or
18993 sequence
18994 ele‐
18995 ments
18996 are
18997 con‐
18998 verted
18999 to
19000 their
19001 string
19002 rep‐
19003 re‐
19004 sen‐
19005 ta‐
19006 tion
19007 by
19008 default.
19009 The
19010 optional
19011 conv
19012 argu‐
19013 ment
19014 may
19015 spec‐
19016 ify
19017 a
19018 con‐
19019 ver‐
19020 sion
19021 func‐
19022 tion
19023 that
19024 will
19025 be
19026 used
19027 in
19028 place
19029 of
19030 the
19031 default.
19032 For
19033 exam‐
19034 ple,
19035 if
19036 you
19037 want
19038 Python
19039 objects
19040 (includ‐
19041 ing
19042 SCons
19043 Nodes)
19044 to
19045 be
19046 returned
19047 as
19048 Python
19049 objects,
19050 you
19051 can
19052 use
19053 the
19054 Python
19055 lambda
19056 idiom
19057 to
19058 pass
19059 in
19060 an
19061 unnamed
19062 func‐
19063 tion
19064 that
19065 sim‐
19066 ply
19067 returns
19068 its
19069 uncon‐
19070 verted
19071 argu‐
19072 ment.
19073
19074 Exam‐
19075 ple:
19076
19077 print env.subst("The C compiler is: $CC")
19078
19079 def compile(target, source, env):
19080 sourceDir = env.subst("${SOURCE.srcdir}",
19081 target=target,
19082 source=source)
19083
19084 source_nodes = env.subst('$EXPAND_TO_NODELIST',
19085 conv=lambda x: x)
19086
19087
19088
19089 SourceS‐
19090 ig‐
19091 na‐
19092 tures(type)
19093
19094 env.SourceS‐
19095 ig‐
19096 na‐
19097 tures(type)
19098 Note:
19099 Although
19100 it
19101 is
19102 not
19103 yet
19104 offi‐
19105 cially
19106 dep‐
19107 re‐
19108 cated,
19109 use
19110 of
19111 this
19112 func‐
19113 tion
19114 is
19115 dis‐
19116 cour‐
19117 aged.
19118 See
19119 the
19120 Decider()
19121 func‐
19122 tion
19123 for
19124 a
19125 more
19126 flex‐
19127 i‐
19128 ble
19129 and
19130 straight‐
19131 for‐
19132 ward
19133 way
19134 to
19135 con‐
19136 fig‐
19137 ure
19138 SCons'
19139 deci‐
19140 sion-
19141 mak‐
19142 ing.
19143
19144 The
19145 SourceS‐
19146 ig‐
19147 na‐
19148 tures()
19149 func‐
19150 tion
19151 tells
19152 scons
19153 how
19154 to
19155 decide
19156 if
19157 a
19158 source
19159 file
19160 (a
19161 file
19162 that
19163 is
19164 not
19165 built
19166 from
19167 any
19168 other
19169 files)
19170 has
19171 changed
19172 since
19173 the
19174 last
19175 time
19176 it
19177 was
19178 used
19179 to
19180 build
19181 a
19182 par‐
19183 tic‐
19184 u‐
19185 lar
19186 tar‐
19187 get
19188 file.
19189 Legal
19190 val‐
19191 ues
19192 are
19193 MD5
19194 or
19195 time‐
19196 stamp.
19197
19198 If
19199 the
19200 envi‐
19201 ron‐
19202 ment
19203 method
19204 is
19205 used,
19206 the
19207 spec‐
19208 i‐
19209 fied
19210 type
19211 of
19212 source
19213 sig‐
19214 na‐
19215 ture
19216 is
19217 only
19218 used
19219 when
19220 decid‐
19221 ing
19222 whether
19223 tar‐
19224 gets
19225 built
19226 with
19227 that
19228 envi‐
19229 ron‐
19230 ment
19231 are
19232 up-
19233 to-
19234 date
19235 or
19236 must
19237 be
19238 rebuilt.
19239 If
19240 the
19241 global
19242 func‐
19243 tion
19244 is
19245 used,
19246 the
19247 spec‐
19248 i‐
19249 fied
19250 type
19251 of
19252 source
19253 sig‐
19254 na‐
19255 ture
19256 becomes
19257 the
19258 default
19259 used
19260 for
19261 all
19262 deci‐
19263 sions
19264 about
19265 whether
19266 tar‐
19267 gets
19268 are
19269 up-
19270 to-
19271 date.
19272
19273 MD5
19274 means
19275 scons
19276 decides
19277 that
19278 a
19279 source
19280 file
19281 has
19282 changed
19283 if
19284 the
19285 MD5
19286 check‐
19287 sum
19288 of
19289 its
19290 con‐
19291 tents
19292 has
19293 changed
19294 since
19295 the
19296 last
19297 time
19298 it
19299 was
19300 used
19301 to
19302 rebuild
19303 a
19304 par‐
19305 tic‐
19306 u‐
19307 lar
19308 tar‐
19309 get
19310 file.
19311
19312 time‐
19313 stamp
19314 means
19315 scons
19316 decides
19317 that
19318 a
19319 source
19320 file
19321 has
19322 changed
19323 if
19324 its
19325 time‐
19326 stamp
19327 (mod‐
19328 i‐
19329 fi‐
19330 ca‐
19331 tion
19332 time)
19333 has
19334 changed
19335 since
19336 the
19337 last
19338 time
19339 it
19340 was
19341 used
19342 to
19343 rebuild
19344 a
19345 par‐
19346 tic‐
19347 u‐
19348 lar
19349 tar‐
19350 get
19351 file.
19352 (Note
19353 that
19354 although
19355 this
19356 is
19357 sim‐
19358 i‐
19359 lar
19360 to
19361 the
19362 behav‐
19363 ior
19364 of
19365 Make,
19366 by
19367 default
19368 it
19369 will
19370 also
19371 rebuild
19372 if
19373 the
19374 depen‐
19375 dency
19376 is
19377 older
19378 than
19379 the
19380 last
19381 time
19382 it
19383 was
19384 used
19385 to
19386 rebuild
19387 the
19388 tar‐
19389 get
19390 file.)
19391
19392 There
19393 is
19394 no
19395 dif‐
19396 fer‐
19397 ent
19398 between
19399 the
19400 two
19401 behav‐
19402 iors
19403 for
19404 Python
19405 Value()
19406 node
19407 objects.
19408
19409 MD5
19410 sig‐
19411 na‐
19412 tures
19413 take
19414 longer
19415 to
19416 com‐
19417 pute,
19418 but
19419 are
19420 more
19421 accu‐
19422 rate
19423 than
19424 time‐
19425 stamp
19426 sig‐
19427 na‐
19428 tures.
19429 The
19430 default
19431 value
19432 is
19433 MD5.
19434
19435 Note
19436 that
19437 the
19438 default
19439 Tar‐
19440 getSig‐
19441 na‐
19442 tures()
19443 set‐
19444 ting
19445 (see
19446 below)
19447 is
19448 to
19449 use
19450 this
19451 SourceS‐
19452 ig‐
19453 na‐
19454 tures()
19455 set‐
19456 ting
19457 for
19458 any
19459 tar‐
19460 get
19461 files
19462 that
19463 are
19464 used
19465 to
19466 build
19467 other
19468 tar‐
19469 get
19470 files.
19471 Con‐
19472 se‐
19473 quently,
19474 chang‐
19475 ing
19476 the
19477 value
19478 of
19479 SourceS‐
19480 ig‐
19481 na‐
19482 tures()
19483 will,
19484 by
19485 default,
19486 affect
19487 the
19488 up-
19489 to-
19490 date
19491 deci‐
19492 sion
19493 for
19494 all
19495 files
19496 in
19497 the
19498 build
19499 (or
19500 all
19501 files
19502 built
19503 with
19504 a
19505 spe‐
19506 cific
19507 con‐
19508 struc‐
19509 tion
19510 envi‐
19511 ron‐
19512 ment
19513 when
19514 env.SourceS‐
19515 ig‐
19516 na‐
19517 tures()
19518 is
19519 used).
19520
19521
19522 Split(arg)
19523
19524 env.Split(arg)
19525 Returns
19526 a
19527 list
19528 of
19529 file
19530 names
19531 or
19532 other
19533 objects.
19534 If
19535 arg
19536 is
19537 a
19538 string,
19539 it
19540 will
19541 be
19542 split
19543 on
19544 strings
19545 of
19546 white-
19547 space
19548 char‐
19549 ac‐
19550 ters
19551 within
19552 the
19553 string,
19554 mak‐
19555 ing
19556 it
19557 eas‐
19558 ier
19559 to
19560 write
19561 long
19562 lists
19563 of
19564 file
19565 names.
19566 If
19567 arg
19568 is
19569 already
19570 a
19571 list,
19572 the
19573 list
19574 will
19575 be
19576 returned
19577 untouched.
19578 If
19579 arg
19580 is
19581 any
19582 other
19583 type
19584 of
19585 object,
19586 it
19587 will
19588 be
19589 returned
19590 as
19591 a
19592 list
19593 con‐
19594 tain‐
19595 ing
19596 just
19597 the
19598 object.
19599
19600 Exam‐
19601 ple:
19602
19603 files = Split("f1.c f2.c f3.c")
19604 files = env.Split("f4.c f5.c f6.c")
19605 files = Split("""
19606 f7.c
19607 f8.c
19608 f9.c
19609 """)
19610
19611
19612 Tag(node,
19613 tags)
19614 Anno‐
19615 tates
19616 file
19617 or
19618 direc‐
19619 tory
19620 Nodes
19621 with
19622 infor‐
19623 ma‐
19624 tion
19625 about
19626 how
19627 the
19628 Pack‐
19629 age()
19630 Builder
19631 should
19632 pack‐
19633 age
19634 those
19635 files
19636 or
19637 direc‐
19638 to‐
19639 ries.
19640 All
19641 tags
19642 are
19643 optional.
19644
19645 Exam‐
19646 ples:
19647
19648 # makes sure the built library will be installed with 0644 file
19649 # access mode
19650 Tag( Library( 'lib.c' ), UNIX_ATTR="0644" )
19651
19652 # marks file2.txt to be a documentation file
19653 Tag( 'file2.txt', DOC )
19654 </sum‐
19655 mary>
19656 </builder>
19657
19658
19659 Tar‐
19660 getSig‐
19661 na‐
19662 tures(type)
19663
19664 env.Tar‐
19665 getSig‐
19666 na‐
19667 tures(type)
19668 Note:
19669 Although
19670 it
19671 is
19672 not
19673 yet
19674 offi‐
19675 cially
19676 dep‐
19677 re‐
19678 cated,
19679 use
19680 of
19681 this
19682 func‐
19683 tion
19684 is
19685 dis‐
19686 cour‐
19687 aged.
19688 See
19689 the
19690 Decider()
19691 func‐
19692 tion
19693 for
19694 a
19695 more
19696 flex‐
19697 i‐
19698 ble
19699 and
19700 straight‐
19701 for‐
19702 ward
19703 way
19704 to
19705 con‐
19706 fig‐
19707 ure
19708 SCons'
19709 deci‐
19710 sion-
19711 mak‐
19712 ing.
19713
19714 The
19715 Tar‐
19716 getSig‐
19717 na‐
19718 tures()
19719 func‐
19720 tion
19721 tells
19722 scons
19723 how
19724 to
19725 decide
19726 if
19727 a
19728 tar‐
19729 get
19730 file
19731 (a
19732 file
19733 that
19734 is
19735 built
19736 from
19737 any
19738 other
19739 files)
19740 has
19741 changed
19742 since
19743 the
19744 last
19745 time
19746 it
19747 was
19748 used
19749 to
19750 build
19751 some
19752 other
19753 tar‐
19754 get
19755 file.
19756 Legal
19757 val‐
19758 ues
19759 are
19760 build;
19761 con‐
19762 tent
19763 (or
19764 its
19765 syn‐
19766 onym
19767 MD5);
19768 time‐
19769 stamp;
19770 or
19771 source.
19772
19773 If
19774 the
19775 envi‐
19776 ron‐
19777 ment
19778 method
19779 is
19780 used,
19781 the
19782 spec‐
19783 i‐
19784 fied
19785 type
19786 of
19787 tar‐
19788 get
19789 sig‐
19790 na‐
19791 ture
19792 is
19793 only
19794 used
19795 for
19796 tar‐
19797 gets
19798 built
19799 with
19800 that
19801 envi‐
19802 ron‐
19803 ment.
19804 If
19805 the
19806 global
19807 func‐
19808 tion
19809 is
19810 used,
19811 the
19812 spec‐
19813 i‐
19814 fied
19815 type
19816 of
19817 sig‐
19818 na‐
19819 ture
19820 becomes
19821 the
19822 default
19823 used
19824 for
19825 all
19826 tar‐
19827 get
19828 files
19829 that
19830 don't
19831 have
19832 an
19833 explicit
19834 tar‐
19835 get
19836 sig‐
19837 na‐
19838 ture
19839 type
19840 spec‐
19841 i‐
19842 fied
19843 for
19844 their
19845 envi‐
19846 ron‐
19847 ments.
19848
19849 con‐
19850 tent
19851 (or
19852 its
19853 syn‐
19854 onym
19855 MD5)
19856 means
19857 scons
19858 decides
19859 that
19860 a
19861 tar‐
19862 get
19863 file
19864 has
19865 changed
19866 if
19867 the
19868 MD5
19869 check‐
19870 sum
19871 of
19872 its
19873 con‐
19874 tents
19875 has
19876 changed
19877 since
19878 the
19879 last
19880 time
19881 it
19882 was
19883 used
19884 to
19885 rebuild
19886 some
19887 other
19888 tar‐
19889 get
19890 file.
19891 This
19892 means
19893 scons
19894 will
19895 open
19896 up
19897 MD5
19898 sum
19899 the
19900 con‐
19901 tents
19902 of
19903 tar‐
19904 get
19905 files
19906 after
19907 they're
19908 built,
19909 and
19910 may
19911 decide
19912 that
19913 it
19914 does
19915 not
19916 need
19917 to
19918 rebuild
19919 "down‐
19920 stream"
19921 tar‐
19922 get
19923 files
19924 if
19925 a
19926 file
19927 was
19928 rebuilt
19929 with
19930 exactly
19931 the
19932 same
19933 con‐
19934 tents
19935 as
19936 the
19937 last
19938 time.
19939
19940 time‐
19941 stamp
19942 means
19943 scons
19944 decides
19945 that
19946 a
19947 tar‐
19948 get
19949 file
19950 has
19951 changed
19952 if
19953 its
19954 time‐
19955 stamp
19956 (mod‐
19957 i‐
19958 fi‐
19959 ca‐
19960 tion
19961 time)
19962 has
19963 changed
19964 since
19965 the
19966 last
19967 time
19968 it
19969 was
19970 used
19971 to
19972 rebuild
19973 some
19974 other
19975 tar‐
19976 get
19977 file.
19978 (Note
19979 that
19980 although
19981 this
19982 is
19983 sim‐
19984 i‐
19985 lar
19986 to
19987 the
19988 behav‐
19989 ior
19990 of
19991 Make,
19992 by
19993 default
19994 it
19995 will
19996 also
19997 rebuild
19998 if
19999 the
20000 depen‐
20001 dency
20002 is
20003 older
20004 than
20005 the
20006 last
20007 time
20008 it
20009 was
20010 used
20011 to
20012 rebuild
20013 the
20014 tar‐
20015 get
20016 file.)
20017
20018 source
20019 means
20020 scons
20021 decides
20022 that
20023 a
20024 tar‐
20025 get
20026 file
20027 has
20028 changed
20029 as
20030 spec‐
20031 i‐
20032 fied
20033 by
20034 the
20035 cor‐
20036 re‐
20037 spond‐
20038 ing
20039 SourceS‐
20040 ig‐
20041 na‐
20042 tures()
20043 set‐
20044 ting
20045 (MD5
20046 or
20047 time‐
20048 stamp).
20049 This
20050 means
20051 that
20052 scons
20053 will
20054 treat
20055 all
20056 input
20057 files
20058 to
20059 a
20060 tar‐
20061 get
20062 the
20063 same
20064 way,
20065 regard‐
20066 less
20067 of
20068 whether
20069 they
20070 are
20071 source
20072 files
20073 or
20074 have
20075 been
20076 built
20077 from
20078 other
20079 files.
20080
20081 build
20082 means
20083 scons
20084 decides
20085 that
20086 a
20087 tar‐
20088 get
20089 file
20090 has
20091 changed
20092 if
20093 it
20094 has
20095 been
20096 rebuilt
20097 in
20098 this
20099 invo‐
20100 ca‐
20101 tion
20102 or
20103 if
20104 its
20105 con‐
20106 tent
20107 or
20108 time‐
20109 stamp
20110 have
20111 changed
20112 as
20113 spec‐
20114 i‐
20115 fied
20116 by
20117 the
20118 cor‐
20119 re‐
20120 spond‐
20121 ing
20122 SourceS‐
20123 ig‐
20124 na‐
20125 tures()
20126 set‐
20127 ting.
20128 This
20129 "prop‐
20130 a‐
20131 gates"
20132 the
20133 sta‐
20134 tus
20135 of
20136 a
20137 rebuilt
20138 file
20139 so
20140 that
20141 other
20142 "down‐
20143 stream"
20144 tar‐
20145 get
20146 files
20147 will
20148 always
20149 be
20150 rebuilt,
20151 even
20152 if
20153 the
20154 con‐
20155 tents
20156 or
20157 the
20158 time‐
20159 stamp
20160 have
20161 not
20162 changed.
20163
20164 build
20165 sig‐
20166 na‐
20167 tures
20168 are
20169 fastest
20170 because
20171 con‐
20172 tent
20173 (or
20174 MD5)
20175 sig‐
20176 na‐
20177 tures
20178 take
20179 longer
20180 to
20181 com‐
20182 pute,
20183 but
20184 are
20185 more
20186 accu‐
20187 rate
20188 than
20189 time‐
20190 stamp
20191 sig‐
20192 na‐
20193 tures,
20194 and
20195 can
20196 pre‐
20197 vent
20198 unnec‐
20199 es‐
20200 sary
20201 "down‐
20202 stream"
20203 rebuilds
20204 when
20205 a
20206 tar‐
20207 get
20208 file
20209 is
20210 rebuilt
20211 to
20212 the
20213 exact
20214 same
20215 con‐
20216 tents
20217 as
20218 the
20219 pre‐
20220 vi‐
20221 ous
20222 build.
20223 The
20224 source
20225 set‐
20226 ting
20227 pro‐
20228 vides
20229 the
20230 most
20231 con‐
20232 sis‐
20233 tent
20234 behav‐
20235 ior
20236 when
20237 other
20238 tar‐
20239 get
20240 files
20241 may
20242 be
20243 rebuilt
20244 from
20245 both
20246 source
20247 and
20248 tar‐
20249 get
20250 input
20251 files.
20252 The
20253 default
20254 value
20255 is
20256 source.
20257
20258 Because
20259 the
20260 default
20261 set‐
20262 ting
20263 is
20264 source,
20265 using
20266 SourceS‐
20267 ig‐
20268 na‐
20269 tures()
20270 is
20271 gen‐
20272 er‐
20273 ally
20274 prefer‐
20275 able
20276 to
20277 Tar‐
20278 getSig‐
20279 na‐
20280 tures(),
20281 so
20282 that
20283 the
20284 up-
20285 to-
20286 date
20287 deci‐
20288 sion
20289 will
20290 be
20291 con‐
20292 sis‐
20293 tent
20294 for
20295 all
20296 files
20297 (or
20298 all
20299 files
20300 built
20301 with
20302 a
20303 spe‐
20304 cific
20305 con‐
20306 struc‐
20307 tion
20308 envi‐
20309 ron‐
20310 ment).
20311 Use
20312 of
20313 Tar‐
20314 getSig‐
20315 na‐
20316 tures()
20317 pro‐
20318 vides
20319 spe‐
20320 cific
20321 con‐
20322 trol
20323 for
20324 how
20325 built
20326 tar‐
20327 get
20328 files
20329 affect
20330 their
20331 "down‐
20332 stream"
20333 depen‐
20334 den‐
20335 cies.
20336
20337
20338 Tool(string[,tool‐
20339 path,
20340 **kw])
20341 Returns
20342 a
20343 callable
20344 object
20345 that
20346 can
20347 be
20348 used
20349 to
20350 ini‐
20351 tial‐
20352 ize
20353 a
20354 con‐
20355 struc‐
20356 tion
20357 envi‐
20358 ron‐
20359 ment
20360 using
20361 the
20362 tools
20363 key‐
20364 word
20365 of
20366 the
20367 Envi‐
20368 ron‐
20369 ment()
20370 method.
20371 The
20372 object
20373 may
20374 be
20375 called
20376 with
20377 a
20378 con‐
20379 struc‐
20380 tion
20381 envi‐
20382 ron‐
20383 ment
20384 as
20385 an
20386 argu‐
20387 ment,
20388 in
20389 which
20390 case
20391 the
20392 object
20393 will
20394 add
20395 the
20396 nec‐
20397 es‐
20398 sary
20399 vari‐
20400 ables
20401 to
20402 the
20403 con‐
20404 struc‐
20405 tion
20406 envi‐
20407 ron‐
20408 ment
20409 and
20410 the
20411 name
20412 of
20413 the
20414 tool
20415 will
20416 be
20417 added
20418 to
20419 the
20420 $TOOLS
20421 con‐
20422 struc‐
20423 tion
20424 vari‐
20425 able.
20426
20427 Addi‐
20428 tional
20429 key‐
20430 word
20431 argu‐
20432 ments
20433 are
20434 passed
20435 to
20436 the
20437 tool's
20438 gen‐
20439 er‐
20440 ate()
20441 method.
20442
20443 Exam‐
20444 ples:
20445
20446 env = Environment(tools = [ Tool('msvc') ])
20447
20448 env = Environment()
20449 t = Tool('msvc')
20450 t(env) # adds 'msvc' to the TOOLS variable
20451 u = Tool('opengl', toolpath = ['tools'])
20452 u(env) # adds 'opengl' to the TOOLS variable
20453
20454 env.Tool(string[,tool‐
20455 path,
20456 **kw])
20457 Applies
20458 the
20459 callable
20460 object
20461 for
20462 the
20463 spec‐
20464 i‐
20465 fied
20466 tool
20467 string
20468 to
20469 the
20470 envi‐
20471 ron‐
20472 ment
20473 through
20474 which
20475 the
20476 method
20477 was
20478 called.
20479
20480 Addi‐
20481 tional
20482 key‐
20483 word
20484 argu‐
20485 ments
20486 are
20487 passed
20488 to
20489 the
20490 tool's
20491 gen‐
20492 er‐
20493 ate()
20494 method.
20495
20496 env.Tool('gcc')
20497 env.Tool('opengl', toolpath = ['build/tools'])
20498
20499
20500 Value(value,
20501 [built_value])
20502
20503 env.Value(value,
20504 [built_value])
20505 Returns
20506 a
20507 Node
20508 object
20509 rep‐
20510 re‐
20511 sent‐
20512 ing
20513 the
20514 spec‐
20515 i‐
20516 fied
20517 Python
20518 value.
20519 Value
20520 Nodes
20521 can
20522 be
20523 used
20524 as
20525 depen‐
20526 den‐
20527 cies
20528 of
20529 tar‐
20530 gets.
20531 If
20532 the
20533 result
20534 of
20535 call‐
20536 ing
20537 str(value)
20538 changes
20539 between
20540 SCons
20541 runs,
20542 any
20543 tar‐
20544 gets
20545 depend‐
20546 ing
20547 on
20548 Value(value)
20549 will
20550 be
20551 rebuilt.
20552 (This
20553 is
20554 true
20555 even
20556 when
20557 using
20558 time‐
20559 stamps
20560 to
20561 decide
20562 if
20563 files
20564 are
20565 up-
20566 to-
20567 date.)
20568 When
20569 using
20570 time‐
20571 stamp
20572 source
20573 sig‐
20574 na‐
20575 tures,
20576 Value
20577 Nodes'
20578 time‐
20579 stamps
20580 are
20581 equal
20582 to
20583 the
20584 sys‐
20585 tem
20586 time
20587 when
20588 the
20589 Node
20590 is
20591 cre‐
20592 ated.
20593
20594 The
20595 returned
20596 Value
20597 Node
20598 object
20599 has
20600 a
20601 write()
20602 method
20603 that
20604 can
20605 be
20606 used
20607 to
20608 "build"
20609 a
20610 Value
20611 Node
20612 by
20613 set‐
20614 ting
20615 a
20616 new
20617 value.
20618 The
20619 optional
20620 built_value
20621 argu‐
20622 ment
20623 can
20624 be
20625 spec‐
20626 i‐
20627 fied
20628 when
20629 the
20630 Value
20631 Node
20632 is
20633 cre‐
20634 ated
20635 to
20636 indi‐
20637 cate
20638 the
20639 Node
20640 should
20641 already
20642 be
20643 con‐
20644 sid‐
20645 ered
20646 "built."
20647 There
20648 is
20649 a
20650 cor‐
20651 re‐
20652 spond‐
20653 ing
20654 read()
20655 method
20656 that
20657 will
20658 return
20659 the
20660 built
20661 value
20662 of
20663 the
20664 Node.
20665
20666 Exam‐
20667 ples:
20668
20669 env = Environment()
20670
20671 def create(target, source, env):
20672 # A function that will write a 'prefix=$SOURCE'
20673 # string into the file name specified as the
20674 # $TARGET.
20675 f = open(str(target[0]), 'wb')
20676 f.write('prefix=' + source[0].get_contents())
20677
20678 # Fetch the prefix= argument, if any, from the command
20679 # line, and use /usr/local as the default.
20680 prefix = ARGUMENTS.get('prefix', '/usr/local')
20681
20682 # Attach a .Config() builder for the above function action
20683 # to the construction environment.
20684 env['BUILDERS']['Config'] = Builder(action = create)
20685 env.Config(target = 'package-config', source = Value(prefix))
20686
20687 def build_value(target, source, env):
20688 # A function that "builds" a Python Value by updating
20689 # the the Python value with the contents of the file
20690 # specified as the source of the Builder call ($SOURCE).
20691 target[0].write(source[0].get_contents())
20692
20693 output = env.Value('before')
20694 input = env.Value('after')
20695
20696 # Attach a .UpdateValue() builder for the above function
20697 # action to the construction environment.
20698 env['BUILDERS']['UpdateValue'] = Builder(action = build_value)
20699 env.UpdateValue(target = Value(output), source = Value(input))
20700
20701
20702 Vari‐
20703 ant‐
20704 Dir(vari‐
20705 ant_dir,
20706 src_dir,
20707 [dupli‐
20708 cate])
20709
20710 env.Vari‐
20711 ant‐
20712 Dir(vari‐
20713 ant_dir,
20714 src_dir,
20715 [dupli‐
20716 cate])
20717 In
20718 effect,
20719 the
20720 src_dir
20721 direc‐
20722 tory
20723 tree
20724 is
20725 copied
20726 to
20727 vari‐
20728 ant_dir
20729 so
20730 a
20731 build
20732 can
20733 be
20734 per‐
20735 formed
20736 there.
20737 Vari‐
20738 ant‐
20739 Dir()
20740 can
20741 be
20742 called
20743 mul‐
20744 ti‐
20745 ple
20746 times
20747 with
20748 the
20749 same
20750 src_dir
20751 to
20752 set
20753 up
20754 mul‐
20755 ti‐
20756 ple
20757 builds
20758 with
20759 dif‐
20760 fer‐
20761 ent
20762 options
20763 (vari‐
20764 ants).
20765 src_dir
20766 must
20767 be
20768 in
20769 or
20770 under‐
20771 neath
20772 the
20773 SCon‐
20774 struct
20775 file's
20776 direc‐
20777 tory,
20778 and
20779 vari‐
20780 ant_dir
20781 may
20782 not
20783 be
20784 under‐
20785 neath
20786 the
20787 src_dir
20788 .
20789
20790 The
20791 default
20792 behav‐
20793 ior
20794 is
20795 for
20796 scons
20797 to
20798 dupli‐
20799 cate
20800 the
20801 source
20802 files
20803 in
20804 the
20805 vari‐
20806 ant
20807 tree
20808 and
20809 then
20810 build
20811 the
20812 derived
20813 files
20814 within
20815 the
20816 vari‐
20817 ant
20818 tree.
20819 This
20820 guar‐
20821 an‐
20822 tees
20823 cor‐
20824 rect
20825 builds
20826 regard‐
20827 less
20828 of
20829 whether
20830 inter‐
20831 me‐
20832 di‐
20833 ate
20834 source
20835 files
20836 are
20837 gen‐
20838 er‐
20839 ated
20840 dur‐
20841 ing
20842 the
20843 build,
20844 whether
20845 pre‐
20846 proces‐
20847 sors
20848 or
20849 other
20850 scan‐
20851 ners
20852 search
20853 for
20854 included
20855 files
20856 rel‐
20857 a‐
20858 tive
20859 to
20860 the
20861 source
20862 file,
20863 or
20864 whether
20865 indi‐
20866 vid‐
20867 ual
20868 com‐
20869 pil‐
20870 ers
20871 or
20872 other
20873 invoked
20874 tools
20875 are
20876 hard-
20877 coded
20878 to
20879 put
20880 derived
20881 files
20882 in
20883 the
20884 same
20885 direc‐
20886 tory
20887 as
20888 source
20889 files.
20890
20891 If
20892 pos‐
20893 si‐
20894 ble
20895 on
20896 the
20897 plat‐
20898 form,
20899 the
20900 dupli‐
20901 ca‐
20902 tion
20903 is
20904 per‐
20905 formed
20906 by
20907 link‐
20908 ing
20909 rather
20910 than
20911 copy‐
20912 ing;
20913 see
20914 also
20915 the
20916 --dupli‐
20917 cate
20918 com‐
20919 mand-
20920 line
20921 option.
20922 More‐
20923 over,
20924 only
20925 the
20926 files
20927 needed
20928 for
20929 the
20930 build
20931 are
20932 dupli‐
20933 cated;
20934 files
20935 and
20936 direc‐
20937 to‐
20938 ries
20939 that
20940 are
20941 not
20942 used
20943 are
20944 not
20945 present
20946 in
20947 vari‐
20948 ant_dir.
20949
20950 Dupli‐
20951 cat‐
20952 ing
20953 the
20954 source
20955 tree
20956 may
20957 be
20958 dis‐
20959 abled
20960 by
20961 set‐
20962 ting
20963 dupli‐
20964 cate
20965 to
20966 0.
20967 This
20968 will
20969 cause
20970 scons
20971 to
20972 invoke
20973 Builders
20974 using
20975 the
20976 path
20977 names
20978 of
20979 source
20980 files
20981 in
20982 src_dir
20983 and
20984 the
20985 path
20986 names
20987 of
20988 derived
20989 files
20990 within
20991 vari‐
20992 ant_dir.
20993 This
20994 is
20995 always
20996 more
20997 effi‐
20998 cient
20999 than
21000 dupli‐
21001 cate=1,
21002 and
21003 is
21004 usu‐
21005 ally
21006 safe
21007 for
21008 most
21009 builds
21010 (but
21011 see
21012 above
21013 for
21014 cases
21015 that
21016 may
21017 cause
21018 prob‐
21019 lems).
21020
21021 Note
21022 that
21023 Vari‐
21024 ant‐
21025 Dir()
21026 works
21027 most
21028 nat‐
21029 u‐
21030 rally
21031 with
21032 a
21033 sub‐
21034 sidiary
21035 SCon‐
21036 script
21037 file.
21038 How‐
21039 ever,
21040 you
21041 would
21042 then
21043 call
21044 the
21045 sub‐
21046 sidiary
21047 SCon‐
21048 script
21049 file
21050 not
21051 in
21052 the
21053 source
21054 direc‐
21055 tory,
21056 but
21057 in
21058 the
21059 vari‐
21060 ant_dir
21061 ,
21062 regard‐
21063 less
21064 of
21065 the
21066 value
21067 of
21068 dupli‐
21069 cate.
21070 This
21071 is
21072 how
21073 you
21074 tell
21075 scons
21076 which
21077 vari‐
21078 ant
21079 of
21080 a
21081 source
21082 tree
21083 to
21084 build.
21085 For
21086 exam‐
21087 ple:
21088
21089 VariantDir('build-variant1', 'src')
21090 SConscript('build-variant1/SConscript')
21091 VariantDir('build-variant2', 'src')
21092 SConscript('build-variant2/SConscript')
21093
21094
21095 See
21096 also
21097 the
21098 SCon‐
21099 script()
21100 func‐
21101 tion,
21102 described
21103 above,
21104 for
21105 another
21106 way
21107 to
21108 spec‐
21109 ify
21110 a
21111 vari‐
21112 ant
21113 direc‐
21114 tory
21115 in
21116 con‐
21117 junc‐
21118 tion
21119 with
21120 call‐
21121 ing
21122 a
21123 sub‐
21124 sidiary
21125 SCon‐
21126 script
21127 file.
21128
21129
21130 WhereIs(pro‐
21131 gram,
21132 [path,
21133 pathext,
21134 reject])
21135
21136 env.WhereIs(pro‐
21137 gram,
21138 [path,
21139 pathext,
21140 reject])
21141
21142 Searches
21143 for
21144 the
21145 spec‐
21146 i‐
21147 fied
21148 exe‐
21149 cutable
21150 pro‐
21151 gram,
21152 return‐
21153 ing
21154 the
21155 full
21156 path
21157 name
21158 to
21159 the
21160 pro‐
21161 gram
21162 if
21163 it
21164 is
21165 found,
21166 and
21167 return‐
21168 ing
21169 None
21170 if
21171 not.
21172 Searches
21173 the
21174 spec‐
21175 i‐
21176 fied
21177 path,
21178 the
21179 value
21180 of
21181 the
21182 call‐
21183 ing
21184 envi‐
21185 ron‐
21186 ment's
21187 PATH
21188 (env['ENV']['PATH']),
21189 or
21190 the
21191 user's
21192 cur‐
21193 rent
21194 exter‐
21195 nal
21196 PATH
21197 (os.env‐
21198 i‐
21199 ron['PATH'])
21200 by
21201 default.
21202 On
21203 Win‐
21204 dows
21205 sys‐
21206 tems,
21207 searches
21208 for
21209 exe‐
21210 cutable
21211 pro‐
21212 grams
21213 with
21214 any
21215 of
21216 the
21217 file
21218 exten‐
21219 sions
21220 listed
21221 in
21222 the
21223 spec‐
21224 i‐
21225 fied
21226 pathext,
21227 the
21228 call‐
21229 ing
21230 envi‐
21231 ron‐
21232 ment's
21233 PATHEXT
21234 (env['ENV']['PATHEXT'])
21235 or
21236 the
21237 user's
21238 cur‐
21239 rent
21240 PATHEXT
21241 (os.env‐
21242 i‐
21243 ron['PATHEXT'])
21244 by
21245 default.
21246 Will
21247 not
21248 select
21249 any
21250 path
21251 name
21252 or
21253 names
21254 in
21255 the
21256 spec‐
21257 i‐
21258 fied
21259 reject
21260 list,
21261 if
21262 any.
21263
21264
21265 SConscript Variables
21266 In addition to the global functions and methods, scons supports a num‐
21267 ber of Python variables that can be used in SConscript files to affect
21268 how you want the build to be performed. These variables may be
21269 accessed from custom Python modules that you import into an SConscript
21270 file by adding the following to the Python module:
21271
21272 from SCons.Script import *
21273
21274
21275 ARGLIST
21276 A list keyword=value arguments specified on the command
21277 line. Each element in the list is a tuple containing the
21278 (keyword,value) of the argument. The separate keyword
21279 and value elements of the tuple can be accessed by sub‐
21280 scripting for element [0] and [1] of the tuple, respec‐
21281 tively.
21282
21283 Example:
21284
21285 print "first keyword, value =", ARGLIST[0][0], ARGLIST[0][1]
21286 print "second keyword, value =", ARGLIST[1][0], ARGLIST[1][1]
21287 third_tuple = ARGLIST[2]
21288 print "third keyword, value =", third_tuple[0], third_tuple[1]
21289 for key, value in ARGLIST:
21290 # process key and value
21291
21292
21293 ARGUMENTS
21294 A dictionary of all the keyword=value arguments
21295 specified on the command line. The dictionary is
21296 not in order, and if a given keyword has more than
21297 one value assigned to it on the command line, the
21298 last (right-most) value is the one in the ARGU‐
21299 MENTS dictionary.
21300
21301 Example:
21302
21303 if ARGUMENTS.get('debug', 0):
21304 env = Environment(CCFLAGS = '-g')
21305 else:
21306 env = Environment()
21307
21308
21309 BUILD_TARGETS
21310 A list of the targets which scons will
21311 actually try to build, regardless of
21312 whether they were specified on the command
21313 line or via the Default() function or
21314 method. The elements of this list may be
21315 strings or nodes, so you should run the
21316 list through the Python str function to
21317 make sure any Node path names are converted
21318 to strings.
21319
21320 Because this list may be taken from the
21321 list of targets specified using the
21322 Default() function or method, the contents
21323 of the list may change on each successive
21324 call to Default(). See the DEFAULT_TARGETS
21325 list, below, for additional information.
21326
21327 Example:
21328
21329 if 'foo' in BUILD_TARGETS:
21330 print "Don't forget to test the `foo' program!"
21331 if 'special/program' in BUILD_TARGETS:
21332 SConscript('special')
21333
21334 Note that the BUILD_TARGETS list
21335 only contains targets expected
21336 listed on the command line or via
21337 calls to the Default() function or
21338 method. It does not contain all
21339 dependent targets that will be built
21340 as a result of making the sure the
21341 explicitly-specified targets are up
21342 to date.
21343
21344
21345 COMMAND_LINE_TARGETS
21346 A list of the targets explicitly
21347 specified on the command line. If
21348 there are no targets specified on
21349 the command line, the list is empty.
21350 This can be used, for example, to
21351 take specific actions only when a
21352 certain target or targets is explic‐
21353 itly being built.
21354
21355 Example:
21356
21357 if 'foo' in COMMAND_LINE_TARGETS:
21358 print "Don't forget to test the `foo' program!"
21359 if 'special/program' in COMMAND_LINE_TARGETS:
21360 SConscript('special')
21361
21362
21363 DEFAULT_TARGETS
21364 A list of the target nodes
21365 that have been specified
21366 using the Default() function
21367 or method. The elements of
21368 the list are nodes, so you
21369 need to run them through the
21370 Python str function to get at
21371 the path name for each Node.
21372
21373 Example:
21374
21375 print str(DEFAULT_TARGETS[0])
21376 if 'foo' in map(str, DEFAULT_TARGETS):
21377 print "Don't forget to test the `foo' program!"
21378
21379 The contents of the
21380 DEFAULT_TARGETS list
21381 change on on each suc‐
21382 cessive call to the
21383 Default() function:
21384
21385 print map(str, DEFAULT_TARGETS) # originally []
21386 Default('foo')
21387 print map(str, DEFAULT_TARGETS) # now a node ['foo']
21388 Default('bar')
21389 print map(str, DEFAULT_TARGETS) # now a node ['foo', 'bar']
21390 Default(None)
21391 print map(str, DEFAULT_TARGETS) # back to []
21392
21393 Consequently,
21394 be sure to use
21395 DEFAULT_TARGETS
21396 only after
21397 you've made all
21398 of your
21399 Default()
21400 calls, or else
21401 simply be care‐
21402 ful of the
21403 order of these
21404 statements in
21405 your SConscript
21406 files so that
21407 you don't look
21408 for a specific
21409 default target
21410 before it's
21411 actually been
21412 added to the
21413 list.
21414
21415
21416 Construction Variables
21417 A construction environment has an associated dictionary of construction
21418 variables that are used by built-in or user-supplied build rules. Con‐
21419 struction variables must follow the same rules for Python identifiers:
21420 the initial character must be an underscore or letter, followed by any
21421 number of underscores, letters, or digits.
21422
21423 A number of useful construction variables are automatically defined by
21424 scons for each supported platform, and additional construction vari‐
21425 ables can be defined by the user. The following is a list of the auto‐
21426 matically defined construction variables:
21427
21428
21429
21430 AR The static library archiver.
21431
21432
21433 ARCHITECTURE
21434 Specifies the system architecture for which the package is being
21435 built. The default is the system architecture of the machine on
21436 which SCons is running. This is used to fill in the Architec‐
21437 ture: field in an Ipkg control file, and as part of the name of
21438 a generated RPM file.
21439
21440
21441 ARCOM The command line used to generate a static library from object
21442 files.
21443
21444
21445 ARCOMSTR
21446 The string displayed when an object file is generated from an
21447 assembly-language source file. If this is not set, then $ARCOM
21448 (the command line) is displayed.
21449
21450 env = Environment(ARCOMSTR = "Archiving $TARGET")
21451
21452
21453 ARFLAGS
21454 General options passed to the static library archiver.
21455
21456
21457 AS The assembler.
21458
21459
21460 ASCOM The command line used to generate an object file from an
21461 assembly-language source file.
21462
21463
21464 ASCOMSTR
21465 The string displayed when an object file is generated
21466 from an assembly-language source file. If this is not
21467 set, then $ASCOM (the command line) is displayed.
21468
21469 env = Environment(ASCOMSTR = "Assembling $TARGET")
21470
21471
21472 ASFLAGS
21473 General options passed to the assembler.
21474
21475
21476 ASPPCOM
21477 The command line used to assemble an assembly-lan‐
21478 guage source file into an object file after first
21479 running the file through the C preprocessor. Any
21480 options specified in the $ASFLAGS and $CPPFLAGS
21481 construction variables are included on this com‐
21482 mand line.
21483
21484
21485 ASPPCOMSTR
21486 The string displayed when an object file is gener‐
21487 ated from an assembly-language source file after
21488 first running the file through the C preprocessor.
21489 If this is not set, then $ASPPCOM (the command
21490 line) is displayed.
21491
21492 env = Environment(ASPPCOMSTR = "Assembling $TARGET")
21493
21494
21495 ASPPFLAGS
21496 General options when an assembling an
21497 assembly-language source file into an
21498 object file after first running the file
21499 through the C preprocessor. The default is
21500 to use the value of $ASFLAGS.
21501
21502
21503 BIBTEX The bibliography generator for the TeX for‐
21504 matter and typesetter and the LaTeX struc‐
21505 tured formatter and typesetter.
21506
21507
21508 BIBTEXCOM
21509 The command line used to call the bibliog‐
21510 raphy generator for the TeX formatter and
21511 typesetter and the LaTeX structured format‐
21512 ter and typesetter.
21513
21514
21515 BIBTEXCOMSTR
21516 The string displayed when generating a bib‐
21517 liography for TeX or LaTeX. If this is not
21518 set, then $BIBTEXCOM (the command line) is
21519 displayed.
21520
21521 env = Environment(BIBTEXCOMSTR = "Generating bibliography $TARGET")
21522
21523
21524 BIBTEXFLAGS
21525 General options passed to the bibli‐
21526 ography generator for the TeX for‐
21527 matter and typesetter and the LaTeX
21528 structured formatter and typesetter.
21529
21530
21531 BITKEEPER
21532 The BitKeeper executable.
21533
21534
21535 BITKEEPERCOM
21536 The command line for fetching source
21537 files using BitKeeper.
21538
21539
21540 BITKEEPERCOMSTR
21541 The string displayed when fetching a
21542 source file using BitKeeper. If
21543 this is not set, then $BITKEEPERCOM
21544 (the command line) is displayed.
21545
21546
21547 BITKEEPERGET
21548 The command ($BITKEEPER) and subcom‐
21549 mand for fetching source files using
21550 BitKeeper.
21551
21552
21553 BITKEEPERGETFLAGS
21554 Options that are passed to the Bit‐
21555 Keeper get subcommand.
21556
21557
21558 BUILDERS
21559 A dictionary mapping the names of
21560 the builders available through this
21561 environment to underlying Builder
21562 objects. Builders named Alias,
21563 CFile, CXXFile, DVI, Library,
21564 Object, PDF, PostScript, and Program
21565 are available by default. If you
21566 initialize this variable when an
21567 Environment is created:
21568
21569 env = Environment(BUILDERS = {'NewBuilder' : foo})
21570
21571 the default Builders will no
21572 longer be available. To use
21573 a new Builder object in addi‐
21574 tion to the default Builders,
21575 add your new Builder object
21576 like this:
21577
21578 env = Environment()
21579 env.Append(BUILDERS = {'NewBuilder' : foo})
21580
21581 or this:
21582
21583 env = Environment()
21584 env['BUILDERS]['NewBuilder'] = foo
21585
21586
21587 CC The C compiler.
21588
21589
21590 CCCOM The command
21591 line used to
21592 compile a C
21593 source file to
21594 a (static)
21595 object file.
21596 Any options
21597 specified in
21598 the $CFLAGS,
21599 $CCFLAGS and
21600 $CPPFLAGS con‐
21601 struction vari‐
21602 ables are
21603 included on
21604 this command
21605 line.
21606
21607
21608 CCCOMSTR
21609 The string dis‐
21610 played when a C
21611 source file is
21612 compiled to a
21613 (static) object
21614 file. If this
21615 is not set,
21616 then $CCCOM
21617 (the command
21618 line) is dis‐
21619 played.
21620
21621 env = Environment(CCCOMSTR = "Compiling static object $TARGET")
21622
21623
21624 CCFLAGS
21625 General
21626 options
21627 that are
21628 passed
21629 to the C
21630 and C++
21631 compil‐
21632 ers.
21633
21634
21635 CCPCHFLAGS
21636 Options
21637 added to
21638 the com‐
21639 piler
21640 command
21641 line to
21642 support
21643 building
21644 with
21645 precom‐
21646 piled
21647 headers.
21648 The
21649 default
21650 value
21651 expands
21652 expands
21653 to the
21654 appro‐
21655 priate
21656 Micro‐
21657 soft
21658 Visual
21659 C++ com‐
21660 mand-
21661 line
21662 options
21663 when the
21664 $PCH
21665 con‐
21666 struc‐
21667 tion
21668 variable
21669 is set.
21670
21671
21672 CCPDBFLAGS
21673 Options
21674 added to
21675 the com‐
21676 piler
21677 command
21678 line to
21679 support
21680 storing
21681 debug‐
21682 ging
21683 informa‐
21684 tion in
21685 a Micro‐
21686 soft
21687 Visual
21688 C++ PDB
21689 file.
21690 The
21691 default
21692 value
21693 expands
21694 expands
21695 to
21696 appro‐
21697 priate
21698 Micro‐
21699 soft
21700 Visual
21701 C++ com‐
21702 mand-
21703 line
21704 options
21705 when the
21706 $PDB
21707 con‐
21708 struc‐
21709 tion
21710 variable
21711 is set.
21712
21713 The Vis‐
21714 ual C++
21715 compiler
21716 option
21717 that
21718 SCons
21719 uses by
21720 default
21721 to gen‐
21722 erate
21723 PDB
21724 informa‐
21725 tion is
21726 /Z7.
21727 This
21728 works
21729 cor‐
21730 rectly
21731 with
21732 parallel
21733 (-j)
21734 builds
21735 because
21736 it
21737 embeds
21738 the
21739 debug
21740 informa‐
21741 tion in
21742 the
21743 interme‐
21744 diate
21745 object
21746 files,
21747 as
21748 opposed
21749 to shar‐
21750 ing a
21751 single
21752 PDB file
21753 between
21754 multiple
21755 object
21756 files.
21757 This is
21758 also the
21759 only way
21760 to get
21761 debug
21762 informa‐
21763 tion
21764 embedded
21765 into a
21766 static
21767 library.
21768 Using
21769 the /Zi
21770 instead
21771 may
21772 yield
21773 improved
21774 link-
21775 time
21776 perfor‐
21777 mance,
21778 although
21779 parallel
21780 builds
21781 will no
21782 longer
21783 work.
21784
21785 You can
21786 generate
21787 PDB
21788 files
21789 with the
21790 /Zi
21791 switch
21792 by over‐
21793 riding
21794 the
21795 default
21796 $CCPDBFLAGS
21797 variable
21798 as fol‐
21799 lows:
21800
21801 import SCons.Util
21802 env['CCPDBFLAGS'] = SCons.Util.CLVar(['${(PDB and "/Zi /Fd%s" % File(PDB)) or ""}'])
21803
21804 An
21805 alter‐
21806 na‐
21807 tive
21808 would
21809 be
21810 to
21811 use
21812 the
21813 /Zi
21814 to
21815 put
21816 the
21817 debug‐
21818 ging
21819 infor‐
21820 ma‐
21821 tion
21822 in
21823 a
21824 sep‐
21825 a‐
21826 rate
21827 .pdb
21828 file
21829 for
21830 each
21831 object
21832 file
21833 by
21834 over‐
21835 rid‐
21836 ing
21837 the
21838 $CCPDBFLAGS
21839 vari‐
21840 able
21841 as
21842 fol‐
21843 lows:
21844
21845 env['CCPDBFLAGS'] = '/Zi /Fd${TARGET}.pdb'
21846
21847
21848 CCVER‐
21849 SION The
21850 ver‐
21851 sion
21852 num‐
21853 ber
21854 of
21855 the
21856 C
21857 com‐
21858 piler.
21859 This
21860 may
21861 or
21862 may
21863 not
21864 be
21865 set,
21866 depend‐
21867 ing
21868 on
21869 the
21870 spe‐
21871 cific
21872 C
21873 com‐
21874 piler
21875 being
21876 used.
21877
21878
21879 CFILE‐
21880 SUF‐
21881 FIX The
21882 suf‐
21883 fix
21884 for
21885 C
21886 source
21887 files.
21888 This
21889 is
21890 used
21891 by
21892 the
21893 inter‐
21894 nal
21895 CFile
21896 builder
21897 when
21898 gen‐
21899 er‐
21900 at‐
21901 ing
21902 C
21903 files
21904 from
21905 Lex
21906 (.l)
21907 or
21908 YACC
21909 (.y)
21910 input
21911 files.
21912 The
21913 default
21914 suf‐
21915 fix,
21916 of
21917 course,
21918 is
21919 .c
21920 (lower
21921 case).
21922 On
21923 case-
21924 insen‐
21925 si‐
21926 tive
21927 sys‐
21928 tems
21929 (like
21930 Win‐
21931 dows),
21932 SCons
21933 also
21934 treats
21935 .C
21936 (upper
21937 case)
21938 files
21939 as
21940 C
21941 files.
21942
21943
21944 CFLAGS Gen‐
21945 eral
21946 options
21947 that
21948 are
21949 passed
21950 to
21951 the
21952 C
21953 com‐
21954 piler
21955 (C
21956 only;
21957 not
21958 C++).
21959
21960
21961 CHANGE_SPEC‐
21962 FILE
21963 A
21964 hook
21965 for
21966 mod‐
21967 i‐
21968 fy‐
21969 ing
21970 the
21971 file
21972 that
21973 con‐
21974 trols
21975 the
21976 pack‐
21977 ag‐
21978 ing
21979 build
21980 (the
21981 .spec
21982 for
21983 RPM,
21984 the
21985 con‐
21986 trol
21987 for
21988 Ipkg,
21989 the
21990 .wxs
21991 for
21992 MSI).
21993 If
21994 set,
21995 the
21996 func‐
21997 tion
21998 will
21999 be
22000 called
22001 after
22002 the
22003 SCons
22004 tem‐
22005 plate
22006 for
22007 the
22008 file
22009 has
22010 been
22011 writ‐
22012 ten.
22013 XXX
22014
22015
22016 CHANGELOG
22017 The
22018 name
22019 of
22020 a
22021 file
22022 con‐
22023 tain‐
22024 ing
22025 the
22026 change
22027 log
22028 text
22029 to
22030 be
22031 included
22032 in
22033 the
22034 pack‐
22035 age.
22036 This
22037 is
22038 included
22039 as
22040 the
22041 %changelog
22042 sec‐
22043 tion
22044 of
22045 the
22046 RPM
22047 .spec
22048 file.
22049
22050
22051 _con‐
22052 cat A
22053 func‐
22054 tion
22055 used
22056 to
22057 pro‐
22058 duce
22059 vari‐
22060 ables
22061 like
22062 $_CPPINCFLAGS.
22063 It
22064 takes
22065 four
22066 or
22067 five
22068 argu‐
22069 ments:
22070 a
22071 pre‐
22072 fix
22073 to
22074 con‐
22075 cate‐
22076 nate
22077 onto
22078 each
22079 ele‐
22080 ment,
22081 a
22082 list
22083 of
22084 ele‐
22085 ments,
22086 a
22087 suf‐
22088 fix
22089 to
22090 con‐
22091 cate‐
22092 nate
22093 onto
22094 each
22095 ele‐
22096 ment,
22097 an
22098 envi‐
22099 ron‐
22100 ment
22101 for
22102 vari‐
22103 able
22104 inter‐
22105 po‐
22106 la‐
22107 tion,
22108 and
22109 an
22110 optional
22111 func‐
22112 tion
22113 that
22114 will
22115 be
22116 called
22117 to
22118 trans‐
22119 form
22120 the
22121 list
22122 before
22123 con‐
22124 cate‐
22125 na‐
22126 tion.
22127
22128 env['_CPPINCFLAGS'] = '$( ${_concat(INCPREFIX, CPPPATH, INCSUFFIX, __env__, RDirs)} $)',
22129
22130
22131 CON‐
22132 FIG‐
22133 URE‐
22134 DIR The
22135 name
22136 of
22137 the
22138 direc‐
22139 tory
22140 in
22141 which
22142 Con‐
22143 fig‐
22144 ure
22145 con‐
22146 text
22147 test
22148 files
22149 are
22150 writ‐
22151 ten.
22152 The
22153 default
22154 is
22155 .sconf_temp
22156 in
22157 the
22158 top-
22159 level
22160 direc‐
22161 tory
22162 con‐
22163 tain‐
22164 ing
22165 the
22166 SCon‐
22167 struct
22168 file.
22169
22170
22171 CON‐
22172 FIG‐
22173 URE‐
22174 LOG The
22175 name
22176 of
22177 the
22178 Con‐
22179 fig‐
22180 ure
22181 con‐
22182 text
22183 log
22184 file.
22185 The
22186 default
22187 is
22188 con‐
22189 fig.log
22190 in
22191 the
22192 top-
22193 level
22194 direc‐
22195 tory
22196 con‐
22197 tain‐
22198 ing
22199 the
22200 SCon‐
22201 struct
22202 file.
22203
22204
22205 _CPPDEF‐
22206 FLAGS
22207 An
22208 auto‐
22209 mat‐
22210 i‐
22211 cally-
22212 gen‐
22213 er‐
22214 ated
22215 con‐
22216 struc‐
22217 tion
22218 vari‐
22219 able
22220 con‐
22221 tain‐
22222 ing
22223 the
22224 C
22225 pre‐
22226 proces‐
22227 sor
22228 com‐
22229 mand-
22230 line
22231 options
22232 to
22233 define
22234 val‐
22235 ues.
22236 The
22237 value
22238 of
22239 $_CPPDEF‐
22240 FLAGS
22241 is
22242 cre‐
22243 ated
22244 by
22245 append‐
22246 ing
22247 $CPPDEF‐
22248 PRE‐
22249 FIX
22250 and
22251 $CPPDEF‐
22252 SUF‐
22253 FIX
22254 to
22255 the
22256 begin‐
22257 ning
22258 and
22259 end
22260 of
22261 each
22262 direc‐
22263 tory
22264 in
22265 $CPPDE‐
22266 FINES.
22267
22268
22269 CPPDE‐
22270 FINES A
22271 plat‐
22272 form
22273 inde‐
22274 pen‐
22275 dent
22276 spec‐
22277 i‐
22278 fi‐
22279 ca‐
22280 tion
22281 of
22282 C
22283 pre‐
22284 proces‐
22285 sor
22286 def‐
22287 i‐
22288 ni‐
22289 tions.
22290 The
22291 def‐
22292 i‐
22293 ni‐
22294 tions
22295 will
22296 be
22297 added
22298 to
22299 com‐
22300 mand
22301 lines
22302 through
22303 the
22304 auto‐
22305 mat‐
22306 i‐
22307 cally-
22308 gen‐
22309 er‐
22310 ated
22311 $_CPPDEF‐
22312 FLAGS
22313 con‐
22314 struc‐
22315 tion
22316 vari‐
22317 able
22318 (see
22319 above),
22320 which
22321 is
22322 con‐
22323 structed
22324 accord‐
22325 ing
22326 to
22327 the
22328 type
22329 of
22330 value
22331 of
22332 $CPPDE‐
22333 FINES:
22334
22335 If
22336 $CPPDE‐
22337 FINES
22338 is
22339 a
22340 string,
22341 the
22342 val‐
22343 ues
22344 of
22345 the
22346 $CPPDEF‐
22347 PRE‐
22348 FIX
22349 and
22350 $CPPDEF‐
22351 SUF‐
22352 FIX
22353 con‐
22354 struc‐
22355 tion
22356 vari‐
22357 ables
22358 will
22359 be
22360 added
22361 to
22362 the
22363 begin‐
22364 ning
22365 and
22366 end.
22367
22368 # Will add -Dxyz to POSIX compiler command lines,
22369 # and /Dxyz to Microsoft Visual C++ command lines.
22370 env = Environment(CPPDEFINES='xyz')
22371
22372 If
22373 $CPPDE‐
22374 FINES
22375 is
22376 a
22377 list,
22378 the
22379 val‐
22380 ues
22381 of
22382 the
22383 $CPPDEF‐
22384 PRE‐
22385 FIX
22386 and
22387 $CPPDEF‐
22388 SUF‐
22389 FIX
22390 con‐
22391 struc‐
22392 tion
22393 vari‐
22394 ables
22395 will
22396 be
22397 appended
22398 to
22399 the
22400 begin‐
22401 ning
22402 and
22403 end
22404 of
22405 each
22406 ele‐
22407 ment
22408 in
22409 the
22410 list.
22411 If
22412 any
22413 ele‐
22414 ment
22415 is
22416 a
22417 list
22418 or
22419 tuple,
22420 then
22421 the
22422 first
22423 item
22424 is
22425 the
22426 name
22427 being
22428 defined
22429 and
22430 the
22431 sec‐
22432 ond
22433 item
22434 is
22435 its
22436 value:
22437
22438 # Will add -DB=2 -DA to POSIX compiler command lines,
22439 # and /DB=2 /DA to Microsoft Visual C++ command lines.
22440 env = Environment(CPPDEFINES=[('B', 2), 'A'])
22441
22442 If
22443 $CPPDE‐
22444 FINES
22445 is
22446 a
22447 dic‐
22448 tio‐
22449 nary,
22450 the
22451 val‐
22452 ues
22453 of
22454 the
22455 $CPPDEF‐
22456 PRE‐
22457 FIX
22458 and
22459 $CPPDEF‐
22460 SUF‐
22461 FIX
22462 con‐
22463 struc‐
22464 tion
22465 vari‐
22466 ables
22467 will
22468 be
22469 appended
22470 to
22471 the
22472 begin‐
22473 ning
22474 and
22475 end
22476 of
22477 each
22478 item
22479 from
22480 the
22481 dic‐
22482 tio‐
22483 nary.
22484 The
22485 key
22486 of
22487 each
22488 dic‐
22489 tio‐
22490 nary
22491 item
22492 is
22493 a
22494 name
22495 being
22496 defined
22497 to
22498 the
22499 dic‐
22500 tio‐
22501 nary
22502 item's
22503 cor‐
22504 re‐
22505 spond‐
22506 ing
22507 value;
22508 if
22509 the
22510 value
22511 is
22512 None,
22513 then
22514 the
22515 name
22516 is
22517 defined
22518 with‐
22519 out
22520 an
22521 explicit
22522 value.
22523 Note
22524 that
22525 the
22526 result‐
22527 ing
22528 flags
22529 are
22530 sorted
22531 by
22532 key‐
22533 word
22534 to
22535 ensure
22536 that
22537 the
22538 order
22539 of
22540 the
22541 options
22542 on
22543 the
22544 com‐
22545 mand
22546 line
22547 is
22548 con‐
22549 sis‐
22550 tent
22551 each
22552 time
22553 scons
22554 is
22555 run.
22556
22557 # Will add -DA -DB=2 to POSIX compiler command lines,
22558 # and /DA /DB=2 to Microsoft Visual C++ command lines.
22559 env = Environment(CPPDEFINES={'B':2, 'A':None})
22560
22561
22562 CPPDEF‐
22563 PRE‐
22564 FIX
22565 The
22566 pre‐
22567 fix
22568 used
22569 to
22570 spec‐
22571 ify
22572 pre‐
22573 proces‐
22574 sor
22575 def‐
22576 i‐
22577 ni‐
22578 tions
22579 on
22580 the
22581 C
22582 com‐
22583 piler
22584 com‐
22585 mand
22586 line.
22587 This
22588 will
22589 be
22590 appended
22591 to
22592 the
22593 begin‐
22594 ning
22595 of
22596 each
22597 def‐
22598 i‐
22599 ni‐
22600 tion
22601 in
22602 the
22603 $CPPDE‐
22604 FINES
22605 con‐
22606 struc‐
22607 tion
22608 vari‐
22609 able
22610 when
22611 the
22612 $_CPPDEF‐
22613 FLAGS
22614 vari‐
22615 able
22616 is
22617 auto‐
22618 mat‐
22619 i‐
22620 cally
22621 gen‐
22622 er‐
22623 ated.
22624
22625
22626 CPPDEF‐
22627 SUF‐
22628 FIX
22629 The
22630 suf‐
22631 fix
22632 used
22633 to
22634 spec‐
22635 ify
22636 pre‐
22637 proces‐
22638 sor
22639 def‐
22640 i‐
22641 ni‐
22642 tions
22643 on
22644 the
22645 C
22646 com‐
22647 piler
22648 com‐
22649 mand
22650 line.
22651 This
22652 will
22653 be
22654 appended
22655 to
22656 the
22657 end
22658 of
22659 each
22660 def‐
22661 i‐
22662 ni‐
22663 tion
22664 in
22665 the
22666 $CPPDE‐
22667 FINES
22668 con‐
22669 struc‐
22670 tion
22671 vari‐
22672 able
22673 when
22674 the
22675 $_CPPDEF‐
22676 FLAGS
22677 vari‐
22678 able
22679 is
22680 auto‐
22681 mat‐
22682 i‐
22683 cally
22684 gen‐
22685 er‐
22686 ated.
22687
22688
22689 CPPFLAGS
22690 User-
22691 spec‐
22692 i‐
22693 fied
22694 C
22695 pre‐
22696 proces‐
22697 sor
22698 options.
22699 These
22700 will
22701 be
22702 included
22703 in
22704 any
22705 com‐
22706 mand
22707 that
22708 uses
22709 the
22710 C
22711 pre‐
22712 proces‐
22713 sor,
22714 includ‐
22715 ing
22716 not
22717 just
22718 com‐
22719 pi‐
22720 la‐
22721 tion
22722 of
22723 C
22724 and
22725 C++
22726 source
22727 files
22728 via
22729 the
22730 $CCCOM,
22731 $SHC‐
22732 C‐
22733 COM,
22734 $CXXCOM
22735 and
22736 $SHCXXCOM
22737 com‐
22738 mand
22739 lines,
22740 but
22741 also
22742 the
22743 $FOR‐
22744 TRANPP‐
22745 COM,
22746 $SHFOR‐
22747 TRANPP‐
22748 COM,
22749 $F77PPCOM
22750 and
22751 $SHF77PPCOM
22752 com‐
22753 mand
22754 lines
22755 used
22756 to
22757 com‐
22758 pile
22759 a
22760 For‐
22761 tran
22762 source
22763 file,
22764 and
22765 the
22766 $ASP‐
22767 P‐
22768 COM
22769 com‐
22770 mand
22771 line
22772 used
22773 to
22774 assem‐
22775 ble
22776 an
22777 assem‐
22778 bly
22779 lan‐
22780 guage
22781 source
22782 file,
22783 after
22784 first
22785 run‐
22786 ning
22787 each
22788 file
22789 through
22790 the
22791 C
22792 pre‐
22793 proces‐
22794 sor.
22795 Note
22796 that
22797 this
22798 vari‐
22799 able
22800 does
22801 not
22802 con‐
22803 tain
22804 -I
22805 (or
22806 sim‐
22807 i‐
22808 lar)
22809 include
22810 search
22811 path
22812 options
22813 that
22814 scons
22815 gen‐
22816 er‐
22817 ates
22818 auto‐
22819 mat‐
22820 i‐
22821 cally
22822 from
22823 $CPP‐
22824 PATH.
22825 See
22826 $_CPPINCFLAGS,
22827 below,
22828 for
22829 the
22830 vari‐
22831 able
22832 that
22833 expands
22834 to
22835 those
22836 options.
22837
22838
22839 _CPPINCFLAGS
22840 An
22841 auto‐
22842 mat‐
22843 i‐
22844 cally-
22845 gen‐
22846 er‐
22847 ated
22848 con‐
22849 struc‐
22850 tion
22851 vari‐
22852 able
22853 con‐
22854 tain‐
22855 ing
22856 the
22857 C
22858 pre‐
22859 proces‐
22860 sor
22861 com‐
22862 mand-
22863 line
22864 options
22865 for
22866 spec‐
22867 i‐
22868 fy‐
22869 ing
22870 direc‐
22871 to‐
22872 ries
22873 to
22874 be
22875 searched
22876 for
22877 include
22878 files.
22879 The
22880 value
22881 of
22882 $_CPPINCFLAGS
22883 is
22884 cre‐
22885 ated
22886 by
22887 append‐
22888 ing
22889 $INCPRE‐
22890 FIX
22891 and
22892 $INC‐
22893 SUF‐
22894 FIX
22895 to
22896 the
22897 begin‐
22898 ning
22899 and
22900 end
22901 of
22902 each
22903 direc‐
22904 tory
22905 in
22906 $CPP‐
22907 PATH.
22908
22909
22910 CPP‐
22911 PATH The
22912 list
22913 of
22914 direc‐
22915 to‐
22916 ries
22917 that
22918 the
22919 C
22920 pre‐
22921 proces‐
22922 sor
22923 will
22924 search
22925 for
22926 include
22927 direc‐
22928 to‐
22929 ries.
22930 The
22931 C/C++
22932 implicit
22933 depen‐
22934 dency
22935 scan‐
22936 ner
22937 will
22938 search
22939 these
22940 direc‐
22941 to‐
22942 ries
22943 for
22944 include
22945 files.
22946 Don't
22947 explic‐
22948 itly
22949 put
22950 include
22951 direc‐
22952 tory
22953 argu‐
22954 ments
22955 in
22956 CCFLAGS
22957 or
22958 CXXFLAGS
22959 because
22960 the
22961 result
22962 will
22963 be
22964 non-
22965 por‐
22966 ta‐
22967 ble
22968 and
22969 the
22970 direc‐
22971 to‐
22972 ries
22973 will
22974 not
22975 be
22976 searched
22977 by
22978 the
22979 depen‐
22980 dency
22981 scan‐
22982 ner.
22983 Note:
22984 direc‐
22985 tory
22986 names
22987 in
22988 CPP‐
22989 PATH
22990 will
22991 be
22992 looked-
22993 up
22994 rel‐
22995 a‐
22996 tive
22997 to
22998 the
22999 SCon‐
23000 script
23001 direc‐
23002 tory
23003 when
23004 they
23005 are
23006 used
23007 in
23008 a
23009 com‐
23010 mand.
23011 To
23012 force
23013 scons
23014 to
23015 look-
23016 up
23017 a
23018 direc‐
23019 tory
23020 rel‐
23021 a‐
23022 tive
23023 to
23024 the
23025 root
23026 of
23027 the
23028 source
23029 tree
23030 use
23031 #:
23032
23033 env = Environment(CPPPATH='#/include')
23034
23035 The
23036 direc‐
23037 tory
23038 look-
23039 up
23040 can
23041 also
23042 be
23043 forced
23044 using
23045 the
23046 Dir()
23047 func‐
23048 tion:
23049
23050 include = Dir('include')
23051 env = Environment(CPPPATH=include)
23052
23053 The
23054 direc‐
23055 tory
23056 list
23057 will
23058 be
23059 added
23060 to
23061 com‐
23062 mand
23063 lines
23064 through
23065 the
23066 auto‐
23067 mat‐
23068 i‐
23069 cally-
23070 gen‐
23071 er‐
23072 ated
23073 $_CPPINCFLAGS
23074 con‐
23075 struc‐
23076 tion
23077 vari‐
23078 able,
23079 which
23080 is
23081 con‐
23082 structed
23083 by
23084 append‐
23085 ing
23086 the
23087 val‐
23088 ues
23089 of
23090 the
23091 $INCPRE‐
23092 FIX
23093 and
23094 $INC‐
23095 SUF‐
23096 FIX
23097 con‐
23098 struc‐
23099 tion
23100 vari‐
23101 ables
23102 to
23103 the
23104 begin‐
23105 ning
23106 and
23107 end
23108 of
23109 each
23110 direc‐
23111 tory
23112 in
23113 $CPP‐
23114 PATH.
23115 Any
23116 com‐
23117 mand
23118 lines
23119 you
23120 define
23121 that
23122 need
23123 the
23124 CPP‐
23125 PATH
23126 direc‐
23127 tory
23128 list
23129 should
23130 include
23131 $_CPPINCFLAGS:
23132
23133 env = Environment(CCCOM="my_compiler $_CPPINCFLAGS -c -o $TARGET $SOURCE")
23134
23135
23136 CPP‐
23137 SUF‐
23138 FIXES The
23139 list
23140 of
23141 suf‐
23142 fixes
23143 of
23144 files
23145 that
23146 will
23147 be
23148 scanned
23149 for
23150 C
23151 pre‐
23152 proces‐
23153 sor
23154 implicit
23155 depen‐
23156 den‐
23157 cies
23158 (#include
23159 lines).
23160 The
23161 default
23162 list
23163 is:
23164
23165 [".c", ".C", ".cxx", ".cpp", ".c++", ".cc",
23166 ".h", ".H", ".hxx", ".hpp", ".hh",
23167 ".F", ".fpp", ".FPP",
23168 ".m", ".mm",
23169 ".S", ".spp", ".SPP"]
23170
23171
23172 CVS The
23173 CVS
23174 exe‐
23175 cutable.
23176
23177
23178 CVS‐
23179 COFLAGS
23180 Options
23181 that
23182 are
23183 passed
23184 to
23185 the
23186 CVS
23187 check‐
23188 out
23189 sub‐
23190 com‐
23191 mand.
23192
23193
23194 CVS‐
23195 COM The
23196 com‐
23197 mand
23198 line
23199 used
23200 to
23201 fetch
23202 source
23203 files
23204 from
23205 a
23206 CVS
23207 repos‐
23208 i‐
23209 tory.
23210
23211
23212 CVS‐
23213 COM‐
23214 STR The
23215 string
23216 dis‐
23217 played
23218 when
23219 fetch‐
23220 ing
23221 a
23222 source
23223 file
23224 from
23225 a
23226 CVS
23227 repos‐
23228 i‐
23229 tory.
23230 If
23231 this
23232 is
23233 not
23234 set,
23235 then
23236 $CVS‐
23237 COM
23238 (the
23239 com‐
23240 mand
23241 line)
23242 is
23243 dis‐
23244 played.
23245
23246
23247 CVS‐
23248 FLAGS Gen‐
23249 eral
23250 options
23251 that
23252 are
23253 passed
23254 to
23255 CVS.
23256 By
23257 default,
23258 this
23259 is
23260 set
23261 to
23262 -d
23263 $CVS‐
23264 REPOS‐
23265 I‐
23266 TORY
23267 to
23268 spec‐
23269 ify
23270 from
23271 where
23272 the
23273 files
23274 must
23275 be
23276 fetched.
23277
23278
23279 CVS‐
23280 REPOS‐
23281 I‐
23282 TORY The
23283 path
23284 to
23285 the
23286 CVS
23287 repos‐
23288 i‐
23289 tory.
23290 This
23291 is
23292 ref‐
23293 er‐
23294 enced
23295 in
23296 the
23297 default
23298 $CVS‐
23299 FLAGS
23300 value.
23301
23302
23303 CXX The
23304 C++
23305 com‐
23306 piler.
23307
23308
23309 CXXCOM The
23310 com‐
23311 mand
23312 line
23313 used
23314 to
23315 com‐
23316 pile
23317 a
23318 C++
23319 source
23320 file
23321 to
23322 an
23323 object
23324 file.
23325 Any
23326 options
23327 spec‐
23328 i‐
23329 fied
23330 in
23331 the
23332 $CXXFLAGS
23333 and
23334 $CPPFLAGS
23335 con‐
23336 struc‐
23337 tion
23338 vari‐
23339 ables
23340 are
23341 included
23342 on
23343 this
23344 com‐
23345 mand
23346 line.
23347
23348
23349 CXXCOM‐
23350 STR
23351 The
23352 string
23353 dis‐
23354 played
23355 when
23356 a
23357 C++
23358 source
23359 file
23360 is
23361 com‐
23362 piled
23363 to
23364 a
23365 (static)
23366 object
23367 file.
23368 If
23369 this
23370 is
23371 not
23372 set,
23373 then
23374 $CXXCOM
23375 (the
23376 com‐
23377 mand
23378 line)
23379 is
23380 dis‐
23381 played.
23382
23383 env = Environment(CXXCOMSTR = "Compiling static object $TARGET")
23384
23385
23386 CXXFILE‐
23387 SUF‐
23388 FIX
23389 The
23390 suf‐
23391 fix
23392 for
23393 C++
23394 source
23395 files.
23396 This
23397 is
23398 used
23399 by
23400 the
23401 inter‐
23402 nal
23403 CXXFile
23404 builder
23405 when
23406 gen‐
23407 er‐
23408 at‐
23409 ing
23410 C++
23411 files
23412 from
23413 Lex
23414 (.ll)
23415 or
23416 YACC
23417 (.yy)
23418 input
23419 files.
23420 The
23421 default
23422 suf‐
23423 fix
23424 is
23425 .cc.
23426 SCons
23427 also
23428 treats
23429 files
23430 with
23431 the
23432 suf‐
23433 fixes
23434 .cpp,
23435 .cxx,
23436 .c++,
23437 and
23438 .C++
23439 as
23440 C++
23441 files,
23442 and
23443 files
23444 with
23445 .mm
23446 suf‐
23447 fixes
23448 as
23449 Objec‐
23450 tive
23451 C++
23452 files.
23453 On
23454 case-
23455 sen‐
23456 si‐
23457 tive
23458 sys‐
23459 tems
23460 (Linux,
23461 UNIX,
23462 and
23463 other
23464 POSIX-
23465 alikes),
23466 SCons
23467 also
23468 treats
23469 .C
23470 (upper
23471 case)
23472 files
23473 as
23474 C++
23475 files.
23476
23477
23478 CXXFLAGS
23479 Gen‐
23480 eral
23481 options
23482 that
23483 are
23484 passed
23485 to
23486 the
23487 C++
23488 com‐
23489 piler.
23490 By
23491 default,
23492 this
23493 includes
23494 the
23495 value
23496 of
23497 $CCFLAGS,
23498 so
23499 that
23500 set‐
23501 ting
23502 $CCFLAGS
23503 affects
23504 both
23505 C
23506 and
23507 C++
23508 com‐
23509 pi‐
23510 la‐
23511 tion.
23512 If
23513 you
23514 want
23515 to
23516 add
23517 C++-spe‐
23518 cific
23519 flags,
23520 you
23521 must
23522 set
23523 or
23524 over‐
23525 ride
23526 the
23527 value
23528 of
23529 $CXXFLAGS.
23530
23531
23532 CXXVER‐
23533 SION
23534 The
23535 ver‐
23536 sion
23537 num‐
23538 ber
23539 of
23540 the
23541 C++
23542 com‐
23543 piler.
23544 This
23545 may
23546 or
23547 may
23548 not
23549 be
23550 set,
23551 depend‐
23552 ing
23553 on
23554 the
23555 spe‐
23556 cific
23557 C++
23558 com‐
23559 piler
23560 being
23561 used.
23562
23563
23564 DESCRIP‐
23565 TION
23566 A
23567 long
23568 descrip‐
23569 tion
23570 of
23571 the
23572 project
23573 being
23574 pack‐
23575 aged.
23576 This
23577 is
23578 included
23579 in
23580 the
23581 rel‐
23582 e‐
23583 vant
23584 sec‐
23585 tion
23586 of
23587 the
23588 file
23589 that
23590 con‐
23591 trols
23592 the
23593 pack‐
23594 ag‐
23595 ing
23596 build.
23597
23598
23599 DESCRIP‐
23600 TION_lang
23601 A
23602 lan‐
23603 guage-
23604 spe‐
23605 cific
23606 long
23607 descrip‐
23608 tion
23609 for
23610 the
23611 spec‐
23612 i‐
23613 fied
23614 lang.
23615 This
23616 is
23617 used
23618 to
23619 pop‐
23620 u‐
23621 late
23622 a
23623 %descrip‐
23624 tion
23625 -l
23626 sec‐
23627 tion
23628 of
23629 an
23630 RPM
23631 .spec
23632 file.
23633
23634
23635 Dir A
23636 func‐
23637 tion
23638 that
23639 con‐
23640 verts
23641 a
23642 string
23643 into
23644 a
23645 Dir
23646 instance
23647 rel‐
23648 a‐
23649 tive
23650 to
23651 the
23652 tar‐
23653 get
23654 being
23655 built.
23656
23657
23658 Dirs A
23659 func‐
23660 tion
23661 that
23662 con‐
23663 verts
23664 a
23665 list
23666 of
23667 strings
23668 into
23669 a
23670 list
23671 of
23672 Dir
23673 instances
23674 rel‐
23675 a‐
23676 tive
23677 to
23678 the
23679 tar‐
23680 get
23681 being
23682 built.
23683
23684
23685 DSUF‐
23686 FIXES The
23687 list
23688 of
23689 suf‐
23690 fixes
23691 of
23692 files
23693 that
23694 will
23695 be
23696 scanned
23697 for
23698 imported
23699 D
23700 pack‐
23701 age
23702 files.
23703 The
23704 default
23705 list
23706 is:
23707
23708 ['.d']
23709
23710
23711 DVIPDF The
23712 TeX
23713 DVI
23714 file
23715 to
23716 PDF
23717 file
23718 con‐
23719 verter.
23720
23721
23722 DVIPDF‐
23723 COM
23724 The
23725 com‐
23726 mand
23727 line
23728 used
23729 to
23730 con‐
23731 vert
23732 TeX
23733 DVI
23734 files
23735 into
23736 a
23737 PDF
23738 file.
23739
23740
23741 DVIPDF‐
23742 COM‐
23743 STR
23744 The
23745 string
23746 dis‐
23747 played
23748 when
23749 a
23750 TeX
23751 DVI
23752 file
23753 is
23754 con‐
23755 verted
23756 into
23757 a
23758 PDF
23759 file.
23760 If
23761 this
23762 is
23763 not
23764 set,
23765 then
23766 $DVIPDF‐
23767 COM
23768 (the
23769 com‐
23770 mand
23771 line)
23772 is
23773 dis‐
23774 played.
23775
23776
23777 DVIPDF‐
23778 FLAGS
23779 Gen‐
23780 eral
23781 options
23782 passed
23783 to
23784 the
23785 TeX
23786 DVI
23787 file
23788 to
23789 PDF
23790 file
23791 con‐
23792 verter.
23793
23794
23795 DVIPS The
23796 TeX
23797 DVI
23798 file
23799 to
23800 Post‐
23801 Script
23802 con‐
23803 verter.
23804
23805
23806 DVIPS‐
23807 FLAGS Gen‐
23808 eral
23809 options
23810 passed
23811 to
23812 the
23813 TeX
23814 DVI
23815 file
23816 to
23817 Post‐
23818 Script
23819 con‐
23820 verter.
23821
23822
23823 ENV A
23824 dic‐
23825 tio‐
23826 nary
23827 of
23828 envi‐
23829 ron‐
23830 ment
23831 vari‐
23832 ables
23833 to
23834 use
23835 when
23836 invok‐
23837 ing
23838 com‐
23839 mands.
23840 When
23841 $ENV
23842 is
23843 used
23844 in
23845 a
23846 com‐
23847 mand
23848 all
23849 list
23850 val‐
23851 ues
23852 will
23853 be
23854 joined
23855 using
23856 the
23857 path
23858 sep‐
23859 a‐
23860 ra‐
23861 tor
23862 and
23863 any
23864 other
23865 non-
23866 string
23867 val‐
23868 ues
23869 will
23870 sim‐
23871 ply
23872 be
23873 coerced
23874 to
23875 a
23876 string.
23877 Note
23878 that,
23879 by
23880 default,
23881 scons
23882 does
23883 not
23884 prop‐
23885 a‐
23886 gate
23887 the
23888 envi‐
23889 ron‐
23890 ment
23891 in
23892 force
23893 when
23894 you
23895 exe‐
23896 cute
23897 scons
23898 to
23899 the
23900 com‐
23901 mands
23902 used
23903 to
23904 build
23905 tar‐
23906 get
23907 files.
23908 This
23909 is
23910 so
23911 that
23912 builds
23913 will
23914 be
23915 guar‐
23916 an‐
23917 teed
23918 repeat‐
23919 able
23920 regard‐
23921 less
23922 of
23923 the
23924 envi‐
23925 ron‐
23926 ment
23927 vari‐
23928 ables
23929 set
23930 at
23931 the
23932 time
23933 scons
23934 is
23935 invoked.
23936
23937 If
23938 you
23939 want
23940 to
23941 prop‐
23942 a‐
23943 gate
23944 your
23945 envi‐
23946 ron‐
23947 ment
23948 vari‐
23949 ables
23950 to
23951 the
23952 com‐
23953 mands
23954 exe‐
23955 cuted
23956 to
23957 build
23958 tar‐
23959 get
23960 files,
23961 you
23962 must
23963 do
23964 so
23965 explic‐
23966 itly:
23967
23968 import os
23969 env = Environment(ENV = os.environ)
23970
23971 Note
23972 that
23973 you
23974 can
23975 choose
23976 only
23977 to
23978 prop‐
23979 a‐
23980 gate
23981 cer‐
23982 tain
23983 envi‐
23984 ron‐
23985 ment
23986 vari‐
23987 ables.
23988 A
23989 com‐
23990 mon
23991 exam‐
23992 ple
23993 is
23994 the
23995 sys‐
23996 tem
23997 PATH
23998 envi‐
23999 ron‐
24000 ment
24001 vari‐
24002 able,
24003 so
24004 that
24005 scons
24006 uses
24007 the
24008 same
24009 util‐
24010 i‐
24011 ties
24012 as
24013 the
24014 invok‐
24015 ing
24016 shell
24017 (or
24018 other
24019 process):
24020
24021 import os
24022 env = Environment(ENV = {'PATH' : os.environ['PATH']})
24023
24024
24025 ESCAPE A
24026 func‐
24027 tion
24028 that
24029 will
24030 be
24031 called
24032 to
24033 escape
24034 shell
24035 spe‐
24036 cial
24037 char‐
24038 ac‐
24039 ters
24040 in
24041 com‐
24042 mand
24043 lines.
24044 The
24045 func‐
24046 tion
24047 should
24048 take
24049 one
24050 argu‐
24051 ment:
24052 the
24053 com‐
24054 mand
24055 line
24056 string
24057 to
24058 escape;
24059 and
24060 should
24061 return
24062 the
24063 escaped
24064 com‐
24065 mand
24066 line.
24067
24068
24069 F77 The
24070 For‐
24071 tran
24072 77
24073 com‐
24074 piler.
24075 You
24076 should
24077 nor‐
24078 mally
24079 set
24080 the
24081 $FOR‐
24082 TRAN
24083 vari‐
24084 able,
24085 which
24086 spec‐
24087 i‐
24088 fies
24089 the
24090 default
24091 For‐
24092 tran
24093 com‐
24094 piler
24095 for
24096 all
24097 For‐
24098 tran
24099 ver‐
24100 sions.
24101 You
24102 only
24103 need
24104 to
24105 set
24106 $F77
24107 if
24108 you
24109 need
24110 to
24111 use
24112 a
24113 spe‐
24114 cific
24115 com‐
24116 piler
24117 or
24118 com‐
24119 piler
24120 ver‐
24121 sion
24122 for
24123 For‐
24124 tran
24125 77
24126 files.
24127
24128
24129 F77COM The
24130 com‐
24131 mand
24132 line
24133 used
24134 to
24135 com‐
24136 pile
24137 a
24138 For‐
24139 tran
24140 77
24141 source
24142 file
24143 to
24144 an
24145 object
24146 file.
24147 You
24148 only
24149 need
24150 to
24151 set
24152 $F77COM
24153 if
24154 you
24155 need
24156 to
24157 use
24158 a
24159 spe‐
24160 cific
24161 com‐
24162 mand
24163 line
24164 for
24165 For‐
24166 tran
24167 77
24168 files.
24169 You
24170 should
24171 nor‐
24172 mally
24173 set
24174 the
24175 $FOR‐
24176 TRAN‐
24177 COM
24178 vari‐
24179 able,
24180 which
24181 spec‐
24182 i‐
24183 fies
24184 the
24185 default
24186 com‐
24187 mand
24188 line
24189 for
24190 all
24191 For‐
24192 tran
24193 ver‐
24194 sions.
24195
24196
24197 F77COM‐
24198 STR
24199 The
24200 string
24201 dis‐
24202 played
24203 when
24204 a
24205 For‐
24206 tran
24207 77
24208 source
24209 file
24210 is
24211 com‐
24212 piled
24213 to
24214 an
24215 object
24216 file.
24217 If
24218 this
24219 is
24220 not
24221 set,
24222 then
24223 $F77COM
24224 or
24225 $FOR‐
24226 TRAN‐
24227 COM
24228 (the
24229 com‐
24230 mand
24231 line)
24232 is
24233 dis‐
24234 played.
24235
24236
24237 F77FILE‐
24238 SUF‐
24239 FIXES
24240 The
24241 list
24242 of
24243 file
24244 exten‐
24245 sions
24246 for
24247 which
24248 the
24249 F77
24250 dialect
24251 will
24252 be
24253 used.
24254 By
24255 default,
24256 this
24257 is
24258 ['.f77']
24259
24260
24261 F77FLAGS
24262 Gen‐
24263 eral
24264 user-
24265 spec‐
24266 i‐
24267 fied
24268 options
24269 that
24270 are
24271 passed
24272 to
24273 the
24274 For‐
24275 tran
24276 77
24277 com‐
24278 piler.
24279 Note
24280 that
24281 this
24282 vari‐
24283 able
24284 does
24285 not
24286 con‐
24287 tain
24288 -I
24289 (or
24290 sim‐
24291 i‐
24292 lar)
24293 include
24294 search
24295 path
24296 options
24297 that
24298 scons
24299 gen‐
24300 er‐
24301 ates
24302 auto‐
24303 mat‐
24304 i‐
24305 cally
24306 from
24307 $F77PATH.
24308 See
24309 $_F77INCFLAGS
24310 below,
24311 for
24312 the
24313 vari‐
24314 able
24315 that
24316 expands
24317 to
24318 those
24319 options.
24320 You
24321 only
24322 need
24323 to
24324 set
24325 $F77FLAGS
24326 if
24327 you
24328 need
24329 to
24330 define
24331 spe‐
24332 cific
24333 user
24334 options
24335 for
24336 For‐
24337 tran
24338 77
24339 files.
24340 You
24341 should
24342 nor‐
24343 mally
24344 set
24345 the
24346 $FOR‐
24347 TRAN‐
24348 FLAGS
24349 vari‐
24350 able,
24351 which
24352 spec‐
24353 i‐
24354 fies
24355 the
24356 user-
24357 spec‐
24358 i‐
24359 fied
24360 options
24361 passed
24362 to
24363 the
24364 default
24365 For‐
24366 tran
24367 com‐
24368 piler
24369 for
24370 all
24371 For‐
24372 tran
24373 ver‐
24374 sions.
24375
24376
24377 _F77INCFLAGS
24378 An
24379 auto‐
24380 mat‐
24381 i‐
24382 cally-
24383 gen‐
24384 er‐
24385 ated
24386 con‐
24387 struc‐
24388 tion
24389 vari‐
24390 able
24391 con‐
24392 tain‐
24393 ing
24394 the
24395 For‐
24396 tran
24397 77
24398 com‐
24399 piler
24400 com‐
24401 mand-
24402 line
24403 options
24404 for
24405 spec‐
24406 i‐
24407 fy‐
24408 ing
24409 direc‐
24410 to‐
24411 ries
24412 to
24413 be
24414 searched
24415 for
24416 include
24417 files.
24418 The
24419 value
24420 of
24421 $_F77INCFLAGS
24422 is
24423 cre‐
24424 ated
24425 by
24426 append‐
24427 ing
24428 $INCPRE‐
24429 FIX
24430 and
24431 $INC‐
24432 SUF‐
24433 FIX
24434 to
24435 the
24436 begin‐
24437 ning
24438 and
24439 end
24440 of
24441 each
24442 direc‐
24443 tory
24444 in
24445 $F77PATH.
24446
24447
24448 F77PATH
24449 The
24450 list
24451 of
24452 direc‐
24453 to‐
24454 ries
24455 that
24456 the
24457 For‐
24458 tran
24459 77
24460 com‐
24461 piler
24462 will
24463 search
24464 for
24465 include
24466 direc‐
24467 to‐
24468 ries.
24469 The
24470 implicit
24471 depen‐
24472 dency
24473 scan‐
24474 ner
24475 will
24476 search
24477 these
24478 direc‐
24479 to‐
24480 ries
24481 for
24482 include
24483 files.
24484 Don't
24485 explic‐
24486 itly
24487 put
24488 include
24489 direc‐
24490 tory
24491 argu‐
24492 ments
24493 in
24494 $F77FLAGS
24495 because
24496 the
24497 result
24498 will
24499 be
24500 non-
24501 por‐
24502 ta‐
24503 ble
24504 and
24505 the
24506 direc‐
24507 to‐
24508 ries
24509 will
24510 not
24511 be
24512 searched
24513 by
24514 the
24515 depen‐
24516 dency
24517 scan‐
24518 ner.
24519 Note:
24520 direc‐
24521 tory
24522 names
24523 in
24524 $F77PATH
24525 will
24526 be
24527 looked-
24528 up
24529 rel‐
24530 a‐
24531 tive
24532 to
24533 the
24534 SCon‐
24535 script
24536 direc‐
24537 tory
24538 when
24539 they
24540 are
24541 used
24542 in
24543 a
24544 com‐
24545 mand.
24546 To
24547 force
24548 scons
24549 to
24550 look-
24551 up
24552 a
24553 direc‐
24554 tory
24555 rel‐
24556 a‐
24557 tive
24558 to
24559 the
24560 root
24561 of
24562 the
24563 source
24564 tree
24565 use
24566 #:
24567 You
24568 only
24569 need
24570 to
24571 set
24572 $F77PATH
24573 if
24574 you
24575 need
24576 to
24577 define
24578 a
24579 spe‐
24580 cific
24581 include
24582 path
24583 for
24584 For‐
24585 tran
24586 77
24587 files.
24588 You
24589 should
24590 nor‐
24591 mally
24592 set
24593 the
24594 $FOR‐
24595 TRAN‐
24596 PATH
24597 vari‐
24598 able,
24599 which
24600 spec‐
24601 i‐
24602 fies
24603 the
24604 include
24605 path
24606 for
24607 the
24608 default
24609 For‐
24610 tran
24611 com‐
24612 piler
24613 for
24614 all
24615 For‐
24616 tran
24617 ver‐
24618 sions.
24619
24620 env = Environment(F77PATH='#/include')
24621
24622 The
24623 direc‐
24624 tory
24625 look-
24626 up
24627 can
24628 also
24629 be
24630 forced
24631 using
24632 the
24633 Dir()
24634 func‐
24635 tion:
24636
24637 include = Dir('include')
24638 env = Environment(F77PATH=include)
24639
24640 The
24641 direc‐
24642 tory
24643 list
24644 will
24645 be
24646 added
24647 to
24648 com‐
24649 mand
24650 lines
24651 through
24652 the
24653 auto‐
24654 mat‐
24655 i‐
24656 cally-
24657 gen‐
24658 er‐
24659 ated
24660 $_F77INCFLAGS
24661 con‐
24662 struc‐
24663 tion
24664 vari‐
24665 able,
24666 which
24667 is
24668 con‐
24669 structed
24670 by
24671 append‐
24672 ing
24673 the
24674 val‐
24675 ues
24676 of
24677 the
24678 $INCPRE‐
24679 FIX
24680 and
24681 $INC‐
24682 SUF‐
24683 FIX
24684 con‐
24685 struc‐
24686 tion
24687 vari‐
24688 ables
24689 to
24690 the
24691 begin‐
24692 ning
24693 and
24694 end
24695 of
24696 each
24697 direc‐
24698 tory
24699 in
24700 $F77PATH.
24701 Any
24702 com‐
24703 mand
24704 lines
24705 you
24706 define
24707 that
24708 need
24709 the
24710 F77PATH
24711 direc‐
24712 tory
24713 list
24714 should
24715 include
24716 $_F77INCFLAGS:
24717
24718 env = Environment(F77COM="my_compiler $_F77INCFLAGS -c -o $TARGET $SOURCE")
24719
24720
24721 F77PPCOM
24722 The
24723 com‐
24724 mand
24725 line
24726 used
24727 to
24728 com‐
24729 pile
24730 a
24731 For‐
24732 tran
24733 77
24734 source
24735 file
24736 to
24737 an
24738 object
24739 file
24740 after
24741 first
24742 run‐
24743 ning
24744 the
24745 file
24746 through
24747 the
24748 C
24749 pre‐
24750 proces‐
24751 sor.
24752 Any
24753 options
24754 spec‐
24755 i‐
24756 fied
24757 in
24758 the
24759 $F77FLAGS
24760 and
24761 $CPPFLAGS
24762 con‐
24763 struc‐
24764 tion
24765 vari‐
24766 ables
24767 are
24768 included
24769 on
24770 this
24771 com‐
24772 mand
24773 line.
24774 You
24775 only
24776 need
24777 to
24778 set
24779 $F77PPCOM
24780 if
24781 you
24782 need
24783 to
24784 use
24785 a
24786 spe‐
24787 cific
24788 C-
24789 pre‐
24790 proces‐
24791 sor
24792 com‐
24793 mand
24794 line
24795 for
24796 For‐
24797 tran
24798 77
24799 files.
24800 You
24801 should
24802 nor‐
24803 mally
24804 set
24805 the
24806 $FOR‐
24807 TRANPP‐
24808 COM
24809 vari‐
24810 able,
24811 which
24812 spec‐
24813 i‐
24814 fies
24815 the
24816 default
24817 C-
24818 pre‐
24819 proces‐
24820 sor
24821 com‐
24822 mand
24823 line
24824 for
24825 all
24826 For‐
24827 tran
24828 ver‐
24829 sions.
24830
24831
24832 F77PPCOM‐
24833 STR
24834 The
24835 string
24836 dis‐
24837 played
24838 when
24839 a
24840 For‐
24841 tran
24842 77
24843 source
24844 file
24845 is
24846 com‐
24847 piled
24848 to
24849 an
24850 object
24851 file
24852 after
24853 first
24854 run‐
24855 ning
24856 the
24857 file
24858 through
24859 the
24860 C
24861 pre‐
24862 proces‐
24863 sor.
24864 If
24865 this
24866 is
24867 not
24868 set,
24869 then
24870 $F77PPCOM
24871 or
24872 $FOR‐
24873 TRANPP‐
24874 COM
24875 (the
24876 com‐
24877 mand
24878 line)
24879 is
24880 dis‐
24881 played.
24882
24883
24884 F77PPFILE‐
24885 SUF‐
24886 FIXES
24887 The
24888 list
24889 of
24890 file
24891 exten‐
24892 sions
24893 for
24894 which
24895 the
24896 com‐
24897 pi‐
24898 la‐
24899 tion
24900 +
24901 pre‐
24902 proces‐
24903 sor
24904 pass
24905 for
24906 F77
24907 dialect
24908 will
24909 be
24910 used.
24911 By
24912 default,
24913 this
24914 is
24915 empty
24916
24917
24918 F90 The
24919 For‐
24920 tran
24921 90
24922 com‐
24923 piler.
24924 You
24925 should
24926 nor‐
24927 mally
24928 set
24929 the
24930 $FOR‐
24931 TRAN
24932 vari‐
24933 able,
24934 which
24935 spec‐
24936 i‐
24937 fies
24938 the
24939 default
24940 For‐
24941 tran
24942 com‐
24943 piler
24944 for
24945 all
24946 For‐
24947 tran
24948 ver‐
24949 sions.
24950 You
24951 only
24952 need
24953 to
24954 set
24955 $F90
24956 if
24957 you
24958 need
24959 to
24960 use
24961 a
24962 spe‐
24963 cific
24964 com‐
24965 piler
24966 or
24967 com‐
24968 piler
24969 ver‐
24970 sion
24971 for
24972 For‐
24973 tran
24974 90
24975 files.
24976
24977
24978 F90COM The
24979 com‐
24980 mand
24981 line
24982 used
24983 to
24984 com‐
24985 pile
24986 a
24987 For‐
24988 tran
24989 90
24990 source
24991 file
24992 to
24993 an
24994 object
24995 file.
24996 You
24997 only
24998 need
24999 to
25000 set
25001 $F90COM
25002 if
25003 you
25004 need
25005 to
25006 use
25007 a
25008 spe‐
25009 cific
25010 com‐
25011 mand
25012 line
25013 for
25014 For‐
25015 tran
25016 90
25017 files.
25018 You
25019 should
25020 nor‐
25021 mally
25022 set
25023 the
25024 $FOR‐
25025 TRAN‐
25026 COM
25027 vari‐
25028 able,
25029 which
25030 spec‐
25031 i‐
25032 fies
25033 the
25034 default
25035 com‐
25036 mand
25037 line
25038 for
25039 all
25040 For‐
25041 tran
25042 ver‐
25043 sions.
25044
25045
25046 F90COM‐
25047 STR
25048 The
25049 string
25050 dis‐
25051 played
25052 when
25053 a
25054 For‐
25055 tran
25056 90
25057 source
25058 file
25059 is
25060 com‐
25061 piled
25062 to
25063 an
25064 object
25065 file.
25066 If
25067 this
25068 is
25069 not
25070 set,
25071 then
25072 $F90COM
25073 or
25074 $FOR‐
25075 TRAN‐
25076 COM
25077 (the
25078 com‐
25079 mand
25080 line)
25081 is
25082 dis‐
25083 played.
25084
25085
25086 F90FILE‐
25087 SUF‐
25088 FIXES
25089 The
25090 list
25091 of
25092 file
25093 exten‐
25094 sions
25095 for
25096 which
25097 the
25098 F90
25099 dialect
25100 will
25101 be
25102 used.
25103 By
25104 default,
25105 this
25106 is
25107 ['.f90']
25108
25109
25110 F90FLAGS
25111 Gen‐
25112 eral
25113 user-
25114 spec‐
25115 i‐
25116 fied
25117 options
25118 that
25119 are
25120 passed
25121 to
25122 the
25123 For‐
25124 tran
25125 90
25126 com‐
25127 piler.
25128 Note
25129 that
25130 this
25131 vari‐
25132 able
25133 does
25134 not
25135 con‐
25136 tain
25137 -I
25138 (or
25139 sim‐
25140 i‐
25141 lar)
25142 include
25143 search
25144 path
25145 options
25146 that
25147 scons
25148 gen‐
25149 er‐
25150 ates
25151 auto‐
25152 mat‐
25153 i‐
25154 cally
25155 from
25156 $F90PATH.
25157 See
25158 $_F90INCFLAGS
25159 below,
25160 for
25161 the
25162 vari‐
25163 able
25164 that
25165 expands
25166 to
25167 those
25168 options.
25169 You
25170 only
25171 need
25172 to
25173 set
25174 $F90FLAGS
25175 if
25176 you
25177 need
25178 to
25179 define
25180 spe‐
25181 cific
25182 user
25183 options
25184 for
25185 For‐
25186 tran
25187 90
25188 files.
25189 You
25190 should
25191 nor‐
25192 mally
25193 set
25194 the
25195 $FOR‐
25196 TRAN‐
25197 FLAGS
25198 vari‐
25199 able,
25200 which
25201 spec‐
25202 i‐
25203 fies
25204 the
25205 user-
25206 spec‐
25207 i‐
25208 fied
25209 options
25210 passed
25211 to
25212 the
25213 default
25214 For‐
25215 tran
25216 com‐
25217 piler
25218 for
25219 all
25220 For‐
25221 tran
25222 ver‐
25223 sions.
25224
25225
25226 _F90INCFLAGS
25227 An
25228 auto‐
25229 mat‐
25230 i‐
25231 cally-
25232 gen‐
25233 er‐
25234 ated
25235 con‐
25236 struc‐
25237 tion
25238 vari‐
25239 able
25240 con‐
25241 tain‐
25242 ing
25243 the
25244 For‐
25245 tran
25246 90
25247 com‐
25248 piler
25249 com‐
25250 mand-
25251 line
25252 options
25253 for
25254 spec‐
25255 i‐
25256 fy‐
25257 ing
25258 direc‐
25259 to‐
25260 ries
25261 to
25262 be
25263 searched
25264 for
25265 include
25266 files.
25267 The
25268 value
25269 of
25270 $_F90INCFLAGS
25271 is
25272 cre‐
25273 ated
25274 by
25275 append‐
25276 ing
25277 $INCPRE‐
25278 FIX
25279 and
25280 $INC‐
25281 SUF‐
25282 FIX
25283 to
25284 the
25285 begin‐
25286 ning
25287 and
25288 end
25289 of
25290 each
25291 direc‐
25292 tory
25293 in
25294 $F90PATH.
25295
25296
25297 F90PATH
25298 The
25299 list
25300 of
25301 direc‐
25302 to‐
25303 ries
25304 that
25305 the
25306 For‐
25307 tran
25308 90
25309 com‐
25310 piler
25311 will
25312 search
25313 for
25314 include
25315 direc‐
25316 to‐
25317 ries.
25318 The
25319 implicit
25320 depen‐
25321 dency
25322 scan‐
25323 ner
25324 will
25325 search
25326 these
25327 direc‐
25328 to‐
25329 ries
25330 for
25331 include
25332 files.
25333 Don't
25334 explic‐
25335 itly
25336 put
25337 include
25338 direc‐
25339 tory
25340 argu‐
25341 ments
25342 in
25343 $F90FLAGS
25344 because
25345 the
25346 result
25347 will
25348 be
25349 non-
25350 por‐
25351 ta‐
25352 ble
25353 and
25354 the
25355 direc‐
25356 to‐
25357 ries
25358 will
25359 not
25360 be
25361 searched
25362 by
25363 the
25364 depen‐
25365 dency
25366 scan‐
25367 ner.
25368 Note:
25369 direc‐
25370 tory
25371 names
25372 in
25373 $F90PATH
25374 will
25375 be
25376 looked-
25377 up
25378 rel‐
25379 a‐
25380 tive
25381 to
25382 the
25383 SCon‐
25384 script
25385 direc‐
25386 tory
25387 when
25388 they
25389 are
25390 used
25391 in
25392 a
25393 com‐
25394 mand.
25395 To
25396 force
25397 scons
25398 to
25399 look-
25400 up
25401 a
25402 direc‐
25403 tory
25404 rel‐
25405 a‐
25406 tive
25407 to
25408 the
25409 root
25410 of
25411 the
25412 source
25413 tree
25414 use
25415 #:
25416 You
25417 only
25418 need
25419 to
25420 set
25421 $F90PATH
25422 if
25423 you
25424 need
25425 to
25426 define
25427 a
25428 spe‐
25429 cific
25430 include
25431 path
25432 for
25433 For‐
25434 tran
25435 90
25436 files.
25437 You
25438 should
25439 nor‐
25440 mally
25441 set
25442 the
25443 $FOR‐
25444 TRAN‐
25445 PATH
25446 vari‐
25447 able,
25448 which
25449 spec‐
25450 i‐
25451 fies
25452 the
25453 include
25454 path
25455 for
25456 the
25457 default
25458 For‐
25459 tran
25460 com‐
25461 piler
25462 for
25463 all
25464 For‐
25465 tran
25466 ver‐
25467 sions.
25468
25469 env = Environment(F90PATH='#/include')
25470
25471 The
25472 direc‐
25473 tory
25474 look-
25475 up
25476 can
25477 also
25478 be
25479 forced
25480 using
25481 the
25482 Dir()
25483 func‐
25484 tion:
25485
25486 include = Dir('include')
25487 env = Environment(F90PATH=include)
25488
25489 The
25490 direc‐
25491 tory
25492 list
25493 will
25494 be
25495 added
25496 to
25497 com‐
25498 mand
25499 lines
25500 through
25501 the
25502 auto‐
25503 mat‐
25504 i‐
25505 cally-
25506 gen‐
25507 er‐
25508 ated
25509 $_F90INCFLAGS
25510 con‐
25511 struc‐
25512 tion
25513 vari‐
25514 able,
25515 which
25516 is
25517 con‐
25518 structed
25519 by
25520 append‐
25521 ing
25522 the
25523 val‐
25524 ues
25525 of
25526 the
25527 $INCPRE‐
25528 FIX
25529 and
25530 $INC‐
25531 SUF‐
25532 FIX
25533 con‐
25534 struc‐
25535 tion
25536 vari‐
25537 ables
25538 to
25539 the
25540 begin‐
25541 ning
25542 and
25543 end
25544 of
25545 each
25546 direc‐
25547 tory
25548 in
25549 $F90PATH.
25550 Any
25551 com‐
25552 mand
25553 lines
25554 you
25555 define
25556 that
25557 need
25558 the
25559 F90PATH
25560 direc‐
25561 tory
25562 list
25563 should
25564 include
25565 $_F90INCFLAGS:
25566
25567 env = Environment(F90COM="my_compiler $_F90INCFLAGS -c -o $TARGET $SOURCE")
25568
25569
25570 F90PPCOM
25571 The
25572 com‐
25573 mand
25574 line
25575 used
25576 to
25577 com‐
25578 pile
25579 a
25580 For‐
25581 tran
25582 90
25583 source
25584 file
25585 to
25586 an
25587 object
25588 file
25589 after
25590 first
25591 run‐
25592 ning
25593 the
25594 file
25595 through
25596 the
25597 C
25598 pre‐
25599 proces‐
25600 sor.
25601 Any
25602 options
25603 spec‐
25604 i‐
25605 fied
25606 in
25607 the
25608 $F90FLAGS
25609 and
25610 $CPPFLAGS
25611 con‐
25612 struc‐
25613 tion
25614 vari‐
25615 ables
25616 are
25617 included
25618 on
25619 this
25620 com‐
25621 mand
25622 line.
25623 You
25624 only
25625 need
25626 to
25627 set
25628 $F90PPCOM
25629 if
25630 you
25631 need
25632 to
25633 use
25634 a
25635 spe‐
25636 cific
25637 C-
25638 pre‐
25639 proces‐
25640 sor
25641 com‐
25642 mand
25643 line
25644 for
25645 For‐
25646 tran
25647 90
25648 files.
25649 You
25650 should
25651 nor‐
25652 mally
25653 set
25654 the
25655 $FOR‐
25656 TRANPP‐
25657 COM
25658 vari‐
25659 able,
25660 which
25661 spec‐
25662 i‐
25663 fies
25664 the
25665 default
25666 C-
25667 pre‐
25668 proces‐
25669 sor
25670 com‐
25671 mand
25672 line
25673 for
25674 all
25675 For‐
25676 tran
25677 ver‐
25678 sions.
25679
25680
25681 F90PPCOM‐
25682 STR
25683 The
25684 string
25685 dis‐
25686 played
25687 when
25688 a
25689 For‐
25690 tran
25691 90
25692 source
25693 file
25694 is
25695 com‐
25696 piled
25697 after
25698 first
25699 run‐
25700 ning
25701 the
25702 file
25703 through
25704 the
25705 C
25706 pre‐
25707 proces‐
25708 sor.
25709 If
25710 this
25711 is
25712 not
25713 set,
25714 then
25715 $F90PPCOM
25716 or
25717 $FOR‐
25718 TRANPP‐
25719 COM
25720 (the
25721 com‐
25722 mand
25723 line)
25724 is
25725 dis‐
25726 played.
25727
25728
25729 F90PPFILE‐
25730 SUF‐
25731 FIXES
25732 The
25733 list
25734 of
25735 file
25736 exten‐
25737 sions
25738 for
25739 which
25740 the
25741 com‐
25742 pi‐
25743 la‐
25744 tion
25745 +
25746 pre‐
25747 proces‐
25748 sor
25749 pass
25750 for
25751 F90
25752 dialect
25753 will
25754 be
25755 used.
25756 By
25757 default,
25758 this
25759 is
25760 empty
25761
25762
25763 F95 The
25764 For‐
25765 tran
25766 95
25767 com‐
25768 piler.
25769 You
25770 should
25771 nor‐
25772 mally
25773 set
25774 the
25775 $FOR‐
25776 TRAN
25777 vari‐
25778 able,
25779 which
25780 spec‐
25781 i‐
25782 fies
25783 the
25784 default
25785 For‐
25786 tran
25787 com‐
25788 piler
25789 for
25790 all
25791 For‐
25792 tran
25793 ver‐
25794 sions.
25795 You
25796 only
25797 need
25798 to
25799 set
25800 $F95
25801 if
25802 you
25803 need
25804 to
25805 use
25806 a
25807 spe‐
25808 cific
25809 com‐
25810 piler
25811 or
25812 com‐
25813 piler
25814 ver‐
25815 sion
25816 for
25817 For‐
25818 tran
25819 95
25820 files.
25821
25822
25823 F95COM The
25824 com‐
25825 mand
25826 line
25827 used
25828 to
25829 com‐
25830 pile
25831 a
25832 For‐
25833 tran
25834 95
25835 source
25836 file
25837 to
25838 an
25839 object
25840 file.
25841 You
25842 only
25843 need
25844 to
25845 set
25846 $F95COM
25847 if
25848 you
25849 need
25850 to
25851 use
25852 a
25853 spe‐
25854 cific
25855 com‐
25856 mand
25857 line
25858 for
25859 For‐
25860 tran
25861 95
25862 files.
25863 You
25864 should
25865 nor‐
25866 mally
25867 set
25868 the
25869 $FOR‐
25870 TRAN‐
25871 COM
25872 vari‐
25873 able,
25874 which
25875 spec‐
25876 i‐
25877 fies
25878 the
25879 default
25880 com‐
25881 mand
25882 line
25883 for
25884 all
25885 For‐
25886 tran
25887 ver‐
25888 sions.
25889
25890
25891 F95COM‐
25892 STR
25893 The
25894 string
25895 dis‐
25896 played
25897 when
25898 a
25899 For‐
25900 tran
25901 95
25902 source
25903 file
25904 is
25905 com‐
25906 piled
25907 to
25908 an
25909 object
25910 file.
25911 If
25912 this
25913 is
25914 not
25915 set,
25916 then
25917 $F95COM
25918 or
25919 $FOR‐
25920 TRAN‐
25921 COM
25922 (the
25923 com‐
25924 mand
25925 line)
25926 is
25927 dis‐
25928 played.
25929
25930
25931 F95FILE‐
25932 SUF‐
25933 FIXES
25934 The
25935 list
25936 of
25937 file
25938 exten‐
25939 sions
25940 for
25941 which
25942 the
25943 F95
25944 dialect
25945 will
25946 be
25947 used.
25948 By
25949 default,
25950 this
25951 is
25952 ['.f95']
25953
25954
25955 F95FLAGS
25956 Gen‐
25957 eral
25958 user-
25959 spec‐
25960 i‐
25961 fied
25962 options
25963 that
25964 are
25965 passed
25966 to
25967 the
25968 For‐
25969 tran
25970 95
25971 com‐
25972 piler.
25973 Note
25974 that
25975 this
25976 vari‐
25977 able
25978 does
25979 not
25980 con‐
25981 tain
25982 -I
25983 (or
25984 sim‐
25985 i‐
25986 lar)
25987 include
25988 search
25989 path
25990 options
25991 that
25992 scons
25993 gen‐
25994 er‐
25995 ates
25996 auto‐
25997 mat‐
25998 i‐
25999 cally
26000 from
26001 $F95PATH.
26002 See
26003 $_F95INCFLAGS
26004 below,
26005 for
26006 the
26007 vari‐
26008 able
26009 that
26010 expands
26011 to
26012 those
26013 options.
26014 You
26015 only
26016 need
26017 to
26018 set
26019 $F95FLAGS
26020 if
26021 you
26022 need
26023 to
26024 define
26025 spe‐
26026 cific
26027 user
26028 options
26029 for
26030 For‐
26031 tran
26032 95
26033 files.
26034 You
26035 should
26036 nor‐
26037 mally
26038 set
26039 the
26040 $FOR‐
26041 TRAN‐
26042 FLAGS
26043 vari‐
26044 able,
26045 which
26046 spec‐
26047 i‐
26048 fies
26049 the
26050 user-
26051 spec‐
26052 i‐
26053 fied
26054 options
26055 passed
26056 to
26057 the
26058 default
26059 For‐
26060 tran
26061 com‐
26062 piler
26063 for
26064 all
26065 For‐
26066 tran
26067 ver‐
26068 sions.
26069
26070
26071 _F95INCFLAGS
26072 An
26073 auto‐
26074 mat‐
26075 i‐
26076 cally-
26077 gen‐
26078 er‐
26079 ated
26080 con‐
26081 struc‐
26082 tion
26083 vari‐
26084 able
26085 con‐
26086 tain‐
26087 ing
26088 the
26089 For‐
26090 tran
26091 95
26092 com‐
26093 piler
26094 com‐
26095 mand-
26096 line
26097 options
26098 for
26099 spec‐
26100 i‐
26101 fy‐
26102 ing
26103 direc‐
26104 to‐
26105 ries
26106 to
26107 be
26108 searched
26109 for
26110 include
26111 files.
26112 The
26113 value
26114 of
26115 $_F95INCFLAGS
26116 is
26117 cre‐
26118 ated
26119 by
26120 append‐
26121 ing
26122 $INCPRE‐
26123 FIX
26124 and
26125 $INC‐
26126 SUF‐
26127 FIX
26128 to
26129 the
26130 begin‐
26131 ning
26132 and
26133 end
26134 of
26135 each
26136 direc‐
26137 tory
26138 in
26139 $F95PATH.
26140
26141
26142 F95PATH
26143 The
26144 list
26145 of
26146 direc‐
26147 to‐
26148 ries
26149 that
26150 the
26151 For‐
26152 tran
26153 95
26154 com‐
26155 piler
26156 will
26157 search
26158 for
26159 include
26160 direc‐
26161 to‐
26162 ries.
26163 The
26164 implicit
26165 depen‐
26166 dency
26167 scan‐
26168 ner
26169 will
26170 search
26171 these
26172 direc‐
26173 to‐
26174 ries
26175 for
26176 include
26177 files.
26178 Don't
26179 explic‐
26180 itly
26181 put
26182 include
26183 direc‐
26184 tory
26185 argu‐
26186 ments
26187 in
26188 $F95FLAGS
26189 because
26190 the
26191 result
26192 will
26193 be
26194 non-
26195 por‐
26196 ta‐
26197 ble
26198 and
26199 the
26200 direc‐
26201 to‐
26202 ries
26203 will
26204 not
26205 be
26206 searched
26207 by
26208 the
26209 depen‐
26210 dency
26211 scan‐
26212 ner.
26213 Note:
26214 direc‐
26215 tory
26216 names
26217 in
26218 $F95PATH
26219 will
26220 be
26221 looked-
26222 up
26223 rel‐
26224 a‐
26225 tive
26226 to
26227 the
26228 SCon‐
26229 script
26230 direc‐
26231 tory
26232 when
26233 they
26234 are
26235 used
26236 in
26237 a
26238 com‐
26239 mand.
26240 To
26241 force
26242 scons
26243 to
26244 look-
26245 up
26246 a
26247 direc‐
26248 tory
26249 rel‐
26250 a‐
26251 tive
26252 to
26253 the
26254 root
26255 of
26256 the
26257 source
26258 tree
26259 use
26260 #:
26261 You
26262 only
26263 need
26264 to
26265 set
26266 $F95PATH
26267 if
26268 you
26269 need
26270 to
26271 define
26272 a
26273 spe‐
26274 cific
26275 include
26276 path
26277 for
26278 For‐
26279 tran
26280 95
26281 files.
26282 You
26283 should
26284 nor‐
26285 mally
26286 set
26287 the
26288 $FOR‐
26289 TRAN‐
26290 PATH
26291 vari‐
26292 able,
26293 which
26294 spec‐
26295 i‐
26296 fies
26297 the
26298 include
26299 path
26300 for
26301 the
26302 default
26303 For‐
26304 tran
26305 com‐
26306 piler
26307 for
26308 all
26309 For‐
26310 tran
26311 ver‐
26312 sions.
26313
26314 env = Environment(F95PATH='#/include')
26315
26316 The
26317 direc‐
26318 tory
26319 look-
26320 up
26321 can
26322 also
26323 be
26324 forced
26325 using
26326 the
26327 Dir()
26328 func‐
26329 tion:
26330
26331 include = Dir('include')
26332 env = Environment(F95PATH=include)
26333
26334 The
26335 direc‐
26336 tory
26337 list
26338 will
26339 be
26340 added
26341 to
26342 com‐
26343 mand
26344 lines
26345 through
26346 the
26347 auto‐
26348 mat‐
26349 i‐
26350 cally-
26351 gen‐
26352 er‐
26353 ated
26354 $_F95INCFLAGS
26355 con‐
26356 struc‐
26357 tion
26358 vari‐
26359 able,
26360 which
26361 is
26362 con‐
26363 structed
26364 by
26365 append‐
26366 ing
26367 the
26368 val‐
26369 ues
26370 of
26371 the
26372 $INCPRE‐
26373 FIX
26374 and
26375 $INC‐
26376 SUF‐
26377 FIX
26378 con‐
26379 struc‐
26380 tion
26381 vari‐
26382 ables
26383 to
26384 the
26385 begin‐
26386 ning
26387 and
26388 end
26389 of
26390 each
26391 direc‐
26392 tory
26393 in
26394 $F95PATH.
26395 Any
26396 com‐
26397 mand
26398 lines
26399 you
26400 define
26401 that
26402 need
26403 the
26404 F95PATH
26405 direc‐
26406 tory
26407 list
26408 should
26409 include
26410 $_F95INCFLAGS:
26411
26412 env = Environment(F95COM="my_compiler $_F95INCFLAGS -c -o $TARGET $SOURCE")
26413
26414
26415 F95PPCOM
26416 The
26417 com‐
26418 mand
26419 line
26420 used
26421 to
26422 com‐
26423 pile
26424 a
26425 For‐
26426 tran
26427 95
26428 source
26429 file
26430 to
26431 an
26432 object
26433 file
26434 after
26435 first
26436 run‐
26437 ning
26438 the
26439 file
26440 through
26441 the
26442 C
26443 pre‐
26444 proces‐
26445 sor.
26446 Any
26447 options
26448 spec‐
26449 i‐
26450 fied
26451 in
26452 the
26453 $F95FLAGS
26454 and
26455 $CPPFLAGS
26456 con‐
26457 struc‐
26458 tion
26459 vari‐
26460 ables
26461 are
26462 included
26463 on
26464 this
26465 com‐
26466 mand
26467 line.
26468 You
26469 only
26470 need
26471 to
26472 set
26473 $F95PPCOM
26474 if
26475 you
26476 need
26477 to
26478 use
26479 a
26480 spe‐
26481 cific
26482 C-
26483 pre‐
26484 proces‐
26485 sor
26486 com‐
26487 mand
26488 line
26489 for
26490 For‐
26491 tran
26492 95
26493 files.
26494 You
26495 should
26496 nor‐
26497 mally
26498 set
26499 the
26500 $FOR‐
26501 TRANPP‐
26502 COM
26503 vari‐
26504 able,
26505 which
26506 spec‐
26507 i‐
26508 fies
26509 the
26510 default
26511 C-
26512 pre‐
26513 proces‐
26514 sor
26515 com‐
26516 mand
26517 line
26518 for
26519 all
26520 For‐
26521 tran
26522 ver‐
26523 sions.
26524
26525
26526 F95PPCOM‐
26527 STR
26528 The
26529 string
26530 dis‐
26531 played
26532 when
26533 a
26534 For‐
26535 tran
26536 95
26537 source
26538 file
26539 is
26540 com‐
26541 piled
26542 to
26543 an
26544 object
26545 file
26546 after
26547 first
26548 run‐
26549 ning
26550 the
26551 file
26552 through
26553 the
26554 C
26555 pre‐
26556 proces‐
26557 sor.
26558 If
26559 this
26560 is
26561 not
26562 set,
26563 then
26564 $F95PPCOM
26565 or
26566 $FOR‐
26567 TRANPP‐
26568 COM
26569 (the
26570 com‐
26571 mand
26572 line)
26573 is
26574 dis‐
26575 played.
26576
26577
26578 F95PPFILE‐
26579 SUF‐
26580 FIXES
26581 The
26582 list
26583 of
26584 file
26585 exten‐
26586 sions
26587 for
26588 which
26589 the
26590 com‐
26591 pi‐
26592 la‐
26593 tion
26594 +
26595 pre‐
26596 proces‐
26597 sor
26598 pass
26599 for
26600 F95
26601 dialect
26602 will
26603 be
26604 used.
26605 By
26606 default,
26607 this
26608 is
26609 empty
26610
26611
26612 File A
26613 func‐
26614 tion
26615 that
26616 con‐
26617 verts
26618 a
26619 string
26620 into
26621 a
26622 File
26623 instance
26624 rel‐
26625 a‐
26626 tive
26627 to
26628 the
26629 tar‐
26630 get
26631 being
26632 built.
26633
26634
26635 FOR‐
26636 TRAN The
26637 default
26638 For‐
26639 tran
26640 com‐
26641 piler
26642 for
26643 all
26644 ver‐
26645 sions
26646 of
26647 For‐
26648 tran.
26649
26650
26651 FOR‐
26652 TRAN‐
26653 COM The
26654 com‐
26655 mand
26656 line
26657 used
26658 to
26659 com‐
26660 pile
26661 a
26662 For‐
26663 tran
26664 source
26665 file
26666 to
26667 an
26668 object
26669 file.
26670 By
26671 default,
26672 any
26673 options
26674 spec‐
26675 i‐
26676 fied
26677 in
26678 the
26679 $FOR‐
26680 TRAN‐
26681 FLAGS,
26682 $CPPFLAGS,
26683 $_CPPDEF‐
26684 FLAGS,
26685 $_FOR‐
26686 TRAN‐
26687 MOD‐
26688 FLAG,
26689 and
26690 $_FOR‐
26691 TRAN‐
26692 INCFLAGS
26693 con‐
26694 struc‐
26695 tion
26696 vari‐
26697 ables
26698 are
26699 included
26700 on
26701 this
26702 com‐
26703 mand
26704 line.
26705
26706
26707 FOR‐
26708 TRAN‐
26709 COM‐
26710 STR The
26711 string
26712 dis‐
26713 played
26714 when
26715 a
26716 For‐
26717 tran
26718 source
26719 file
26720 is
26721 com‐
26722 piled
26723 to
26724 an
26725 object
26726 file.
26727 If
26728 this
26729 is
26730 not
26731 set,
26732 then
26733 $FOR‐
26734 TRAN‐
26735 COM
26736 (the
26737 com‐
26738 mand
26739 line)
26740 is
26741 dis‐
26742 played.
26743
26744
26745 FOR‐
26746 TRAN‐
26747 FILE‐
26748 SUF‐
26749 FIXES The
26750 list
26751 of
26752 file
26753 exten‐
26754 sions
26755 for
26756 which
26757 the
26758 FOR‐
26759 TRAN
26760 dialect
26761 will
26762 be
26763 used.
26764 By
26765 default,
26766 this
26767 is
26768 ['.f',
26769 '.for',
26770 '.ftn']
26771
26772
26773 FOR‐
26774 TRAN‐
26775 FLAGS Gen‐
26776 eral
26777 user-
26778 spec‐
26779 i‐
26780 fied
26781 options
26782 that
26783 are
26784 passed
26785 to
26786 the
26787 For‐
26788 tran
26789 com‐
26790 piler.
26791 Note
26792 that
26793 this
26794 vari‐
26795 able
26796 does
26797 not
26798 con‐
26799 tain
26800 -I
26801 (or
26802 sim‐
26803 i‐
26804 lar)
26805 include
26806 or
26807 mod‐
26808 ule
26809 search
26810 path
26811 options
26812 that
26813 scons
26814 gen‐
26815 er‐
26816 ates
26817 auto‐
26818 mat‐
26819 i‐
26820 cally
26821 from
26822 $FOR‐
26823 TRAN‐
26824 PATH.
26825 See
26826 $_FOR‐
26827 TRAN‐
26828 INCFLAGS
26829 and
26830 $_FOR‐
26831 TRAN‐
26832 MOD‐
26833 FLAG,
26834 below,
26835 for
26836 the
26837 vari‐
26838 ables
26839 that
26840 expand
26841 those
26842 options.
26843
26844
26845 _FOR‐
26846 TRAN‐
26847 INCFLAGS
26848 An
26849 auto‐
26850 mat‐
26851 i‐
26852 cally-
26853 gen‐
26854 er‐
26855 ated
26856 con‐
26857 struc‐
26858 tion
26859 vari‐
26860 able
26861 con‐
26862 tain‐
26863 ing
26864 the
26865 For‐
26866 tran
26867 com‐
26868 piler
26869 com‐
26870 mand-
26871 line
26872 options
26873 for
26874 spec‐
26875 i‐
26876 fy‐
26877 ing
26878 direc‐
26879 to‐
26880 ries
26881 to
26882 be
26883 searched
26884 for
26885 include
26886 files
26887 and
26888 mod‐
26889 ule
26890 files.
26891 The
26892 value
26893 of
26894 $_FOR‐
26895 TRAN‐
26896 INCFLAGS
26897 is
26898 cre‐
26899 ated
26900 by
26901 prepend‐
26902 ing/append‐
26903 ing
26904 $INCPRE‐
26905 FIX
26906 and
26907 $INC‐
26908 SUF‐
26909 FIX
26910 to
26911 the
26912 begin‐
26913 ning
26914 and
26915 end
26916 of
26917 each
26918 direc‐
26919 tory
26920 in
26921 $FOR‐
26922 TRAN‐
26923 PATH.
26924
26925
26926 FOR‐
26927 TRAN‐
26928 MOD‐
26929 DIR Direc‐
26930 tory
26931 loca‐
26932 tion
26933 where
26934 the
26935 For‐
26936 tran
26937 com‐
26938 piler
26939 should
26940 place
26941 any
26942 mod‐
26943 ule
26944 files
26945 it
26946 gen‐
26947 er‐
26948 ates.
26949 This
26950 vari‐
26951 able
26952 is
26953 empty,
26954 by
26955 default.
26956 Some
26957 For‐
26958 tran
26959 com‐
26960 pil‐
26961 ers
26962 will
26963 inter‐
26964 nally
26965 append
26966 this
26967 direc‐
26968 tory
26969 in
26970 the
26971 search
26972 path
26973 for
26974 mod‐
26975 ule
26976 files,
26977 as
26978 well.
26979
26980
26981 FOR‐
26982 TRAN‐
26983 MOD‐
26984 DIRPRE‐
26985 FIX
26986 The
26987 pre‐
26988 fix
26989 used
26990 to
26991 spec‐
26992 ify
26993 a
26994 mod‐
26995 ule
26996 direc‐
26997 tory
26998 on
26999 the
27000 For‐
27001 tran
27002 com‐
27003 piler
27004 com‐
27005 mand
27006 line.
27007 This
27008 will
27009 be
27010 appended
27011 to
27012 the
27013 begin‐
27014 ning
27015 of
27016 the
27017 direc‐
27018 tory
27019 in
27020 the
27021 $FOR‐
27022 TRAN‐
27023 MOD‐
27024 DIR
27025 con‐
27026 struc‐
27027 tion
27028 vari‐
27029 ables
27030 when
27031 the
27032 $_FOR‐
27033 TRAN‐
27034 MOD‐
27035 FLAG
27036 vari‐
27037 ables
27038 is
27039 auto‐
27040 mat‐
27041 i‐
27042 cally
27043 gen‐
27044 er‐
27045 ated.
27046
27047
27048 FOR‐
27049 TRAN‐
27050 MOD‐
27051 DIRSUF‐
27052 FIX
27053 The
27054 suf‐
27055 fix
27056 used
27057 to
27058 spec‐
27059 ify
27060 a
27061 mod‐
27062 ule
27063 direc‐
27064 tory
27065 on
27066 the
27067 For‐
27068 tran
27069 com‐
27070 piler
27071 com‐
27072 mand
27073 line.
27074 This
27075 will
27076 be
27077 appended
27078 to
27079 the
27080 begin‐
27081 ning
27082 of
27083 the
27084 direc‐
27085 tory
27086 in
27087 the
27088 $FOR‐
27089 TRAN‐
27090 MOD‐
27091 DIR
27092 con‐
27093 struc‐
27094 tion
27095 vari‐
27096 ables
27097 when
27098 the
27099 $_FOR‐
27100 TRAN‐
27101 MOD‐
27102 FLAG
27103 vari‐
27104 ables
27105 is
27106 auto‐
27107 mat‐
27108 i‐
27109 cally
27110 gen‐
27111 er‐
27112 ated.
27113
27114
27115 _FOR‐
27116 TRAN‐
27117 MOD‐
27118 FLAG An
27119 auto‐
27120 mat‐
27121 i‐
27122 cally-
27123 gen‐
27124 er‐
27125 ated
27126 con‐
27127 struc‐
27128 tion
27129 vari‐
27130 able
27131 con‐
27132 tain‐
27133 ing
27134 the
27135 For‐
27136 tran
27137 com‐
27138 piler
27139 com‐
27140 mand-
27141 line
27142 option
27143 for
27144 spec‐
27145 i‐
27146 fy‐
27147 ing
27148 the
27149 direc‐
27150 tory
27151 loca‐
27152 tion
27153 where
27154 the
27155 For‐
27156 tran
27157 com‐
27158 piler
27159 should
27160 place
27161 any
27162 mod‐
27163 ule
27164 files
27165 that
27166 hap‐
27167 pen
27168 to
27169 get
27170 gen‐
27171 er‐
27172 ated
27173 dur‐
27174 ing
27175 com‐
27176 pi‐
27177 la‐
27178 tion.
27179 The
27180 value
27181 of
27182 $_FOR‐
27183 TRAN‐
27184 MOD‐
27185 FLAG
27186 is
27187 cre‐
27188 ated
27189 by
27190 prepend‐
27191 ing/append‐
27192 ing
27193 $FOR‐
27194 TRAN‐
27195 MOD‐
27196 DIRPRE‐
27197 FIX
27198 and
27199 $FOR‐
27200 TRAN‐
27201 MOD‐
27202 DIRSUF‐
27203 FIX
27204 to
27205 the
27206 begin‐
27207 ning
27208 and
27209 end
27210 of
27211 the
27212 direc‐
27213 tory
27214 in
27215 $FOR‐
27216 TRAN‐
27217 MOD‐
27218 DIR.
27219
27220
27221 FOR‐
27222 TRAN‐
27223 MOD‐
27224 PRE‐
27225 FIX The
27226 mod‐
27227 ule
27228 file
27229 pre‐
27230 fix
27231 used
27232 by
27233 the
27234 For‐
27235 tran
27236 com‐
27237 piler.
27238 SCons
27239 assumes
27240 that
27241 the
27242 For‐
27243 tran
27244 com‐
27245 piler
27246 fol‐
27247 lows
27248 the
27249 quasi-
27250 stan‐
27251 dard
27252 nam‐
27253 ing
27254 con‐
27255 ven‐
27256 tion
27257 for
27258 mod‐
27259 ule
27260 files
27261 of
27262 mod‐
27263 ule_name.mod.
27264 As
27265 a
27266 result,
27267 this
27268 vari‐
27269 able
27270 is
27271 left
27272 empty,
27273 by
27274 default.
27275 For
27276 sit‐
27277 u‐
27278 a‐
27279 tions
27280 in
27281 which
27282 the
27283 com‐
27284 piler
27285 does
27286 not
27287 nec‐
27288 es‐
27289 sar‐
27290 ily
27291 fol‐
27292 low
27293 the
27294 nor‐
27295 mal
27296 con‐
27297 ven‐
27298 tion,
27299 the
27300 user
27301 may
27302 use
27303 this
27304 vari‐
27305 able.
27306 Its
27307 value
27308 will
27309 be
27310 appended
27311 to
27312 every
27313 mod‐
27314 ule
27315 file
27316 name
27317 as
27318 scons
27319 attempts
27320 to
27321 resolve
27322 depen‐
27323 den‐
27324 cies.
27325
27326
27327 FOR‐
27328 TRAN‐
27329 MOD‐
27330 SUF‐
27331 FIX The
27332 mod‐
27333 ule
27334 file
27335 suf‐
27336 fix
27337 used
27338 by
27339 the
27340 For‐
27341 tran
27342 com‐
27343 piler.
27344 SCons
27345 assumes
27346 that
27347 the
27348 For‐
27349 tran
27350 com‐
27351 piler
27352 fol‐
27353 lows
27354 the
27355 quasi-
27356 stan‐
27357 dard
27358 nam‐
27359 ing
27360 con‐
27361 ven‐
27362 tion
27363 for
27364 mod‐
27365 ule
27366 files
27367 of
27368 mod‐
27369 ule_name.mod.
27370 As
27371 a
27372 result,
27373 this
27374 vari‐
27375 able
27376 is
27377 set
27378 to
27379 ".mod",
27380 by
27381 default.
27382 For
27383 sit‐
27384 u‐
27385 a‐
27386 tions
27387 in
27388 which
27389 the
27390 com‐
27391 piler
27392 does
27393 not
27394 nec‐
27395 es‐
27396 sar‐
27397 ily
27398 fol‐
27399 low
27400 the
27401 nor‐
27402 mal
27403 con‐
27404 ven‐
27405 tion,
27406 the
27407 user
27408 may
27409 use
27410 this
27411 vari‐
27412 able.
27413 Its
27414 value
27415 will
27416 be
27417 appended
27418 to
27419 every
27420 mod‐
27421 ule
27422 file
27423 name
27424 as
27425 scons
27426 attempts
27427 to
27428 resolve
27429 depen‐
27430 den‐
27431 cies.
27432
27433
27434 FOR‐
27435 TRAN‐
27436 PATH The
27437 list
27438 of
27439 direc‐
27440 to‐
27441 ries
27442 that
27443 the
27444 For‐
27445 tran
27446 com‐
27447 piler
27448 will
27449 search
27450 for
27451 include
27452 files
27453 and
27454 (for
27455 some
27456 com‐
27457 pil‐
27458 ers)
27459 mod‐
27460 ule
27461 files.
27462 The
27463 For‐
27464 tran
27465 implicit
27466 depen‐
27467 dency
27468 scan‐
27469 ner
27470 will
27471 search
27472 these
27473 direc‐
27474 to‐
27475 ries
27476 for
27477 include
27478 files
27479 (but
27480 not
27481 mod‐
27482 ule
27483 files
27484 since
27485 they
27486 are
27487 auto‐
27488 gen‐
27489 er‐
27490 ated
27491 and,
27492 as
27493 such,
27494 may
27495 not
27496 actu‐
27497 ally
27498 exist
27499 at
27500 the
27501 time
27502 the
27503 scan
27504 takes
27505 place).
27506 Don't
27507 explic‐
27508 itly
27509 put
27510 include
27511 direc‐
27512 tory
27513 argu‐
27514 ments
27515 in
27516 FOR‐
27517 TRAN‐
27518 FLAGS
27519 because
27520 the
27521 result
27522 will
27523 be
27524 non-
27525 por‐
27526 ta‐
27527 ble
27528 and
27529 the
27530 direc‐
27531 to‐
27532 ries
27533 will
27534 not
27535 be
27536 searched
27537 by
27538 the
27539 depen‐
27540 dency
27541 scan‐
27542 ner.
27543 Note:
27544 direc‐
27545 tory
27546 names
27547 in
27548 FOR‐
27549 TRAN‐
27550 PATH
27551 will
27552 be
27553 looked-
27554 up
27555 rel‐
27556 a‐
27557 tive
27558 to
27559 the
27560 SCon‐
27561 script
27562 direc‐
27563 tory
27564 when
27565 they
27566 are
27567 used
27568 in
27569 a
27570 com‐
27571 mand.
27572 To
27573 force
27574 scons
27575 to
27576 look-
27577 up
27578 a
27579 direc‐
27580 tory
27581 rel‐
27582 a‐
27583 tive
27584 to
27585 the
27586 root
27587 of
27588 the
27589 source
27590 tree
27591 use
27592 #:
27593
27594 env = Environment(FORTRANPATH='#/include')
27595
27596 The
27597 direc‐
27598 tory
27599 look-
27600 up
27601 can
27602 also
27603 be
27604 forced
27605 using
27606 the
27607 Dir()
27608 func‐
27609 tion:
27610
27611 include = Dir('include')
27612 env = Environment(FORTRANPATH=include)
27613
27614 The
27615 direc‐
27616 tory
27617 list
27618 will
27619 be
27620 added
27621 to
27622 com‐
27623 mand
27624 lines
27625 through
27626 the
27627 auto‐
27628 mat‐
27629 i‐
27630 cally-
27631 gen‐
27632 er‐
27633 ated
27634 $_FOR‐
27635 TRAN‐
27636 INCFLAGS
27637 con‐
27638 struc‐
27639 tion
27640 vari‐
27641 able,
27642 which
27643 is
27644 con‐
27645 structed
27646 by
27647 append‐
27648 ing
27649 the
27650 val‐
27651 ues
27652 of
27653 the
27654 $INCPRE‐
27655 FIX
27656 and
27657 $INC‐
27658 SUF‐
27659 FIX
27660 con‐
27661 struc‐
27662 tion
27663 vari‐
27664 ables
27665 to
27666 the
27667 begin‐
27668 ning
27669 and
27670 end
27671 of
27672 each
27673 direc‐
27674 tory
27675 in
27676 $FOR‐
27677 TRAN‐
27678 PATH.
27679 Any
27680 com‐
27681 mand
27682 lines
27683 you
27684 define
27685 that
27686 need
27687 the
27688 FOR‐
27689 TRAN‐
27690 PATH
27691 direc‐
27692 tory
27693 list
27694 should
27695 include
27696 $_FOR‐
27697 TRAN‐
27698 INCFLAGS:
27699
27700 env = Environment(FORTRANCOM="my_compiler $_FORTRANINCFLAGS -c -o $TARGET $SOURCE")
27701
27702
27703 FOR‐
27704 TRANPP‐
27705 COM
27706 The
27707 com‐
27708 mand
27709 line
27710 used
27711 to
27712 com‐
27713 pile
27714 a
27715 For‐
27716 tran
27717 source
27718 file
27719 to
27720 an
27721 object
27722 file
27723 after
27724 first
27725 run‐
27726 ning
27727 the
27728 file
27729 through
27730 the
27731 C
27732 pre‐
27733 proces‐
27734 sor.
27735 By
27736 default,
27737 any
27738 options
27739 spec‐
27740 i‐
27741 fied
27742 in
27743 the
27744 $FOR‐
27745 TRAN‐
27746 FLAGS,
27747 $CPPFLAGS,
27748 $_CPPDEF‐
27749 FLAGS,
27750 $_FOR‐
27751 TRAN‐
27752 MOD‐
27753 FLAG,
27754 and
27755 $_FOR‐
27756 TRAN‐
27757 INCFLAGS
27758 con‐
27759 struc‐
27760 tion
27761 vari‐
27762 ables
27763 are
27764 included
27765 on
27766 this
27767 com‐
27768 mand
27769 line.
27770
27771
27772 FOR‐
27773 TRANPP‐
27774 COM‐
27775 STR
27776 The
27777 string
27778 dis‐
27779 played
27780 when
27781 a
27782 For‐
27783 tran
27784 source
27785 file
27786 is
27787 com‐
27788 piled
27789 to
27790 an
27791 object
27792 file
27793 after
27794 first
27795 run‐
27796 ning
27797 the
27798 file
27799 throught
27800 the
27801 C
27802 pre‐
27803 proces‐
27804 sor.
27805 If
27806 this
27807 is
27808 not
27809 set,
27810 then
27811 $FOR‐
27812 TRANPP‐
27813 COM
27814 (the
27815 com‐
27816 mand
27817 line)
27818 is
27819 dis‐
27820 played.
27821
27822
27823 FOR‐
27824 TRANPP‐
27825 FILE‐
27826 SUF‐
27827 FIXES
27828 The
27829 list
27830 of
27831 file
27832 exten‐
27833 sions
27834 for
27835 which
27836 the
27837 com‐
27838 pi‐
27839 la‐
27840 tion
27841 +
27842 pre‐
27843 proces‐
27844 sor
27845 pass
27846 for
27847 FOR‐
27848 TRAN
27849 dialect
27850 will
27851 be
27852 used.
27853 By
27854 default,
27855 this
27856 is
27857 ['.fpp',
27858 '.FPP']
27859
27860
27861 FOR‐
27862 TRAN‐
27863 SUF‐
27864 FIXES The
27865 list
27866 of
27867 suf‐
27868 fixes
27869 of
27870 files
27871 that
27872 will
27873 be
27874 scanned
27875 for
27876 For‐
27877 tran
27878 implicit
27879 depen‐
27880 den‐
27881 cies
27882 (INCLUDE
27883 lines
27884 and
27885 USE
27886 state‐
27887 ments).
27888 The
27889 default
27890 list
27891 is:
27892
27893 [".f", ".F", ".for", ".FOR", ".ftn", ".FTN", ".fpp", ".FPP",
27894 ".f77", ".F77", ".f90", ".F90", ".f95", ".F95"]
27895
27896
27897 FRAME‐
27898 WORK‐
27899 PATH On
27900 Mac
27901 OS
27902 X
27903 with
27904 gcc,
27905 a
27906 list
27907 con‐
27908 tain‐
27909 ing
27910 the
27911 paths
27912 to
27913 search
27914 for
27915 frame‐
27916 works.
27917 Used
27918 by
27919 the
27920 com‐
27921 piler
27922 to
27923 find
27924 frame‐
27925 work-
27926 style
27927 includes
27928 like
27929 #include
27930 <Fmwk/Header.h>.
27931 Used
27932 by
27933 the
27934 linker
27935 to
27936 find
27937 user-
27938 spec‐
27939 i‐
27940 fied
27941 frame‐
27942 works
27943 when
27944 link‐
27945 ing
27946 (see
27947 $FRAME‐
27948 WORKS).
27949 For
27950 exam‐
27951 ple:
27952
27953 env.AppendUnique(FRAMEWORKPATH='#myframeworkdir')
27954
27955 will
27956 add
27957
27958 ... -Fmyframeworkdir
27959
27960 to
27961 the
27962 com‐
27963 piler
27964 and
27965 linker
27966 com‐
27967 mand
27968 lines.
27969
27970
27971 _FRAME‐
27972 WORK‐
27973 PATH
27974 On
27975 Mac
27976 OS
27977 X
27978 with
27979 gcc,
27980 an
27981 auto‐
27982 mat‐
27983 i‐
27984 cally-
27985 gen‐
27986 er‐
27987 ated
27988 con‐
27989 struc‐
27990 tion
27991 vari‐
27992 able
27993 con‐
27994 tain‐
27995 ing
27996 the
27997 linker
27998 com‐
27999 mand-
28000 line
28001 options
28002 cor‐
28003 re‐
28004 spond‐
28005 ing
28006 to
28007 $FRAME‐
28008 WORK‐
28009 PATH.
28010
28011
28012 FRAME‐
28013 WORK‐
28014 PATH‐
28015 PRE‐
28016 FIX On
28017 Mac
28018 OS
28019 X
28020 with
28021 gcc,
28022 the
28023 pre‐
28024 fix
28025 to
28026 be
28027 used
28028 for
28029 the
28030 FRAME‐
28031 WORK‐
28032 PATH
28033 entries.
28034 (see
28035 $FRAME‐
28036 WORK‐
28037 PATH).
28038 The
28039 default
28040 value
28041 is
28042 -F.
28043
28044
28045 FRAME‐
28046 WORKPRE‐
28047 FIX
28048 On
28049 Mac
28050 OS
28051 X
28052 with
28053 gcc,
28054 the
28055 pre‐
28056 fix
28057 to
28058 be
28059 used
28060 for
28061 link‐
28062 ing
28063 in
28064 frame‐
28065 works
28066 (see
28067 $FRAME‐
28068 WORKS).
28069 The
28070 default
28071 value
28072 is
28073 -frame‐
28074 work.
28075
28076
28077 _FRAME‐
28078 WORKS
28079 On
28080 Mac
28081 OS
28082 X
28083 with
28084 gcc,
28085 an
28086 auto‐
28087 mat‐
28088 i‐
28089 cally-
28090 gen‐
28091 er‐
28092 ated
28093 con‐
28094 struc‐
28095 tion
28096 vari‐
28097 able
28098 con‐
28099 tain‐
28100 ing
28101 the
28102 linker
28103 com‐
28104 mand-
28105 line
28106 options
28107 for
28108 link‐
28109 ing
28110 with
28111 FRAME‐
28112 WORKS.
28113
28114
28115 FRAME‐
28116 WORKS On
28117 Mac
28118 OS
28119 X
28120 with
28121 gcc,
28122 a
28123 list
28124 of
28125 the
28126 frame‐
28127 work
28128 names
28129 to
28130 be
28131 linked
28132 into
28133 a
28134 pro‐
28135 gram
28136 or
28137 shared
28138 library
28139 or
28140 bun‐
28141 dle.
28142 The
28143 default
28144 value
28145 is
28146 the
28147 empty
28148 list.
28149 For
28150 exam‐
28151 ple:
28152
28153 env.AppendUnique(FRAMEWORKS=Split('System Cocoa SystemConfiguration'))
28154
28155 FRAME‐
28156 WORKS‐
28157 FLAGS On
28158 Mac
28159 OS
28160 X
28161 with
28162 gcc,
28163 gen‐
28164 eral
28165 user-
28166 sup‐
28167 plied
28168 frame‐
28169 works
28170 options
28171 to
28172 be
28173 added
28174 at
28175 the
28176 end
28177 of
28178 a
28179 com‐
28180 mand
28181 line
28182 build‐
28183 ing
28184 a
28185 load‐
28186 able
28187 mod‐
28188 ule.
28189 (This
28190 has
28191 been
28192 largely
28193 superceded
28194 by
28195 the
28196 $FRAME‐
28197 WORK‐
28198 PATH,
28199 $FRAME‐
28200 WORK‐
28201 PATH‐
28202 PRE‐
28203 FIX,
28204 $FRAME‐
28205 WORKPRE‐
28206 FIX
28207 and
28208 $FRAME‐
28209 WORKS
28210 vari‐
28211 ables
28212 described
28213 above.)
28214
28215
28216 GS The
28217 Ghost‐
28218 script
28219 pro‐
28220 gram
28221 used
28222 to
28223 con‐
28224 vert
28225 Post‐
28226 Script
28227 to
28228 PDF
28229 files.
28230
28231
28232 GSCOM The
28233 Ghost‐
28234 script
28235 com‐
28236 mand
28237 line
28238 used
28239 to
28240 con‐
28241 vert
28242 Post‐
28243 Script
28244 to
28245 PDF
28246 files.
28247
28248
28249 GSCOM‐
28250 STR The
28251 string
28252 dis‐
28253 played
28254 when
28255 Ghost‐
28256 script
28257 is
28258 used
28259 to
28260 con‐
28261 vert
28262 a
28263 Post‐
28264 Script
28265 file
28266 to
28267 a
28268 PDF
28269 file.
28270 If
28271 this
28272 is
28273 not
28274 set,
28275 then
28276 $GSCOM
28277 (the
28278 com‐
28279 mand
28280 line)
28281 is
28282 dis‐
28283 played.
28284
28285
28286 GSFLAGS
28287 Gen‐
28288 eral
28289 options
28290 passed
28291 to
28292 the
28293 Ghost‐
28294 script
28295 pro‐
28296 gram
28297 when
28298 con‐
28299 vert‐
28300 ing
28301 Post‐
28302 Script
28303 to
28304 PDF
28305 files.
28306
28307
28308 IDL‐
28309 SUF‐
28310 FIXES The
28311 list
28312 of
28313 suf‐
28314 fixes
28315 of
28316 files
28317 that
28318 will
28319 be
28320 scanned
28321 for
28322 IDL
28323 implicit
28324 depen‐
28325 den‐
28326 cies
28327 (#include
28328 or
28329 import
28330 lines).
28331 The
28332 default
28333 list
28334 is:
28335
28336 [".idl", ".IDL"]
28337
28338
28339 IMPLICIT_COM‐
28340 MAND_DEPEN‐
28341 DEN‐
28342 CIES
28343 Con‐
28344 trols
28345 whether
28346 or
28347 not
28348 SCons
28349 will
28350 add
28351 implicit
28352 depen‐
28353 den‐
28354 cies
28355 for
28356 the
28357 com‐
28358 mands
28359 exe‐
28360 cuted
28361 to
28362 build
28363 tar‐
28364 gets.
28365
28366 By
28367 default,
28368 SCons
28369 will
28370 add
28371 to
28372 each
28373 tar‐
28374 get
28375 an
28376 implicit
28377 depen‐
28378 dency
28379 on
28380 the
28381 com‐
28382 mand
28383 rep‐
28384 re‐
28385 sented
28386 by
28387 the
28388 first
28389 argu‐
28390 ment
28391 on
28392 any
28393 com‐
28394 mand
28395 line
28396 it
28397 exe‐
28398 cutes.
28399 The
28400 spe‐
28401 cific
28402 file
28403 for
28404 the
28405 depen‐
28406 dency
28407 is
28408 found
28409 by
28410 search‐
28411 ing
28412 the
28413 PATH
28414 vari‐
28415 able
28416 in
28417 the
28418 ENV
28419 envi‐
28420 ron‐
28421 ment
28422 used
28423 to
28424 exe‐
28425 cute
28426 the
28427 com‐
28428 mand.
28429
28430 If
28431 the
28432 con‐
28433 struc‐
28434 tion
28435 vari‐
28436 able
28437 $IMPLICIT_COM‐
28438 MAND_DEPEN‐
28439 DEN‐
28440 CIES
28441 is
28442 set
28443 to
28444 a
28445 false
28446 value
28447 (None,
28448 False,
28449 0,
28450 etc.),
28451 then
28452 the
28453 implicit
28454 depen‐
28455 dency
28456 will
28457 not
28458 be
28459 added
28460 to
28461 the
28462 tar‐
28463 gets
28464 built
28465 with
28466 that
28467 con‐
28468 struc‐
28469 tion
28470 envi‐
28471 ron‐
28472 ment.
28473
28474 env = Environment(IMPLICIT_COMMAND_DEPENDENCIES = 0)
28475
28476
28477 INCPRE‐
28478 FIX
28479 The
28480 pre‐
28481 fix
28482 used
28483 to
28484 spec‐
28485 ify
28486 an
28487 include
28488 direc‐
28489 tory
28490 on
28491 the
28492 C
28493 com‐
28494 piler
28495 com‐
28496 mand
28497 line.
28498 This
28499 will
28500 be
28501 appended
28502 to
28503 the
28504 begin‐
28505 ning
28506 of
28507 each
28508 direc‐
28509 tory
28510 in
28511 the
28512 $CPP‐
28513 PATH
28514 and
28515 $FOR‐
28516 TRAN‐
28517 PATH
28518 con‐
28519 struc‐
28520 tion
28521 vari‐
28522 ables
28523 when
28524 the
28525 $_CPPINCFLAGS
28526 and
28527 $_FOR‐
28528 TRAN‐
28529 INCFLAGS
28530 vari‐
28531 ables
28532 are
28533 auto‐
28534 mat‐
28535 i‐
28536 cally
28537 gen‐
28538 er‐
28539 ated.
28540
28541
28542 INC‐
28543 SUF‐
28544 FIX The
28545 suf‐
28546 fix
28547 used
28548 to
28549 spec‐
28550 ify
28551 an
28552 include
28553 direc‐
28554 tory
28555 on
28556 the
28557 C
28558 com‐
28559 piler
28560 com‐
28561 mand
28562 line.
28563 This
28564 will
28565 be
28566 appended
28567 to
28568 the
28569 end
28570 of
28571 each
28572 direc‐
28573 tory
28574 in
28575 the
28576 $CPP‐
28577 PATH
28578 and
28579 $FOR‐
28580 TRAN‐
28581 PATH
28582 con‐
28583 struc‐
28584 tion
28585 vari‐
28586 ables
28587 when
28588 the
28589 $_CPPINCFLAGS
28590 and
28591 $_FOR‐
28592 TRAN‐
28593 INCFLAGS
28594 vari‐
28595 ables
28596 are
28597 auto‐
28598 mat‐
28599 i‐
28600 cally
28601 gen‐
28602 er‐
28603 ated.
28604
28605
28606 INSTALL
28607 A
28608 func‐
28609 tion
28610 to
28611 be
28612 called
28613 to
28614 install
28615 a
28616 file
28617 into
28618 a
28619 des‐
28620 ti‐
28621 na‐
28622 tion
28623 file
28624 name.
28625 The
28626 default
28627 func‐
28628 tion
28629 copies
28630 the
28631 file
28632 into
28633 the
28634 des‐
28635 ti‐
28636 na‐
28637 tion
28638 (and
28639 sets
28640 the
28641 des‐
28642 ti‐
28643 na‐
28644 tion
28645 file's
28646 mode
28647 and
28648 per‐
28649 mis‐
28650 sion
28651 bits
28652 to
28653 match
28654 the
28655 source
28656 file's).
28657 The
28658 func‐
28659 tion
28660 takes
28661 the
28662 fol‐
28663 low‐
28664 ing
28665 argu‐
28666 ments:
28667
28668 def install(dest, source, env):
28669
28670 dest
28671 is
28672 the
28673 path
28674 name
28675 of
28676 the
28677 des‐
28678 ti‐
28679 na‐
28680 tion
28681 file.
28682 source
28683 is
28684 the
28685 path
28686 name
28687 of
28688 the
28689 source
28690 file.
28691 env
28692 is
28693 the
28694 con‐
28695 struc‐
28696 tion
28697 envi‐
28698 ron‐
28699 ment
28700 (a
28701 dic‐
28702 tio‐
28703 nary
28704 of
28705 con‐
28706 struc‐
28707 tion
28708 val‐
28709 ues)
28710 in
28711 force
28712 for
28713 this
28714 file
28715 instal‐
28716 la‐
28717 tion.
28718
28719
28720 INSTALL‐
28721 STR
28722 The
28723 string
28724 dis‐
28725 played
28726 when
28727 a
28728 file
28729 is
28730 installed
28731 into
28732 a
28733 des‐
28734 ti‐
28735 na‐
28736 tion
28737 file
28738 name.
28739 The
28740 default
28741 is:
28742 Install file: "$SOURCE" as "$TARGET"
28743
28744
28745 INTEL_C_COM‐
28746 PILER_VER‐
28747 SION
28748 Set
28749 by
28750 the
28751 "intelc"
28752 Tool
28753 to
28754 the
28755 major
28756 ver‐
28757 sion
28758 num‐
28759 ber
28760 of
28761 the
28762 Intel
28763 C
28764 com‐
28765 piler
28766 selected
28767 for
28768 use.
28769
28770
28771 JAR The
28772 Java
28773 ar‐
28774 chive
28775 tool.
28776
28777
28778 JARCHDIR
28779 The
28780 direc‐
28781 tory
28782 to
28783 which
28784 the
28785 Java
28786 ar‐
28787 chive
28788 tool
28789 should
28790 change
28791 (using
28792 the
28793 -C
28794 option).
28795
28796
28797 JAR‐
28798 COM The
28799 com‐
28800 mand
28801 line
28802 used
28803 to
28804 call
28805 the
28806 Java
28807 ar‐
28808 chive
28809 tool.
28810
28811
28812 JAR‐
28813 COM‐
28814 STR The
28815 string
28816 dis‐
28817 played
28818 when
28819 the
28820 Java
28821 ar‐
28822 chive
28823 tool
28824 is
28825 called
28826 If
28827 this
28828 is
28829 not
28830 set,
28831 then
28832 $JAR‐
28833 COM
28834 (the
28835 com‐
28836 mand
28837 line)
28838 is
28839 dis‐
28840 played.
28841
28842 env = Environment(JARCOMSTR = "JARchiving $SOURCES into $TARGET")
28843
28844
28845 JARFLAGS
28846 Gen‐
28847 eral
28848 options
28849 passed
28850 to
28851 the
28852 Java
28853 ar‐
28854 chive
28855 tool.
28856 By
28857 default
28858 this
28859 is
28860 set
28861 to
28862 cf
28863 to
28864 cre‐
28865 ate
28866 the
28867 nec‐
28868 es‐
28869 sary
28870 jar
28871 file.
28872
28873
28874 JAR‐
28875 SUF‐
28876 FIX The
28877 suf‐
28878 fix
28879 for
28880 Java
28881 ar‐
28882 chives:
28883 .jar
28884 by
28885 default.
28886
28887
28888 JAV‐
28889 ABOOT‐
28890 CLASS‐
28891 PATH Spec‐
28892 i‐
28893 fies
28894 the
28895 list
28896 of
28897 direc‐
28898 to‐
28899 ries
28900 that
28901 will
28902 be
28903 added
28904 to
28905 the
28906 &javac;
28907 com‐
28908 mand
28909 line
28910 via
28911 the
28912 -boot‐
28913 class‐
28914 path
28915 option.
28916 The
28917 indi‐
28918 vid‐
28919 ual
28920 direc‐
28921 tory
28922 names
28923 will
28924 be
28925 sep‐
28926 a‐
28927 rated
28928 by
28929 the
28930 oper‐
28931 at‐
28932 ing
28933 sys‐
28934 tem's
28935 path
28936 sep‐
28937 a‐
28938 rate
28939 char‐
28940 ac‐
28941 ter
28942 (:
28943 on
28944 UNIX/Linux/POSIX,
28945 ;
28946 on
28947 Win‐
28948 dows).
28949
28950
28951 JAVAC The
28952 Java
28953 com‐
28954 piler.
28955
28956
28957 JAVAC‐
28958 COM The
28959 com‐
28960 mand
28961 line
28962 used
28963 to
28964 com‐
28965 pile
28966 a
28967 direc‐
28968 tory
28969 tree
28970 con‐
28971 tain‐
28972 ing
28973 Java
28974 source
28975 files
28976 to
28977 cor‐
28978 re‐
28979 spond‐
28980 ing
28981 Java
28982 class
28983 files.
28984 Any
28985 options
28986 spec‐
28987 i‐
28988 fied
28989 in
28990 the
28991 $JAVACFLAGS
28992 con‐
28993 struc‐
28994 tion
28995 vari‐
28996 able
28997 are
28998 included
28999 on
29000 this
29001 com‐
29002 mand
29003 line.
29004
29005
29006 JAVAC‐
29007 COM‐
29008 STR The
29009 string
29010 dis‐
29011 played
29012 when
29013 com‐
29014 pil‐
29015 ing
29016 a
29017 direc‐
29018 tory
29019 tree
29020 of
29021 Java
29022 source
29023 files
29024 to
29025 cor‐
29026 re‐
29027 spond‐
29028 ing
29029 Java
29030 class
29031 files.
29032 If
29033 this
29034 is
29035 not
29036 set,
29037 then
29038 $JAVAC‐
29039 COM
29040 (the
29041 com‐
29042 mand
29043 line)
29044 is
29045 dis‐
29046 played.
29047
29048 env = Environment(JAVACCOMSTR = "Compiling class files $TARGETS from $SOURCES")
29049
29050
29051 JAVACFLAGS
29052 Gen‐
29053 eral
29054 options
29055 that
29056 are
29057 passed
29058 to
29059 the
29060 Java
29061 com‐
29062 piler.
29063
29064
29065 JAVA‐
29066 CLASS‐
29067 DIR The
29068 direc‐
29069 tory
29070 in
29071 which
29072 Java
29073 class
29074 files
29075 may
29076 be
29077 found.
29078 This
29079 is
29080 stripped
29081 from
29082 the
29083 begin‐
29084 ning
29085 of
29086 any
29087 Java
29088 .class
29089 file
29090 names
29091 sup‐
29092 plied
29093 to
29094 the
29095 JavaH
29096 builder.
29097
29098
29099 JAVA‐
29100 CLASS‐
29101 PATH Spec‐
29102 i‐
29103 fies
29104 the
29105 list
29106 of
29107 direc‐
29108 to‐
29109 ries
29110 that
29111 will
29112 be
29113 searched
29114 for
29115 Java
29116 .class
29117 file.
29118 The
29119 direc‐
29120 to‐
29121 ries
29122 in
29123 this
29124 list
29125 will
29126 be
29127 added
29128 to
29129 the
29130 &javac;
29131 and
29132 &javah;
29133 com‐
29134 mand
29135 lines
29136 via
29137 the
29138 -class‐
29139 path
29140 option.
29141 The
29142 indi‐
29143 vid‐
29144 ual
29145 direc‐
29146 tory
29147 names
29148 will
29149 be
29150 sep‐
29151 a‐
29152 rated
29153 by
29154 the
29155 oper‐
29156 at‐
29157 ing
29158 sys‐
29159 tem's
29160 path
29161 sep‐
29162 a‐
29163 rate
29164 char‐
29165 ac‐
29166 ter
29167 (:
29168 on
29169 UNIX/Linux/POSIX,
29170 ;
29171 on
29172 Win‐
29173 dows).
29174
29175 Note
29176 that
29177 this
29178 cur‐
29179 rently
29180 just
29181 adds
29182 the
29183 spec‐
29184 i‐
29185 fied
29186 direc‐
29187 tory
29188 via
29189 the
29190 -class‐
29191 path
29192 option.
29193 &SCons;
29194 does
29195 not
29196 cur‐
29197 rently
29198 search
29199 the
29200 $JAVA‐
29201 CLASS‐
29202 PATH
29203 direc‐
29204 to‐
29205 ries
29206 for
29207 depen‐
29208 dency
29209 .class
29210 files.
29211
29212
29213 JAVA‐
29214 CLASS‐
29215 SUF‐
29216 FIX The
29217 suf‐
29218 fix
29219 for
29220 Java
29221 class
29222 files;
29223 .class
29224 by
29225 default.
29226
29227
29228 JAVAH The
29229 Java
29230 gen‐
29231 er‐
29232 a‐
29233 tor
29234 for
29235 C
29236 header
29237 and
29238 stub
29239 files.
29240
29241
29242 JAVAH‐
29243 COM The
29244 com‐
29245 mand
29246 line
29247 used
29248 to
29249 gen‐
29250 er‐
29251 ate
29252 C
29253 header
29254 and
29255 stub
29256 files
29257 from
29258 Java
29259 classes.
29260 Any
29261 options
29262 spec‐
29263 i‐
29264 fied
29265 in
29266 the
29267 $JAVAH‐
29268 FLAGS
29269 con‐
29270 struc‐
29271 tion
29272 vari‐
29273 able
29274 are
29275 included
29276 on
29277 this
29278 com‐
29279 mand
29280 line.
29281
29282
29283 JAVAH‐
29284 COM‐
29285 STR The
29286 string
29287 dis‐
29288 played
29289 when
29290 C
29291 header
29292 and
29293 stub
29294 files
29295 are
29296 gen‐
29297 er‐
29298 ated
29299 from
29300 Java
29301 classes.
29302 If
29303 this
29304 is
29305 not
29306 set,
29307 then
29308 $JAVAH‐
29309 COM
29310 (the
29311 com‐
29312 mand
29313 line)
29314 is
29315 dis‐
29316 played.
29317
29318 env = Environment(JAVAHCOMSTR = "Generating header/stub file(s) $TARGETS from $SOURCES")
29319
29320
29321 JAVAH‐
29322 FLAGS Gen‐
29323 eral
29324 options
29325 passed
29326 to
29327 the
29328 C
29329 header
29330 and
29331 stub
29332 file
29333 gen‐
29334 er‐
29335 a‐
29336 tor
29337 for
29338 Java
29339 classes.
29340
29341
29342 JAVA‐
29343 SOUR‐
29344 CEPATH Spec‐
29345 i‐
29346 fies
29347 the
29348 list
29349 of
29350 direc‐
29351 to‐
29352 ries
29353 that
29354 will
29355 be
29356 searched
29357 for
29358 input
29359 .java
29360 file.
29361 The
29362 direc‐
29363 to‐
29364 ries
29365 in
29366 this
29367 list
29368 will
29369 be
29370 added
29371 to
29372 the
29373 &javac;
29374 com‐
29375 mand
29376 line
29377 via
29378 the
29379 -sour‐
29380 cepath
29381 option.
29382 The
29383 indi‐
29384 vid‐
29385 ual
29386 direc‐
29387 tory
29388 names
29389 will
29390 be
29391 sep‐
29392 a‐
29393 rated
29394 by
29395 the
29396 oper‐
29397 at‐
29398 ing
29399 sys‐
29400 tem's
29401 path
29402 sep‐
29403 a‐
29404 rate
29405 char‐
29406 ac‐
29407 ter
29408 (:
29409 on
29410 UNIX/Linux/POSIX,
29411 ;
29412 on
29413 Win‐
29414 dows).
29415
29416 Note
29417 that
29418 this
29419 cur‐
29420 rently
29421 just
29422 adds
29423 the
29424 spec‐
29425 i‐
29426 fied
29427 direc‐
29428 tory
29429 via
29430 the
29431 -sour‐
29432 cepath
29433 option.
29434 &SCons;
29435 does
29436 not
29437 cur‐
29438 rently
29439 search
29440 the
29441 $JAVA‐
29442 SOUR‐
29443 CEPATH
29444 direc‐
29445 to‐
29446 ries
29447 for
29448 depen‐
29449 dency
29450 .java
29451 files.
29452
29453
29454 JAVA‐
29455 SUF‐
29456 FIX The
29457 suf‐
29458 fix
29459 for
29460 Java
29461 files;
29462 .java
29463 by
29464 default.
29465
29466
29467 JAVAVER‐
29468 SION
29469 Spec‐
29470 i‐
29471 fies
29472 the
29473 Java
29474 ver‐
29475 sion
29476 being
29477 used
29478 by
29479 the
29480 Java()
29481 builder.
29482 This
29483 is
29484 not
29485 cur‐
29486 rently
29487 used
29488 to
29489 select
29490 one
29491 ver‐
29492 sion
29493 of
29494 the
29495 Java
29496 com‐
29497 piler
29498 vs.
29499 another.
29500 Instead,
29501 you
29502 should
29503 set
29504 this
29505 to
29506 spec‐
29507 ify
29508 the
29509 ver‐
29510 sion
29511 of
29512 Java
29513 sup‐
29514 ported
29515 by
29516 your
29517 &javac;
29518 com‐
29519 piler.
29520 The
29521 default
29522 is
29523 1.4.
29524
29525 This
29526 is
29527 some‐
29528 times
29529 nec‐
29530 es‐
29531 sary
29532 because
29533 Java
29534 1.5
29535 changed
29536 the
29537 file
29538 names
29539 that
29540 are
29541 cre‐
29542 ated
29543 for
29544 nested
29545 anony‐
29546 mous
29547 inner
29548 classes,
29549 which
29550 can
29551 cause
29552 a
29553 mis‐
29554 match
29555 with
29556 the
29557 files
29558 that
29559 &SCons;
29560 expects
29561 will
29562 be
29563 gen‐
29564 er‐
29565 ated
29566 by
29567 the
29568 &javac;
29569 com‐
29570 piler.
29571 Set‐
29572 ting
29573 $JAVAVER‐
29574 SION
29575 to
29576 1.5
29577 (or
29578 1.6,
29579 as
29580 appro‐
29581 pri‐
29582 ate)
29583 can
29584 make
29585 &SCons;
29586 real‐
29587 ize
29588 that
29589 a
29590 Java
29591 1.5
29592 or
29593 1.6
29594 build
29595 is
29596 actu‐
29597 ally
29598 up
29599 to
29600 date.
29601
29602
29603 LATEX The
29604 LaTeX
29605 struc‐
29606 tured
29607 for‐
29608 mat‐
29609 ter
29610 and
29611 type‐
29612 set‐
29613 ter.
29614
29615
29616 LATEX‐
29617 COM The
29618 com‐
29619 mand
29620 line
29621 used
29622 to
29623 call
29624 the
29625 LaTeX
29626 struc‐
29627 tured
29628 for‐
29629 mat‐
29630 ter
29631 and
29632 type‐
29633 set‐
29634 ter.
29635
29636
29637 LATEX‐
29638 COM‐
29639 STR The
29640 string
29641 dis‐
29642 played
29643 when
29644 call‐
29645 ing
29646 the
29647 LaTeX
29648 struc‐
29649 tured
29650 for‐
29651 mat‐
29652 ter
29653 and
29654 type‐
29655 set‐
29656 ter.
29657 If
29658 this
29659 is
29660 not
29661 set,
29662 then
29663 $LATEX‐
29664 COM
29665 (the
29666 com‐
29667 mand
29668 line)
29669 is
29670 dis‐
29671 played.
29672
29673 env = Environment(LATEXCOMSTR = "Building $TARGET from LaTeX input $SOURCES")
29674
29675
29676 LATEXFLAGS
29677 Gen‐
29678 eral
29679 options
29680 passed
29681 to
29682 the
29683 LaTeX
29684 struc‐
29685 tured
29686 for‐
29687 mat‐
29688 ter
29689 and
29690 type‐
29691 set‐
29692 ter.
29693
29694
29695 LATEXRE‐
29696 TRIES
29697 The
29698 max‐
29699 i‐
29700 mum
29701 num‐
29702 ber
29703 of
29704 times
29705 that
29706 LaTeX
29707 will
29708 be
29709 re-
29710 run
29711 if
29712 the
29713 .log
29714 gen‐
29715 er‐
29716 ated
29717 by
29718 the
29719 $LATEX‐
29720 COM
29721 com‐
29722 mand
29723 indi‐
29724 cates
29725 that
29726 there
29727 are
29728 unde‐
29729 fined
29730 ref‐
29731 er‐
29732 ences.
29733 The
29734 default
29735 is
29736 to
29737 try
29738 to
29739 resolve
29740 unde‐
29741 fined
29742 ref‐
29743 er‐
29744 ences
29745 by
29746 re-
29747 run‐
29748 ning
29749 LaTeX
29750 up
29751 to
29752 three
29753 times.
29754
29755
29756 LATEX‐
29757 SUF‐
29758 FIXES The
29759 list
29760 of
29761 suf‐
29762 fixes
29763 of
29764 files
29765 that
29766 will
29767 be
29768 scanned
29769 for
29770 LaTeX
29771 implicit
29772 depen‐
29773 den‐
29774 cies
29775 (\include
29776 or
29777 \import
29778 files).
29779 The
29780 default
29781 list
29782 is:
29783
29784 [".tex", ".ltx", ".latex"]
29785
29786
29787 LDMOD‐
29788 ULE The
29789 linker
29790 for
29791 build‐
29792 ing
29793 load‐
29794 able
29795 mod‐
29796 ules.
29797 By
29798 default,
29799 this
29800 is
29801 the
29802 same
29803 as
29804 $SHLINK.
29805
29806
29807 LDMOD‐
29808 ULE‐
29809 COM The
29810 com‐
29811 mand
29812 line
29813 for
29814 build‐
29815 ing
29816 load‐
29817 able
29818 mod‐
29819 ules.
29820 On
29821 Mac
29822 OS
29823 X,
29824 this
29825 uses
29826 the
29827 $LDMOD‐
29828 ULE,
29829 $LDMOD‐
29830 ULE‐
29831 FLAGS
29832 and
29833 $FRAME‐
29834 WORKS‐
29835 FLAGS
29836 vari‐
29837 ables.
29838 On
29839 other
29840 sys‐
29841 tems,
29842 this
29843 is
29844 the
29845 same
29846 as
29847 $SHLINK.
29848
29849
29850 LDMOD‐
29851 ULE‐
29852 COM‐
29853 STR The
29854 string
29855 dis‐
29856 played
29857 when
29858 build‐
29859 ing
29860 load‐
29861 able
29862 mod‐
29863 ules.
29864 If
29865 this
29866 is
29867 not
29868 set,
29869 then
29870 $LDMOD‐
29871 ULE‐
29872 COM
29873 (the
29874 com‐
29875 mand
29876 line)
29877 is
29878 dis‐
29879 played.
29880
29881
29882 LDMOD‐
29883 ULE‐
29884 FLAGS Gen‐
29885 eral
29886 user
29887 options
29888 passed
29889 to
29890 the
29891 linker
29892 for
29893 build‐
29894 ing
29895 load‐
29896 able
29897 mod‐
29898 ules.
29899
29900
29901 LDMOD‐
29902 ULEPRE‐
29903 FIX
29904 The
29905 pre‐
29906 fix
29907 used
29908 for
29909 load‐
29910 able
29911 mod‐
29912 ule
29913 file
29914 names.
29915 On
29916 Mac
29917 OS
29918 X,
29919 this
29920 is
29921 null;
29922 on
29923 other
29924 sys‐
29925 tems,
29926 this
29927 is
29928 the
29929 same
29930 as
29931 $SHLIBPRE‐
29932 FIX.
29933
29934
29935 LDMOD‐
29936 ULE‐
29937 SUF‐
29938 FIX The
29939 suf‐
29940 fix
29941 used
29942 for
29943 load‐
29944 able
29945 mod‐
29946 ule
29947 file
29948 names.
29949 On
29950 Mac
29951 OS
29952 X,
29953 this
29954 is
29955 null;
29956 on
29957 other
29958 sys‐
29959 tems,
29960 this
29961 is
29962 the
29963 same
29964 as
29965 $SHLIB‐
29966 SUF‐
29967 FIX.
29968
29969
29970 LEX The
29971 lex‐
29972 i‐
29973 cal
29974 ana‐
29975 lyzer
29976 gen‐
29977 er‐
29978 a‐
29979 tor.
29980
29981
29982 LEX‐
29983 COM The
29984 com‐
29985 mand
29986 line
29987 used
29988 to
29989 call
29990 the
29991 lex‐
29992 i‐
29993 cal
29994 ana‐
29995 lyzer
29996 gen‐
29997 er‐
29998 a‐
29999 tor
30000 to
30001 gen‐
30002 er‐
30003 ate
30004 a
30005 source
30006 file.
30007
30008
30009 LEX‐
30010 COM‐
30011 STR The
30012 string
30013 dis‐
30014 played
30015 when
30016 gen‐
30017 er‐
30018 at‐
30019 ing
30020 a
30021 source
30022 file
30023 using
30024 the
30025 lex‐
30026 i‐
30027 cal
30028 ana‐
30029 lyzer
30030 gen‐
30031 er‐
30032 a‐
30033 tor.
30034 If
30035 this
30036 is
30037 not
30038 set,
30039 then
30040 $LEX‐
30041 COM
30042 (the
30043 com‐
30044 mand
30045 line)
30046 is
30047 dis‐
30048 played.
30049
30050 env = Environment(LEXCOMSTR = "Lex'ing $TARGET from $SOURCES")
30051
30052
30053 LEXFLAGS
30054 Gen‐
30055 eral
30056 options
30057 passed
30058 to
30059 the
30060 lex‐
30061 i‐
30062 cal
30063 ana‐
30064 lyzer
30065 gen‐
30066 er‐
30067 a‐
30068 tor.
30069
30070
30071 _LIB‐
30072 DIRFLAGS
30073 An
30074 auto‐
30075 mat‐
30076 i‐
30077 cally-
30078 gen‐
30079 er‐
30080 ated
30081 con‐
30082 struc‐
30083 tion
30084 vari‐
30085 able
30086 con‐
30087 tain‐
30088 ing
30089 the
30090 linker
30091 com‐
30092 mand-
30093 line
30094 options
30095 for
30096 spec‐
30097 i‐
30098 fy‐
30099 ing
30100 direc‐
30101 to‐
30102 ries
30103 to
30104 be
30105 searched
30106 for
30107 library.
30108 The
30109 value
30110 of
30111 $_LIB‐
30112 DIRFLAGS
30113 is
30114 cre‐
30115 ated
30116 by
30117 append‐
30118 ing
30119 $LIB‐
30120 DIRPRE‐
30121 FIX
30122 and
30123 $LIB‐
30124 DIRSUF‐
30125 FIX
30126 to
30127 the
30128 begin‐
30129 ning
30130 and
30131 end
30132 of
30133 each
30134 direc‐
30135 tory
30136 in
30137 $LIB‐
30138 PATH.
30139
30140
30141 LIB‐
30142 DIRPRE‐
30143 FIX
30144 The
30145 pre‐
30146 fix
30147 used
30148 to
30149 spec‐
30150 ify
30151 a
30152 library
30153 direc‐
30154 tory
30155 on
30156 the
30157 linker
30158 com‐
30159 mand
30160 line.
30161 This
30162 will
30163 be
30164 appended
30165 to
30166 the
30167 begin‐
30168 ning
30169 of
30170 each
30171 direc‐
30172 tory
30173 in
30174 the
30175 $LIB‐
30176 PATH
30177 con‐
30178 struc‐
30179 tion
30180 vari‐
30181 able
30182 when
30183 the
30184 $_LIB‐
30185 DIRFLAGS
30186 vari‐
30187 able
30188 is
30189 auto‐
30190 mat‐
30191 i‐
30192 cally
30193 gen‐
30194 er‐
30195 ated.
30196
30197
30198 LIB‐
30199 DIRSUF‐
30200 FIX
30201 The
30202 suf‐
30203 fix
30204 used
30205 to
30206 spec‐
30207 ify
30208 a
30209 library
30210 direc‐
30211 tory
30212 on
30213 the
30214 linker
30215 com‐
30216 mand
30217 line.
30218 This
30219 will
30220 be
30221 appended
30222 to
30223 the
30224 end
30225 of
30226 each
30227 direc‐
30228 tory
30229 in
30230 the
30231 $LIB‐
30232 PATH
30233 con‐
30234 struc‐
30235 tion
30236 vari‐
30237 able
30238 when
30239 the
30240 $_LIB‐
30241 DIRFLAGS
30242 vari‐
30243 able
30244 is
30245 auto‐
30246 mat‐
30247 i‐
30248 cally
30249 gen‐
30250 er‐
30251 ated.
30252
30253
30254 _LIBFLAGS
30255 An
30256 auto‐
30257 mat‐
30258 i‐
30259 cally-
30260 gen‐
30261 er‐
30262 ated
30263 con‐
30264 struc‐
30265 tion
30266 vari‐
30267 able
30268 con‐
30269 tain‐
30270 ing
30271 the
30272 linker
30273 com‐
30274 mand-
30275 line
30276 options
30277 for
30278 spec‐
30279 i‐
30280 fy‐
30281 ing
30282 libraries
30283 to
30284 be
30285 linked
30286 with
30287 the
30288 result‐
30289 ing
30290 tar‐
30291 get.
30292 The
30293 value
30294 of
30295 $_LIBFLAGS
30296 is
30297 cre‐
30298 ated
30299 by
30300 append‐
30301 ing
30302 $LIB‐
30303 LINKPRE‐
30304 FIX
30305 and
30306 $LIB‐
30307 LINKSUF‐
30308 FIX
30309 to
30310 the
30311 begin‐
30312 ning
30313 and
30314 end
30315 of
30316 each
30317 file‐
30318 name
30319 in
30320 $LIBS.
30321
30322
30323 LIB‐
30324 LINKPRE‐
30325 FIX
30326 The
30327 pre‐
30328 fix
30329 used
30330 to
30331 spec‐
30332 ify
30333 a
30334 library
30335 to
30336 link
30337 on
30338 the
30339 linker
30340 com‐
30341 mand
30342 line.
30343 This
30344 will
30345 be
30346 appended
30347 to
30348 the
30349 begin‐
30350 ning
30351 of
30352 each
30353 library
30354 in
30355 the
30356 $LIBS
30357 con‐
30358 struc‐
30359 tion
30360 vari‐
30361 able
30362 when
30363 the
30364 $_LIBFLAGS
30365 vari‐
30366 able
30367 is
30368 auto‐
30369 mat‐
30370 i‐
30371 cally
30372 gen‐
30373 er‐
30374 ated.
30375
30376
30377 LIB‐
30378 LINKSUF‐
30379 FIX
30380 The
30381 suf‐
30382 fix
30383 used
30384 to
30385 spec‐
30386 ify
30387 a
30388 library
30389 to
30390 link
30391 on
30392 the
30393 linker
30394 com‐
30395 mand
30396 line.
30397 This
30398 will
30399 be
30400 appended
30401 to
30402 the
30403 end
30404 of
30405 each
30406 library
30407 in
30408 the
30409 $LIBS
30410 con‐
30411 struc‐
30412 tion
30413 vari‐
30414 able
30415 when
30416 the
30417 $_LIBFLAGS
30418 vari‐
30419 able
30420 is
30421 auto‐
30422 mat‐
30423 i‐
30424 cally
30425 gen‐
30426 er‐
30427 ated.
30428
30429
30430 LIB‐
30431 PATH The
30432 list
30433 of
30434 direc‐
30435 to‐
30436 ries
30437 that
30438 will
30439 be
30440 searched
30441 for
30442 libraries.
30443 The
30444 implicit
30445 depen‐
30446 dency
30447 scan‐
30448 ner
30449 will
30450 search
30451 these
30452 direc‐
30453 to‐
30454 ries
30455 for
30456 include
30457 files.
30458 Don't
30459 explic‐
30460 itly
30461 put
30462 include
30463 direc‐
30464 tory
30465 argu‐
30466 ments
30467 in
30468 $LINK‐
30469 FLAGS
30470 or
30471 $SHLINK‐
30472 FLAGS
30473 because
30474 the
30475 result
30476 will
30477 be
30478 non-
30479 por‐
30480 ta‐
30481 ble
30482 and
30483 the
30484 direc‐
30485 to‐
30486 ries
30487 will
30488 not
30489 be
30490 searched
30491 by
30492 the
30493 depen‐
30494 dency
30495 scan‐
30496 ner.
30497 Note:
30498 direc‐
30499 tory
30500 names
30501 in
30502 LIB‐
30503 PATH
30504 will
30505 be
30506 looked-
30507 up
30508 rel‐
30509 a‐
30510 tive
30511 to
30512 the
30513 SCon‐
30514 script
30515 direc‐
30516 tory
30517 when
30518 they
30519 are
30520 used
30521 in
30522 a
30523 com‐
30524 mand.
30525 To
30526 force
30527 scons
30528 to
30529 look-
30530 up
30531 a
30532 direc‐
30533 tory
30534 rel‐
30535 a‐
30536 tive
30537 to
30538 the
30539 root
30540 of
30541 the
30542 source
30543 tree
30544 use
30545 #:
30546
30547 env = Environment(LIBPATH='#/libs')
30548
30549 The
30550 direc‐
30551 tory
30552 look-
30553 up
30554 can
30555 also
30556 be
30557 forced
30558 using
30559 the
30560 Dir()
30561 func‐
30562 tion:
30563
30564 libs = Dir('libs')
30565 env = Environment(LIBPATH=libs)
30566
30567 The
30568 direc‐
30569 tory
30570 list
30571 will
30572 be
30573 added
30574 to
30575 com‐
30576 mand
30577 lines
30578 through
30579 the
30580 auto‐
30581 mat‐
30582 i‐
30583 cally-
30584 gen‐
30585 er‐
30586 ated
30587 $_LIB‐
30588 DIRFLAGS
30589 con‐
30590 struc‐
30591 tion
30592 vari‐
30593 able,
30594 which
30595 is
30596 con‐
30597 structed
30598 by
30599 append‐
30600 ing
30601 the
30602 val‐
30603 ues
30604 of
30605 the
30606 $LIB‐
30607 DIRPRE‐
30608 FIX
30609 and
30610 $LIB‐
30611 DIRSUF‐
30612 FIX
30613 con‐
30614 struc‐
30615 tion
30616 vari‐
30617 ables
30618 to
30619 the
30620 begin‐
30621 ning
30622 and
30623 end
30624 of
30625 each
30626 direc‐
30627 tory
30628 in
30629 $LIB‐
30630 PATH.
30631 Any
30632 com‐
30633 mand
30634 lines
30635 you
30636 define
30637 that
30638 need
30639 the
30640 LIB‐
30641 PATH
30642 direc‐
30643 tory
30644 list
30645 should
30646 include
30647 $_LIB‐
30648 DIRFLAGS:
30649
30650 env = Environment(LINKCOM="my_linker $_LIBDIRFLAGS $_LIBFLAGS -o $TARGET $SOURCE")
30651
30652
30653 LIBPRE‐
30654 FIX
30655 The
30656 pre‐
30657 fix
30658 used
30659 for
30660 (static)
30661 library
30662 file
30663 names.
30664 A
30665 default
30666 value
30667 is
30668 set
30669 for
30670 each
30671 plat‐
30672 form
30673 (posix,
30674 win32,
30675 os2,
30676 etc.),
30677 but
30678 the
30679 value
30680 is
30681 over‐
30682 rid‐
30683 den
30684 by
30685 indi‐
30686 vid‐
30687 ual
30688 tools
30689 (ar,
30690 mslib,
30691 sgiar,
30692 sunar,
30693 tlib,
30694 etc.)
30695 to
30696 reflect
30697 the
30698 names
30699 of
30700 the
30701 libraries
30702 they
30703 cre‐
30704 ate.
30705
30706
30707 LIBPRE‐
30708 FIXES
30709 A
30710 list
30711 of
30712 all
30713 legal
30714 pre‐
30715 fixes
30716 for
30717 library
30718 file
30719 names.
30720 When
30721 search‐
30722 ing
30723 for
30724 library
30725 depen‐
30726 den‐
30727 cies,
30728 SCons
30729 will
30730 look
30731 for
30732 files
30733 with
30734 these
30735 pre‐
30736 fixes,
30737 the
30738 base
30739 library
30740 name,
30741 and
30742 suf‐
30743 fixes
30744 in
30745 the
30746 $LIB‐
30747 SUF‐
30748 FIXES
30749 list.
30750
30751
30752 LIBS A
30753 list
30754 of
30755 one
30756 or
30757 more
30758 libraries
30759 that
30760 will
30761 be
30762 linked
30763 with
30764 any
30765 exe‐
30766 cutable
30767 pro‐
30768 grams
30769 cre‐
30770 ated
30771 by
30772 this
30773 envi‐
30774 ron‐
30775 ment.
30776
30777 The
30778 library
30779 list
30780 will
30781 be
30782 added
30783 to
30784 com‐
30785 mand
30786 lines
30787 through
30788 the
30789 auto‐
30790 mat‐
30791 i‐
30792 cally-
30793 gen‐
30794 er‐
30795 ated
30796 $_LIBFLAGS
30797 con‐
30798 struc‐
30799 tion
30800 vari‐
30801 able,
30802 which
30803 is
30804 con‐
30805 structed
30806 by
30807 append‐
30808 ing
30809 the
30810 val‐
30811 ues
30812 of
30813 the
30814 $LIB‐
30815 LINKPRE‐
30816 FIX
30817 and
30818 $LIB‐
30819 LINKSUF‐
30820 FIX
30821 con‐
30822 struc‐
30823 tion
30824 vari‐
30825 ables
30826 to
30827 the
30828 begin‐
30829 ning
30830 and
30831 end
30832 of
30833 each
30834 file‐
30835 name
30836 in
30837 $LIBS.
30838 Any
30839 com‐
30840 mand
30841 lines
30842 you
30843 define
30844 that
30845 need
30846 the
30847 LIBS
30848 library
30849 list
30850 should
30851 include
30852 $_LIBFLAGS:
30853
30854 env = Environment(LINKCOM="my_linker $_LIBDIRFLAGS $_LIBFLAGS -o $TARGET $SOURCE")
30855
30856 If
30857 you
30858 add
30859 a
30860 File
30861 object
30862 to
30863 the
30864 $LIBS
30865 list,
30866 the
30867 name
30868 of
30869 that
30870 file
30871 will
30872 be
30873 added
30874 to
30875 $_LIBFLAGS,
30876 and
30877 thus
30878 the
30879 link
30880 line,
30881 as
30882 is,
30883 with‐
30884 out
30885 $LIB‐
30886 LINKPRE‐
30887 FIX
30888 or
30889 $LIB‐
30890 LINKSUF‐
30891 FIX.
30892 For
30893 exam‐
30894 ple:
30895
30896 env.Append(LIBS=File('/tmp/mylib.so'))
30897
30898 In
30899 all
30900 cases,
30901 scons
30902 will
30903 add
30904 depen‐
30905 den‐
30906 cies
30907 from
30908 the
30909 exe‐
30910 cutable
30911 pro‐
30912 gram
30913 to
30914 all
30915 the
30916 libraries
30917 in
30918 this
30919 list.
30920
30921
30922 LIB‐
30923 SUF‐
30924 FIX The
30925 suf‐
30926 fix
30927 used
30928 for
30929 (static)
30930 library
30931 file
30932 names.
30933 A
30934 default
30935 value
30936 is
30937 set
30938 for
30939 each
30940 plat‐
30941 form
30942 (posix,
30943 win32,
30944 os2,
30945 etc.),
30946 but
30947 the
30948 value
30949 is
30950 over‐
30951 rid‐
30952 den
30953 by
30954 indi‐
30955 vid‐
30956 ual
30957 tools
30958 (ar,
30959 mslib,
30960 sgiar,
30961 sunar,
30962 tlib,
30963 etc.)
30964 to
30965 reflect
30966 the
30967 names
30968 of
30969 the
30970 libraries
30971 they
30972 cre‐
30973 ate.
30974
30975
30976 LIB‐
30977 SUF‐
30978 FIXES A
30979 list
30980 of
30981 all
30982 legal
30983 suf‐
30984 fixes
30985 for
30986 library
30987 file
30988 names.
30989 When
30990 search‐
30991 ing
30992 for
30993 library
30994 depen‐
30995 den‐
30996 cies,
30997 SCons
30998 will
30999 look
31000 for
31001 files
31002 with
31003 pre‐
31004 fixes,
31005 in
31006 the
31007 $LIBPRE‐
31008 FIXES
31009 list,
31010 the
31011 base
31012 library
31013 name,
31014 and
31015 these
31016 suf‐
31017 fixes.
31018
31019
31020 LICENSE
31021 The
31022 abbre‐
31023 vi‐
31024 ated
31025 name
31026 of
31027 the
31028 license
31029 under
31030 which
31031 this
31032 project
31033 is
31034 released
31035 (gpl,
31036 lpgl,
31037 bsd
31038 etc.).
31039 See
31040 http://www.open‐
31041 source.org/licenses/alpha‐
31042 bet‐
31043 i‐
31044 cal
31045 for
31046 a
31047 list
31048 of
31049 license
31050 names.
31051
31052
31053 LINK The
31054 linker.
31055
31056
31057 LINKCOM
31058 The
31059 com‐
31060 mand
31061 line
31062 used
31063 to
31064 link
31065 object
31066 files
31067 into
31068 an
31069 exe‐
31070 cutable.
31071
31072
31073 LINKCOM‐
31074 STR
31075 The
31076 string
31077 dis‐
31078 played
31079 when
31080 object
31081 files
31082 are
31083 linked
31084 into
31085 an
31086 exe‐
31087 cutable.
31088 If
31089 this
31090 is
31091 not
31092 set,
31093 then
31094 $LINKCOM
31095 (the
31096 com‐
31097 mand
31098 line)
31099 is
31100 dis‐
31101 played.
31102
31103 env = Environment(LINKCOMSTR = "Linking $TARGET")
31104
31105
31106 LINK‐
31107 FLAGS Gen‐
31108 eral
31109 user
31110 options
31111 passed
31112 to
31113 the
31114 linker.
31115 Note
31116 that
31117 this
31118 vari‐
31119 able
31120 should
31121 not
31122 con‐
31123 tain
31124 -l
31125 (or
31126 sim‐
31127 i‐
31128 lar)
31129 options
31130 for
31131 link‐
31132 ing
31133 with
31134 the
31135 libraries
31136 listed
31137 in
31138 $LIBS,
31139 nor
31140 -L
31141 (or
31142 sim‐
31143 i‐
31144 lar)
31145 library
31146 search
31147 path
31148 options
31149 that
31150 scons
31151 gen‐
31152 er‐
31153 ates
31154 auto‐
31155 mat‐
31156 i‐
31157 cally
31158 from
31159 $LIB‐
31160 PATH.
31161 See
31162 $_LIBFLAGS
31163 above,
31164 for
31165 the
31166 vari‐
31167 able
31168 that
31169 expands
31170 to
31171 library-
31172 link
31173 options,
31174 and
31175 $_LIB‐
31176 DIRFLAGS
31177 above,
31178 for
31179 the
31180 vari‐
31181 able
31182 that
31183 expands
31184 to
31185 library
31186 search
31187 path
31188 options.
31189
31190
31191 M4 The
31192 M4
31193 macro
31194 pre‐
31195 proces‐
31196 sor.
31197
31198
31199 M4COM The
31200 com‐
31201 mand
31202 line
31203 used
31204 to
31205 pass
31206 files
31207 through
31208 the
31209 M4
31210 macro
31211 pre‐
31212 proces‐
31213 sor.
31214
31215
31216 M4COM‐
31217 STR The
31218 string
31219 dis‐
31220 played
31221 when
31222 a
31223 file
31224 is
31225 passed
31226 through
31227 the
31228 M4
31229 macro
31230 pre‐
31231 proces‐
31232 sor.
31233 If
31234 this
31235 is
31236 not
31237 set,
31238 then
31239 $M4COM
31240 (the
31241 com‐
31242 mand
31243 line)
31244 is
31245 dis‐
31246 played.
31247
31248
31249 M4FLAGS
31250 Gen‐
31251 eral
31252 options
31253 passed
31254 to
31255 the
31256 M4
31257 macro
31258 pre‐
31259 proces‐
31260 sor.
31261
31262
31263 MAKEIN‐
31264 DEX
31265 The
31266 makein‐
31267 dex
31268 gen‐
31269 er‐
31270 a‐
31271 tor
31272 for
31273 the
31274 TeX
31275 for‐
31276 mat‐
31277 ter
31278 and
31279 type‐
31280 set‐
31281 ter
31282 and
31283 the
31284 LaTeX
31285 struc‐
31286 tured
31287 for‐
31288 mat‐
31289 ter
31290 and
31291 type‐
31292 set‐
31293 ter.
31294
31295
31296 MAKEIN‐
31297 DEX‐
31298 COM
31299 The
31300 com‐
31301 mand
31302 line
31303 used
31304 to
31305 call
31306 the
31307 makein‐
31308 dex
31309 gen‐
31310 er‐
31311 a‐
31312 tor
31313 for
31314 the
31315 TeX
31316 for‐
31317 mat‐
31318 ter
31319 and
31320 type‐
31321 set‐
31322 ter
31323 and
31324 the
31325 LaTeX
31326 struc‐
31327 tured
31328 for‐
31329 mat‐
31330 ter
31331 and
31332 type‐
31333 set‐
31334 ter.
31335
31336
31337 MAKEIN‐
31338 DEX‐
31339 COM‐
31340 STR
31341 The
31342 string
31343 dis‐
31344 played
31345 when
31346 call‐
31347 ing
31348 the
31349 makein‐
31350 dex
31351 gen‐
31352 er‐
31353 a‐
31354 tor
31355 for
31356 the
31357 TeX
31358 for‐
31359 mat‐
31360 ter
31361 and
31362 type‐
31363 set‐
31364 ter
31365 and
31366 the
31367 LaTeX
31368 struc‐
31369 tured
31370 for‐
31371 mat‐
31372 ter
31373 and
31374 type‐
31375 set‐
31376 ter.
31377 If
31378 this
31379 is
31380 not
31381 set,
31382 then
31383 $MAKEIN‐
31384 DEX‐
31385 COM
31386 (the
31387 com‐
31388 mand
31389 line)
31390 is
31391 dis‐
31392 played.
31393
31394
31395 MAKEIN‐
31396 DEXFLAGS
31397 Gen‐
31398 eral
31399 options
31400 passed
31401 to
31402 the
31403 makein‐
31404 dex
31405 gen‐
31406 er‐
31407 a‐
31408 tor
31409 for
31410 the
31411 TeX
31412 for‐
31413 mat‐
31414 ter
31415 and
31416 type‐
31417 set‐
31418 ter
31419 and
31420 the
31421 LaTeX
31422 struc‐
31423 tured
31424 for‐
31425 mat‐
31426 ter
31427 and
31428 type‐
31429 set‐
31430 ter.
31431
31432
31433 MAX‐
31434 LINE‐
31435 LENGTH The
31436 max‐
31437 i‐
31438 mum
31439 num‐
31440 ber
31441 of
31442 char‐
31443 ac‐
31444 ters
31445 allowed
31446 on
31447 an
31448 exter‐
31449 nal
31450 com‐
31451 mand
31452 line.
31453 On
31454 Win32
31455 sys‐
31456 tems,
31457 link
31458 lines
31459 longer
31460 than
31461 this
31462 many
31463 char‐
31464 ac‐
31465 ters
31466 are
31467 linked
31468 via
31469 a
31470 tem‐
31471 po‐
31472 rary
31473 file
31474 name.
31475
31476
31477 MIDL The
31478 Mi‐
31479 cro‐
31480 soft
31481 IDL
31482 com‐
31483 piler.
31484
31485
31486 MIDL‐
31487 COM The
31488 com‐
31489 mand
31490 line
31491 used
31492 to
31493 pass
31494 files
31495 to
31496 the
31497 Mi‐
31498 cro‐
31499 soft
31500 IDL
31501 com‐
31502 piler.
31503
31504
31505 MIDL‐
31506 COM‐
31507 STR The
31508 string
31509 dis‐
31510 played
31511 when
31512 the
31513 Mi‐
31514 cro‐
31515 soft
31516 IDL
31517 cop‐
31518 miler
31519 is
31520 called.
31521 If
31522 this
31523 is
31524 not
31525 set,
31526 then
31527 $MIDL‐
31528 COM
31529 (the
31530 com‐
31531 mand
31532 line)
31533 is
31534 dis‐
31535 played.
31536
31537
31538 MIDLFLAGS
31539 Gen‐
31540 eral
31541 options
31542 passed
31543 to
31544 the
31545 Mi‐
31546 cro‐
31547 soft
31548 IDL
31549 com‐
31550 piler.
31551
31552
31553 MSVS When
31554 the
31555 Mi‐
31556 cro‐
31557 soft
31558 Vis‐
31559 ual
31560 Stu‐
31561 dio
31562 tools
31563 are
31564 ini‐
31565 tial‐
31566 ized,
31567 they
31568 set
31569 up
31570 this
31571 dic‐
31572 tio‐
31573 nary
31574 with
31575 the
31576 fol‐
31577 low‐
31578 ing
31579 keys:
31580
31581 VER‐
31582 SION:
31583 the
31584 ver‐
31585 sion
31586 of
31587 MSVS
31588 being
31589 used
31590 (can
31591 be
31592 set
31593 via
31594 MSVS_VER‐
31595 SION)
31596
31597 VER‐
31598 SIONS:
31599 the
31600 avail‐
31601 able
31602 ver‐
31603 sions
31604 of
31605 MSVS
31606 installed
31607
31608 VCIN‐
31609 STALLDIR:
31610 installed
31611 direc‐
31612 tory
31613 of
31614 Vis‐
31615 ual
31616 C++
31617
31618 VSIN‐
31619 STALLDIR:
31620 installed
31621 direc‐
31622 tory
31623 of
31624 Vis‐
31625 ual
31626 Stu‐
31627 dio
31628
31629 FRAME‐
31630 WORKDIR:
31631 installed
31632 direc‐
31633 tory
31634 of
31635 the
31636 .NET
31637 frame‐
31638 work
31639
31640 FRAME‐
31641 WORKVER‐
31642 SIONS:
31643 list
31644 of
31645 installed
31646 ver‐
31647 sions
31648 of
31649 the
31650 .NET
31651 frame‐
31652 work,
31653 sorted
31654 lat‐
31655 est
31656 to
31657 old‐
31658 est.
31659
31660 FRAME‐
31661 WORKVER‐
31662 SION:
31663 lat‐
31664 est
31665 installed
31666 ver‐
31667 sion
31668 of
31669 the
31670 .NET
31671 frame‐
31672 work
31673
31674 FRAME‐
31675 WORKS‐
31676 D‐
31677 KDIR:
31678 installed
31679 loca‐
31680 tion
31681 of
31682 the
31683 .NET
31684 SDK.
31685
31686 PLAT‐
31687 FORMS‐
31688 D‐
31689 KDIR:
31690 installed
31691 loca‐
31692 tion
31693 of
31694 the
31695 Plat‐
31696 form
31697 SDK.
31698
31699 PLAT‐
31700 FORMSDK_MOD‐
31701 ULES:
31702 dic‐
31703 tio‐
31704 nary
31705 of
31706 installed
31707 Plat‐
31708 form
31709 SDK
31710 mod‐
31711 ules,
31712 where
31713 the
31714 dic‐
31715 tio‐
31716 nary
31717 keys
31718 are
31719 key‐
31720 words
31721 for
31722 the
31723 var‐
31724 i‐
31725 ous
31726 mod‐
31727 ules,
31728 and
31729 the
31730 val‐
31731 ues
31732 are
31733 2-tuples
31734 where
31735 the
31736 first
31737 is
31738 the
31739 release
31740 date,
31741 and
31742 the
31743 sec‐
31744 ond
31745 is
31746 the
31747 ver‐
31748 sion
31749 num‐
31750 ber.
31751
31752 If
31753 a
31754 value
31755 isn't
31756 set,
31757 it
31758 wasn't
31759 avail‐
31760 able
31761 in
31762 the
31763 reg‐
31764 istry.
31765
31766
31767 MSVS_IGNORE_IDE_PATHS
31768 Tells
31769 the
31770 MS
31771 Vis‐
31772 ual
31773 Stu‐
31774 dio
31775 tools
31776 to
31777 use
31778 min‐
31779 i‐
31780 mal
31781 INCLUDE,
31782 LIB,
31783 and
31784 PATH
31785 set‐
31786 tings,
31787 instead
31788 of
31789 the
31790 set‐
31791 tings
31792 from
31793 the
31794 IDE.
31795
31796 For
31797 Vis‐
31798 ual
31799 Stu‐
31800 dio,
31801 SCons
31802 will
31803 (by
31804 default)
31805 auto‐
31806 mat‐
31807 i‐
31808 cally
31809 deter‐
31810 mine
31811 where
31812 MSVS
31813 is
31814 installed,
31815 and
31816 use
31817 the
31818 LIB,
31819 INCLUDE,
31820 and
31821 PATH
31822 vari‐
31823 ables
31824 set
31825 by
31826 the
31827 IDE.
31828 You
31829 can
31830 over‐
31831 ride
31832 this
31833 behav‐
31834 ior
31835 by
31836 set‐
31837 ting
31838 these
31839 vari‐
31840 ables
31841 after
31842 Envi‐
31843 ron‐
31844 ment
31845 ini‐
31846 tial‐
31847 iza‐
31848 tion,
31849 or
31850 by
31851 set‐
31852 ting
31853 MSVS_IGNORE_IDE_PATHS
31854 =
31855 1
31856 in
31857 the
31858 Envi‐
31859 ron‐
31860 ment
31861 ini‐
31862 tial‐
31863 iza‐
31864 tion.
31865 Spec‐
31866 i‐
31867 fy‐
31868 ing
31869 this
31870 will
31871 not
31872 leave
31873 these
31874 unset,
31875 but
31876 will
31877 set
31878 them
31879 to
31880 a
31881 min‐
31882 i‐
31883 mal
31884 set
31885 of
31886 paths
31887 needed
31888 to
31889 run
31890 the
31891 tools
31892 suc‐
31893 cess‐
31894 fully.
31895
31896 For
31897 VS6,
31898 the
31899 minin‐
31900 i‐
31901 mal
31902 set
31903 is:
31904 INCLUDE:'<VSDir>\VC98\ATL\include;<VSDir>\VC98\MFC\include;<VSDir>\VC98\include'
31905 LIB:'<VSDir>\VC98\MFC\lib;<VSDir>\VC98\lib'
31906 PATH:'<VSDir>\Common\MSDev98\bin;<VSDir>\VC98\bin'
31907 For
31908 VS7,
31909 it
31910 is:
31911 INCLUDE:'<VSDir>\Vc7\atlmfc\include;<VSDir>\Vc7\include'
31912 LIB:'<VSDir>\Vc7\atlmfc\lib;<VSDir>\Vc7\lib'
31913 PATH:'<VSDir>\Common7\Tools\bin;<VSDir>\Common7\Tools;<VSDir>\Vc7\bin'
31914
31915 Where
31916 '<VSDir>'
31917 is
31918 the
31919 installed
31920 loca‐
31921 tion
31922 of
31923 Vis‐
31924 ual
31925 Stu‐
31926 dio.
31927
31928
31929 MSVS_PROJECT_BASE_PATH
31930 The
31931 string
31932 placed
31933 in
31934 a
31935 gen‐
31936 er‐
31937 ated
31938 Mi‐
31939 cro‐
31940 soft
31941 Vis‐
31942 ual
31943 Stu‐
31944 dio
31945 solu‐
31946 tion
31947 file
31948 as
31949 the
31950 value
31951 of
31952 the
31953 SccPro‐
31954 ject‐
31955 FilePathRel‐
31956 a‐
31957 tivized‐
31958 From‐
31959 Con‐
31960 nec‐
31961 tion0
31962 and
31963 SccPro‐
31964 ject‐
31965 FilePathRel‐
31966 a‐
31967 tivized‐
31968 From‐
31969 Con‐
31970 nec‐
31971 tion1
31972 attributes
31973 of
31974 the
31975 Glob‐
31976 al‐
31977 Sec‐
31978 tion(Source‐
31979 Code‐
31980 Con‐
31981 trol)
31982 sec‐
31983 tion.
31984 There
31985 is
31986 no
31987 default
31988 value.
31989
31990
31991 MSVS_PROJECT_GUID
31992 The
31993 string
31994 placed
31995 in
31996 a
31997 gen‐
31998 er‐
31999 ated
32000 Mi‐
32001 cro‐
32002 soft
32003 Vis‐
32004 ual
32005 Stu‐
32006 dio
32007 project
32008 file
32009 as
32010 the
32011 value
32012 of
32013 the
32014 Pro‐
32015 ject‐
32016 GUID
32017 attribute.
32018 The
32019 string
32020 is
32021 also
32022 placed
32023 in
32024 the
32025 Solu‐
32026 tio‐
32027 nUniqueID
32028 attribute
32029 of
32030 the
32031 Glob‐
32032 al‐
32033 Sec‐
32034 tion(Source‐
32035 Code‐
32036 Con‐
32037 trol)
32038 sec‐
32039 tion
32040 of
32041 the
32042 Mi‐
32043 cro‐
32044 soft
32045 Vis‐
32046 ual
32047 Stu‐
32048 dio
32049 solu‐
32050 tion
32051 file.
32052 There
32053 is
32054 no
32055 default
32056 value.
32057
32058
32059 MSVS_SCC_AUX_PATH
32060 The
32061 path
32062 name
32063 placed
32064 in
32065 a
32066 gen‐
32067 er‐
32068 ated
32069 Mi‐
32070 cro‐
32071 soft
32072 Vis‐
32073 ual
32074 Stu‐
32075 dio
32076 project
32077 file
32078 as
32079 the
32080 value
32081 of
32082 the
32083 SccAux‐
32084 Path
32085 attribute
32086 if
32087 the
32088 MSVS_SCC_PROVIDER
32089 con‐
32090 struc‐
32091 tion
32092 vari‐
32093 able
32094 is
32095 also
32096 set.
32097 There
32098 is
32099 no
32100 default
32101 value.
32102
32103
32104 MSVS_SCC_LOCAL_PATH
32105 The
32106 path
32107 name
32108 placed
32109 in
32110 a
32111 gen‐
32112 er‐
32113 ated
32114 Mi‐
32115 cro‐
32116 soft
32117 Vis‐
32118 ual
32119 Stu‐
32120 dio
32121 project
32122 file
32123 as
32124 the
32125 value
32126 of
32127 the
32128 SccLo‐
32129 cal‐
32130 Path
32131 attribute
32132 if
32133 the
32134 MSVS_SCC_PROVIDER
32135 con‐
32136 struc‐
32137 tion
32138 vari‐
32139 able
32140 is
32141 also
32142 set.
32143 The
32144 path
32145 name
32146 is
32147 also
32148 placed
32149 in
32150 the
32151 SccLo‐
32152 cal‐
32153 Path0
32154 and
32155 SccLo‐
32156 cal‐
32157 Path1
32158 attributes
32159 of
32160 the
32161 Glob‐
32162 al‐
32163 Sec‐
32164 tion(Source‐
32165 Code‐
32166 Con‐
32167 trol)
32168 sec‐
32169 tion
32170 of
32171 the
32172 Mi‐
32173 cro‐
32174 soft
32175 Vis‐
32176 ual
32177 Stu‐
32178 dio
32179 solu‐
32180 tion
32181 file.
32182 There
32183 is
32184 no
32185 default
32186 value.
32187
32188
32189 MSVS_SCC_PROJECT_NAME
32190 The
32191 project
32192 name
32193 placed
32194 in
32195 a
32196 gen‐
32197 er‐
32198 ated
32199 Mi‐
32200 cro‐
32201 soft
32202 Vis‐
32203 ual
32204 Stu‐
32205 dio
32206 project
32207 file
32208 as
32209 the
32210 value
32211 of
32212 the
32213 SccPro‐
32214 ject‐
32215 Name
32216 attribute.
32217 There
32218 is
32219 no
32220 default
32221 value.
32222
32223
32224 MSVS_SCC_PROVIDER
32225 The
32226 string
32227 placed
32228 in
32229 a
32230 gen‐
32231 er‐
32232 ated
32233 Mi‐
32234 cro‐
32235 soft
32236 Vis‐
32237 ual
32238 Stu‐
32239 dio
32240 project
32241 file
32242 as
32243 the
32244 value
32245 of
32246 the
32247 SccProvider
32248 attribute.
32249 The
32250 string
32251 is
32252 also
32253 placed
32254 in
32255 the
32256 SccProvider1
32257 attribute
32258 of
32259 the
32260 Glob‐
32261 al‐
32262 Sec‐
32263 tion(Source‐
32264 Code‐
32265 Con‐
32266 trol)
32267 sec‐
32268 tion
32269 of
32270 the
32271 Mi‐
32272 cro‐
32273 soft
32274 Vis‐
32275 ual
32276 Stu‐
32277 dio
32278 solu‐
32279 tion
32280 file.
32281 There
32282 is
32283 no
32284 default
32285 value.
32286
32287
32288 MSVS_USE_MFC_DIRS
32289 Tells
32290 the
32291 MS
32292 Vis‐
32293 ual
32294 Stu‐
32295 dio
32296 tool(s)
32297 to
32298 use
32299 the
32300 MFC
32301 direc‐
32302 to‐
32303 ries
32304 in
32305 its
32306 default
32307 paths
32308 for
32309 com‐
32310 pil‐
32311 ing
32312 and
32313 link‐
32314 ing.
32315 The
32316 $MSVS_USE_MFC_DIRS
32317 vari‐
32318 able
32319 has
32320 no
32321 effect
32322 if
32323 the
32324 INCLUDE
32325 or
32326 LIB
32327 envi‐
32328 ron‐
32329 ment
32330 vari‐
32331 ables
32332 are
32333 set
32334 explictly.
32335
32336 Under
32337 Vis‐
32338 ual
32339 Stu‐
32340 dio
32341 ver‐
32342 sion
32343 6,
32344 set‐
32345 ting
32346 $MSVS_USE_MFC_DIRS
32347 to
32348 a
32349 non-
32350 zero
32351 value
32352 adds
32353 the
32354 ATL\ATL
32355 and
32356 MFC\MFC
32357 direc‐
32358 to‐
32359 ries
32360 to
32361 the
32362 default
32363 INCLUDE
32364 exter‐
32365 nal
32366 envi‐
32367 ron‐
32368 ment
32369 vari‐
32370 able,
32371 and
32372 adds
32373 the
32374 MFC\MFC
32375 direc‐
32376 tory
32377 to
32378 the
32379 default
32380 LIB
32381 exter‐
32382 nal
32383 envi‐
32384 ron‐
32385 ment
32386 vari‐
32387 able.
32388
32389 Under
32390 Vis‐
32391 ual
32392 Stu‐
32393 dio
32394 ver‐
32395 sion
32396 7,
32397 set‐
32398 ting
32399 $MSVS_USE_MFC_DIRS
32400 to
32401 a
32402 non-
32403 zero
32404 value
32405 adds
32406 the
32407 atlmfc\atlmfc
32408 direc‐
32409 tory
32410 to
32411 the
32412 default
32413 INCLUDE
32414 exter‐
32415 nal
32416 envi‐
32417 ron‐
32418 ment
32419 vari‐
32420 able,
32421 and
32422 adds
32423 the
32424 atlmfc\atlmfc
32425 direc‐
32426 tory
32427 to
32428 the
32429 default
32430 LIB
32431 exter‐
32432 nal
32433 envi‐
32434 ron‐
32435 ment
32436 vari‐
32437 able.
32438
32439 Under
32440 Vis‐
32441 ual
32442 Stu‐
32443 dio
32444 ver‐
32445 sion
32446 8,
32447 set‐
32448 ting
32449 $MSVS_USE_MFC_DIRS
32450 to
32451 a
32452 non-
32453 zero
32454 value
32455 will,
32456 by
32457 default,
32458 add
32459 the
32460 atlmfc\atlmfc
32461 direc‐
32462 tory
32463 to
32464 the
32465 default
32466 INCLUDE
32467 exter‐
32468 nal
32469 envi‐
32470 ron‐
32471 ment
32472 vari‐
32473 able,
32474 and
32475 the
32476 atlmfc\atlmfc
32477 direc‐
32478 tory
32479 to
32480 the
32481 default
32482 LIB
32483 exter‐
32484 nal
32485 envi‐
32486 ron‐
32487 ment
32488 vari‐
32489 able.
32490 If,
32491 how‐
32492 ever,
32493 the
32494 ['MSVS']['PLAT‐
32495 FORMS‐
32496 D‐
32497 KDIR']
32498 vari‐
32499 able
32500 is
32501 set,
32502 then
32503 the
32504 mfc
32505 and
32506 the
32507 atl
32508 sub‐
32509 di‐
32510 rec‐
32511 to‐
32512 ries
32513 of
32514 the
32515 PLAT‐
32516 FORMS‐
32517 D‐
32518 KDIR
32519 are
32520 added
32521 to
32522 the
32523 default
32524 value
32525 of
32526 the
32527 INCLUDE
32528 exter‐
32529 nal
32530 envi‐
32531 ron‐
32532 ment
32533 vari‐
32534 able,
32535 and
32536 the
32537 default
32538 value
32539 of
32540 the
32541 LIB
32542 exter‐
32543 nal
32544 envi‐
32545 ron‐
32546 ment
32547 vari‐
32548 able
32549 is
32550 left
32551 untouched.
32552
32553
32554 MSVS_VER‐
32555 SION
32556 Sets
32557 the
32558 pre‐
32559 ferred
32560 ver‐
32561 sion
32562 of
32563 MSVS
32564 to
32565 use.
32566
32567 SCons
32568 will
32569 (by
32570 default)
32571 select
32572 the
32573 lat‐
32574 est
32575 ver‐
32576 sion
32577 of
32578 MSVS
32579 installed
32580 on
32581 your
32582 machine.
32583 So,
32584 if
32585 you
32586 have
32587 ver‐
32588 sion
32589 6
32590 and
32591 ver‐
32592 sion
32593 7
32594 (MSVS
32595 .NET)
32596 installed,
32597 it
32598 will
32599 pre‐
32600 fer
32601 ver‐
32602 sion
32603 7.
32604 You
32605 can
32606 over‐
32607 ride
32608 this
32609 by
32610 spec‐
32611 i‐
32612 fy‐
32613 ing
32614 the
32615 MSVS_VER‐
32616 SION
32617 vari‐
32618 able
32619 in
32620 the
32621 Envi‐
32622 ron‐
32623 ment
32624 ini‐
32625 tial‐
32626 iza‐
32627 tion,
32628 set‐
32629 ting
32630 it
32631 to
32632 the
32633 appro‐
32634 pri‐
32635 ate
32636 ver‐
32637 sion
32638 ('6.0'
32639 or
32640 '7.0',
32641 for
32642 exam‐
32643 ple).
32644 If
32645 the
32646 given
32647 ver‐
32648 sion
32649 isn't
32650 installed,
32651 tool
32652 ini‐
32653 tial‐
32654 iza‐
32655 tion
32656 will
32657 fail.
32658
32659
32660 MSVS‐
32661 BUILD‐
32662 COM The
32663 build
32664 com‐
32665 mand
32666 line
32667 placed
32668 in
32669 a
32670 gen‐
32671 er‐
32672 ated
32673 Mi‐
32674 cro‐
32675 soft
32676 Vis‐
32677 ual
32678 Stu‐
32679 dio
32680 project
32681 file.
32682 The
32683 default
32684 is
32685 to
32686 have
32687 Vis‐
32688 ual
32689 Stu‐
32690 dio
32691 invoke
32692 SCons
32693 with
32694 any
32695 spec‐
32696 i‐
32697 fied
32698 build
32699 tar‐
32700 gets.
32701
32702
32703 MSVS‐
32704 CLE‐
32705 AN‐
32706 COM The
32707 clean
32708 com‐
32709 mand
32710 line
32711 placed
32712 in
32713 a
32714 gen‐
32715 er‐
32716 ated
32717 Mi‐
32718 cro‐
32719 soft
32720 Vis‐
32721 ual
32722 Stu‐
32723 dio
32724 project
32725 file.
32726 The
32727 default
32728 is
32729 to
32730 have
32731 Vis‐
32732 ual
32733 Stu‐
32734 dio
32735 invoke
32736 SCons
32737 with
32738 the
32739 -c
32740 option
32741 to
32742 remove
32743 any
32744 spec‐
32745 i‐
32746 fied
32747 tar‐
32748 gets.
32749
32750
32751 MSVSEN‐
32752 COD‐
32753 ING
32754 The
32755 encod‐
32756 ing
32757 string
32758 placed
32759 in
32760 a
32761 gen‐
32762 er‐
32763 ated
32764 Mi‐
32765 cro‐
32766 soft
32767 Vis‐
32768 ual
32769 Stu‐
32770 dio
32771 project
32772 file.
32773 The
32774 default
32775 is
32776 encod‐
32777 ing
32778 Win‐
32779 dows-1252.
32780
32781
32782 MSVSPRO‐
32783 JECT‐
32784 COM
32785 The
32786 action
32787 used
32788 to
32789 gen‐
32790 er‐
32791 ate
32792 Mi‐
32793 cro‐
32794 soft
32795 Vis‐
32796 ual
32797 Stu‐
32798 dio
32799 project
32800 files.
32801
32802
32803 MSVSPRO‐
32804 JECT‐
32805 SUF‐
32806 FIX
32807 The
32808 suf‐
32809 fix
32810 used
32811 for
32812 Mi‐
32813 cro‐
32814 soft
32815 Vis‐
32816 ual
32817 Stu‐
32818 dio
32819 project
32820 (DSP)
32821 files.
32822 The
32823 default
32824 value
32825 is
32826 .vcproj
32827 when
32828 using
32829 Vis‐
32830 ual
32831 Stu‐
32832 dio
32833 ver‐
32834 sion
32835 7.x
32836 (.NET)
32837 or
32838 later
32839 ver‐
32840 sion,
32841 and
32842 .dsp
32843 when
32844 using
32845 ear‐
32846 lier
32847 ver‐
32848 sions
32849 of
32850 Vis‐
32851 ual
32852 Stu‐
32853 dio.
32854
32855
32856 MSVS‐
32857 RE‐
32858 BUILD‐
32859 COM The
32860 rebuild
32861 com‐
32862 mand
32863 line
32864 placed
32865 in
32866 a
32867 gen‐
32868 er‐
32869 ated
32870 Mi‐
32871 cro‐
32872 soft
32873 Vis‐
32874 ual
32875 Stu‐
32876 dio
32877 project
32878 file.
32879 The
32880 default
32881 is
32882 to
32883 have
32884 Vis‐
32885 ual
32886 Stu‐
32887 dio
32888 invoke
32889 SCons
32890 with
32891 any
32892 spec‐
32893 i‐
32894 fied
32895 rebuild
32896 tar‐
32897 gets.
32898
32899
32900 MSVSS‐
32901 CONS The
32902 SCons
32903 used
32904 in
32905 gen‐
32906 er‐
32907 ated
32908 Mi‐
32909 cro‐
32910 soft
32911 Vis‐
32912 ual
32913 Stu‐
32914 dio
32915 project
32916 files.
32917 The
32918 default
32919 is
32920 the
32921 ver‐
32922 sion
32923 of
32924 SCons
32925 being
32926 used
32927 to
32928 gen‐
32929 er‐
32930 ate
32931 the
32932 project
32933 file.
32934
32935
32936 MSVSS‐
32937 CON‐
32938 SCOM The
32939 default
32940 SCons
32941 com‐
32942 mand
32943 used
32944 in
32945 gen‐
32946 er‐
32947 ated
32948 Mi‐
32949 cro‐
32950 soft
32951 Vis‐
32952 ual
32953 Stu‐
32954 dio
32955 project
32956 files.
32957
32958
32959 MSVSS‐
32960 CON‐
32961 SCRIPT The
32962 scon‐
32963 script
32964 file
32965 (that
32966 is,
32967 SCon‐
32968 struct
32969 or
32970 SCon‐
32971 script
32972 file)
32973 that
32974 will
32975 be
32976 invoked
32977 by
32978 Vis‐
32979 ual
32980 Stu‐
32981 dio
32982 project
32983 files
32984 (through
32985 the
32986 $MSVSS‐
32987 CON‐
32988 SCOM
32989 vari‐
32990 able).
32991 The
32992 default
32993 is
32994 the
32995 same
32996 scon‐
32997 script
32998 file
32999 that
33000 con‐
33001 tains
33002 the
33003 call
33004 to
33005 MSVSPro‐
33006 ject()
33007 to
33008 build
33009 the
33010 project
33011 file.
33012
33013
33014 MSVSS‐
33015 CONS‐
33016 FLAGS The
33017 SCons
33018 flags
33019 used
33020 in
33021 gen‐
33022 er‐
33023 ated
33024 Mi‐
33025 cro‐
33026 soft
33027 Vis‐
33028 ual
33029 Stu‐
33030 dio
33031 project
33032 files.
33033
33034
33035 MSVS‐
33036 SO‐
33037 LU‐
33038 TION‐
33039 COM
33040 The
33041 action
33042 used
33043 to
33044 gen‐
33045 er‐
33046 ate
33047 Mi‐
33048 cro‐
33049 soft
33050 Vis‐
33051 ual
33052 Stu‐
33053 dio
33054 solu‐
33055 tion
33056 files.
33057
33058
33059 MSVS‐
33060 SO‐
33061 LU‐
33062 TION‐
33063 SUF‐
33064 FIX The
33065 suf‐
33066 fix
33067 used
33068 for
33069 Mi‐
33070 cro‐
33071 soft
33072 Vis‐
33073 ual
33074 Stu‐
33075 dio
33076 solu‐
33077 tion
33078 (DSW)
33079 files.
33080 The
33081 default
33082 value
33083 is
33084 .sln
33085 when
33086 using
33087 Vis‐
33088 ual
33089 Stu‐
33090 dio
33091 ver‐
33092 sion
33093 7.x
33094 (.NET),
33095 and
33096 .dsw
33097 when
33098 using
33099 ear‐
33100 lier
33101 ver‐
33102 sions
33103 of
33104 Vis‐
33105 ual
33106 Stu‐
33107 dio.
33108
33109
33110 MWCW_VER‐
33111 SION
33112 The
33113 ver‐
33114 sion
33115 num‐
33116 ber
33117 of
33118 the
33119 MetroW‐
33120 erks
33121 Code‐
33122 War‐
33123 rior
33124 C
33125 com‐
33126 piler
33127 to
33128 be
33129 used.
33130
33131
33132 MWCW_VER‐
33133 SIONS
33134 A
33135 list
33136 of
33137 installed
33138 ver‐
33139 sions
33140 of
33141 the
33142 MetroW‐
33143 erks
33144 Code‐
33145 War‐
33146 rior
33147 C
33148 com‐
33149 piler
33150 on
33151 this
33152 sys‐
33153 tem.
33154
33155
33156 NAME Spec‐
33157 fies
33158 the
33159 name
33160 of
33161 the
33162 project
33163 to
33164 pack‐
33165 age.
33166
33167
33168 no_import_lib
33169 When
33170 set
33171 to
33172 non-
33173 zero,
33174 sup‐
33175 presses
33176 cre‐
33177 ation
33178 of
33179 a
33180 cor‐
33181 re‐
33182 spond‐
33183 ing
33184 Win‐
33185 dows
33186 static
33187 import
33188 lib
33189 by
33190 the
33191 SharedLi‐
33192 brary
33193 builder
33194 when
33195 used
33196 with
33197 MinGW,
33198 Mi‐
33199 cro‐
33200 soft
33201 Vis‐
33202 ual
33203 Stu‐
33204 dio
33205 or
33206 Metrow‐
33207 erks.
33208 This
33209 also
33210 sup‐
33211 presses
33212 cre‐
33213 ation
33214 of
33215 an
33216 export
33217 (.exp)
33218 file
33219 when
33220 using
33221 Mi‐
33222 cro‐
33223 soft
33224 Vis‐
33225 ual
33226 Stu‐
33227 dio.
33228
33229
33230 OBJPRE‐
33231 FIX
33232 The
33233 pre‐
33234 fix
33235 used
33236 for
33237 (static)
33238 object
33239 file
33240 names.
33241
33242
33243 OBJ‐
33244 SUF‐
33245 FIX The
33246 suf‐
33247 fix
33248 used
33249 for
33250 (static)
33251 object
33252 file
33253 names.
33254
33255
33256 P4 The
33257 Per‐
33258 force
33259 exe‐
33260 cutable.
33261
33262
33263 P4COM The
33264 com‐
33265 mand
33266 line
33267 used
33268 to
33269 fetch
33270 source
33271 files
33272 from
33273 Per‐
33274 force.
33275
33276
33277 P4COM‐
33278 STR The
33279 string
33280 dis‐
33281 played
33282 when
33283 fetch‐
33284 ing
33285 a
33286 source
33287 file
33288 from
33289 Per‐
33290 force.
33291 If
33292 this
33293 is
33294 not
33295 set,
33296 then
33297 $P4COM
33298 (the
33299 com‐
33300 mand
33301 line)
33302 is
33303 dis‐
33304 played.
33305
33306
33307 P4FLAGS
33308 Gen‐
33309 eral
33310 options
33311 that
33312 are
33313 passed
33314 to
33315 Per‐
33316 force.
33317
33318
33319 PACK‐
33320 AGE‐
33321 ROOT Spec‐
33322 i‐
33323 fies
33324 the
33325 direc‐
33326 tory
33327 where
33328 all
33329 files
33330 in
33331 result‐
33332 ing
33333 ar‐
33334 chive
33335 will
33336 be
33337 placed
33338 if
33339 appli‐
33340 ca‐
33341 ble.
33342 The
33343 default
33344 value
33345 is
33346 "$NAME-$VER‐
33347 SION".
33348
33349
33350 PACK‐
33351 AGETYPE
33352 Selects
33353 the
33354 pack‐
33355 age
33356 type
33357 to
33358 build.
33359 Cur‐
33360 rently
33361 these
33362 are
33363 avail‐
33364 able:
33365
33366 *
33367 msi
33368 -
33369 Mi‐
33370 cro‐
33371 soft
33372 In‐
33373 stall‐
33374 er
33375 *
33376 rpm
33377 -
33378 Red‐
33379 hat
33380 Pack‐
33381 age
33382 Manger
33383 *
33384 ipkg
33385 -
33386 Itsy
33387 Pack‐
33388 age
33389 Man‐
33390 age‐
33391 ment
33392 Sys‐
33393 tem
33394 *
33395 tarbz2
33396 -
33397 com‐
33398 pressed
33399 tar
33400 *
33401 targz
33402 -
33403 com‐
33404 pressed
33405 tar
33406 *
33407 zip
33408 -
33409 zip
33410 file
33411 *
33412 src_tarbz2
33413 -
33414 com‐
33415 pressed
33416 tar
33417 source
33418 *
33419 src_targz
33420 -
33421 com‐
33422 pressed
33423 tar
33424 source
33425 *
33426 src_zip
33427 -
33428 zip
33429 file
33430 source
33431
33432 This
33433 may
33434 be
33435 over‐
33436 rid‐
33437 den
33438 with
33439 the
33440 "pack‐
33441 age_type"
33442 com‐
33443 mand
33444 line
33445 option.
33446
33447
33448 PACK‐
33449 AGEV‐
33450 ER‐
33451 SION The
33452 ver‐
33453 sion
33454 of
33455 the
33456 pack‐
33457 age
33458 (not
33459 the
33460 under‐
33461 ly‐
33462 ing
33463 project).
33464 This
33465 is
33466 cur‐
33467 rently
33468 only
33469 used
33470 by
33471 the
33472 rpm
33473 pack‐
33474 ager
33475 and
33476 should
33477 reflect
33478 changes
33479 in
33480 the
33481 pack‐
33482 ag‐
33483 ing,
33484 not
33485 the
33486 under‐
33487 ly‐
33488 ing
33489 project
33490 code
33491 itself.
33492
33493
33494 PCH The
33495 Mi‐
33496 cro‐
33497 soft
33498 Vis‐
33499 ual
33500 C++
33501 pre‐
33502 com‐
33503 piled
33504 header
33505 that
33506 will
33507 be
33508 used
33509 when
33510 com‐
33511 pil‐
33512 ing
33513 object
33514 files.
33515 This
33516 vari‐
33517 able
33518 is
33519 ignored
33520 by
33521 tools
33522 other
33523 than
33524 Mi‐
33525 cro‐
33526 soft
33527 Vis‐
33528 ual
33529 C++.
33530 When
33531 this
33532 vari‐
33533 able
33534 is
33535 defined
33536 SCons
33537 will
33538 add
33539 options
33540 to
33541 the
33542 com‐
33543 piler
33544 com‐
33545 mand
33546 line
33547 to
33548 cause
33549 it
33550 to
33551 use
33552 the
33553 pre‐
33554 com‐
33555 piled
33556 header,
33557 and
33558 will
33559 also
33560 set
33561 up
33562 the
33563 depen‐
33564 den‐
33565 cies
33566 for
33567 the
33568 PCH
33569 file.
33570 Exam‐
33571 ple:
33572
33573 env['PCH'] = 'StdAfx.pch'
33574
33575
33576 PCH‐
33577 COM The
33578 com‐
33579 mand
33580 line
33581 used
33582 by
33583 the
33584 PCH()
33585 builder
33586 to
33587 gen‐
33588 er‐
33589 ated
33590 a
33591 pre‐
33592 com‐
33593 piled
33594 header.
33595
33596
33597 PCH‐
33598 COM‐
33599 STR The
33600 string
33601 dis‐
33602 played
33603 when
33604 gen‐
33605 er‐
33606 at‐
33607 ing
33608 a
33609 pre‐
33610 com‐
33611 piled
33612 header.
33613 If
33614 this
33615 is
33616 not
33617 set,
33618 then
33619 $PCH‐
33620 COM
33621 (the
33622 com‐
33623 mand
33624 line)
33625 is
33626 dis‐
33627 played.
33628
33629
33630 PCH‐
33631 PDBFLAGS
33632 A
33633 con‐
33634 struc‐
33635 tion
33636 vari‐
33637 able
33638 that,
33639 when
33640 expanded,
33641 adds
33642 the
33643 /yD
33644 flag
33645 to
33646 the
33647 com‐
33648 mand
33649 line
33650 only
33651 if
33652 the
33653 $PDB
33654 con‐
33655 struc‐
33656 tion
33657 vari‐
33658 able
33659 is
33660 set.
33661
33662
33663 PCH‐
33664 STOP This
33665 vari‐
33666 able
33667 spec‐
33668 i‐
33669 fies
33670 how
33671 much
33672 of
33673 a
33674 source
33675 file
33676 is
33677 pre‐
33678 com‐
33679 piled.
33680 This
33681 vari‐
33682 able
33683 is
33684 ignored
33685 by
33686 tools
33687 other
33688 than
33689 Mi‐
33690 cro‐
33691 soft
33692 Vis‐
33693 ual
33694 C++,
33695 or
33696 when
33697 the
33698 PCH
33699 vari‐
33700 able
33701 is
33702 not
33703 being
33704 used.
33705 When
33706 this
33707 vari‐
33708 able
33709 is
33710 define
33711 it
33712 must
33713 be
33714 a
33715 string
33716 that
33717 is
33718 the
33719 name
33720 of
33721 the
33722 header
33723 that
33724 is
33725 included
33726 at
33727 the
33728 end
33729 of
33730 the
33731 pre‐
33732 com‐
33733 piled
33734 por‐
33735 tion
33736 of
33737 the
33738 source
33739 files,
33740 or
33741 the
33742 empty
33743 string
33744 if
33745 the
33746 "#pragma
33747 hrd‐
33748 stop"
33749 con‐
33750 struct
33751 is
33752 being
33753 used:
33754
33755 env['PCHSTOP'] = 'StdAfx.h'
33756
33757
33758 PDB The
33759 Mi‐
33760 cro‐
33761 soft
33762 Vis‐
33763 ual
33764 C++
33765 PDB
33766 file
33767 that
33768 will
33769 store
33770 debug‐
33771 ging
33772 infor‐
33773 ma‐
33774 tion
33775 for
33776 object
33777 files,
33778 shared
33779 libraries,
33780 and
33781 pro‐
33782 grams.
33783 This
33784 vari‐
33785 able
33786 is
33787 ignored
33788 by
33789 tools
33790 other
33791 than
33792 Mi‐
33793 cro‐
33794 soft
33795 Vis‐
33796 ual
33797 C++.
33798 When
33799 this
33800 vari‐
33801 able
33802 is
33803 defined
33804 SCons
33805 will
33806 add
33807 options
33808 to
33809 the
33810 com‐
33811 piler
33812 and
33813 linker
33814 com‐
33815 mand
33816 line
33817 to
33818 cause
33819 them
33820 to
33821 gen‐
33822 er‐
33823 ate
33824 exter‐
33825 nal
33826 debug‐
33827 ging
33828 infor‐
33829 ma‐
33830 tion,
33831 and
33832 will
33833 also
33834 set
33835 up
33836 the
33837 depen‐
33838 den‐
33839 cies
33840 for
33841 the
33842 PDB
33843 file.
33844 Exam‐
33845 ple:
33846
33847 env['PDB'] = 'hello.pdb'
33848
33849 The
33850 Vis‐
33851 ual
33852 C++
33853 com‐
33854 piler
33855 switch
33856 that
33857 SCons
33858 uses
33859 by
33860 default
33861 to
33862 gen‐
33863 er‐
33864 ate
33865 PDB
33866 infor‐
33867 ma‐
33868 tion
33869 is
33870 /Z7.
33871 This
33872 works
33873 cor‐
33874 rectly
33875 with
33876 par‐
33877 al‐
33878 lel
33879 (-j)
33880 builds
33881 because
33882 it
33883 embeds
33884 the
33885 debug
33886 infor‐
33887 ma‐
33888 tion
33889 in
33890 the
33891 inter‐
33892 me‐
33893 di‐
33894 ate
33895 object
33896 files,
33897 as
33898 opposed
33899 to
33900 shar‐
33901 ing
33902 a
33903 sin‐
33904 gle
33905 PDB
33906 file
33907 between
33908 mul‐
33909 ti‐
33910 ple
33911 object
33912 files.
33913 This
33914 is
33915 also
33916 the
33917 only
33918 way
33919 to
33920 get
33921 debug
33922 infor‐
33923 ma‐
33924 tion
33925 embed‐
33926 ded
33927 into
33928 a
33929 static
33930 library.
33931 Using
33932 the
33933 /Zi
33934 instead
33935 may
33936 yield
33937 improved
33938 link-
33939 time
33940 per‐
33941 for‐
33942 mance,
33943 although
33944 par‐
33945 al‐
33946 lel
33947 builds
33948 will
33949 no
33950 longer
33951 work.
33952 You
33953 can
33954 gen‐
33955 er‐
33956 ate
33957 PDB
33958 files
33959 with
33960 the
33961 /Zi
33962 switch
33963 by
33964 over‐
33965 rid‐
33966 ing
33967 the
33968 default
33969 $CCPDBFLAGS
33970 vari‐
33971 able;
33972 see
33973 the
33974 entry
33975 for
33976 that
33977 vari‐
33978 able
33979 for
33980 spe‐
33981 cific
33982 exam‐
33983 ples.
33984
33985
33986 PDF‐
33987 COM A
33988 dep‐
33989 re‐
33990 cated
33991 syn‐
33992 onym
33993 for
33994 $DVIPDF‐
33995 COM.
33996
33997
33998 PDFLA‐
33999 TEX The
34000 &pdfla‐
34001 tex;
34002 util‐
34003 ity.
34004
34005
34006 PDFLA‐
34007 TEX‐
34008 COM The
34009 com‐
34010 mand
34011 line
34012 used
34013 to
34014 call
34015 the
34016 &pdfla‐
34017 tex;
34018 util‐
34019 ity.
34020
34021
34022 PDFLA‐
34023 TEX‐
34024 COM‐
34025 STR The
34026 string
34027 dis‐
34028 played
34029 when
34030 call‐
34031 ing
34032 the
34033 &pdfla‐
34034 tex;
34035 util‐
34036 ity.
34037 If
34038 this
34039 is
34040 not
34041 set,
34042 then
34043 $PDFLA‐
34044 TEX‐
34045 COM
34046 (the
34047 com‐
34048 mand
34049 line)
34050 is
34051 dis‐
34052 played.
34053
34054 env = Environment(PDFLATEX;COMSTR = "Building $TARGET from LaTeX input $SOURCES")
34055
34056
34057 PDFLA‐
34058 TEXFLAGS
34059 Gen‐
34060 eral
34061 options
34062 passed
34063 to
34064 the
34065 &pdfla‐
34066 tex;
34067 util‐
34068 ity.
34069
34070
34071 PDF‐
34072 PRE‐
34073 FIX The
34074 pre‐
34075 fix
34076 used
34077 for
34078 PDF
34079 file
34080 names.
34081
34082
34083 PDF‐
34084 SUF‐
34085 FIX The
34086 suf‐
34087 fix
34088 used
34089 for
34090 PDF
34091 file
34092 names.
34093
34094
34095 PDF‐
34096 TEX The
34097 &pdf‐
34098 tex;
34099 util‐
34100 ity.
34101
34102
34103 PDF‐
34104 TEX‐
34105 COM The
34106 com‐
34107 mand
34108 line
34109 used
34110 to
34111 call
34112 the
34113 &pdf‐
34114 tex;
34115 util‐
34116 ity.
34117
34118
34119 PDF‐
34120 TEX‐
34121 COM‐
34122 STR The
34123 string
34124 dis‐
34125 played
34126 when
34127 call‐
34128 ing
34129 the
34130 &pdf‐
34131 tex;
34132 util‐
34133 ity.
34134 If
34135 this
34136 is
34137 not
34138 set,
34139 then
34140 $PDF‐
34141 TEX‐
34142 COM
34143 (the
34144 com‐
34145 mand
34146 line)
34147 is
34148 dis‐
34149 played.
34150
34151 env = Environment(PDFTEXCOMSTR = "Building $TARGET from TeX input $SOURCES")
34152
34153
34154 PDF‐
34155 TEXFLAGS
34156 Gen‐
34157 eral
34158 options
34159 passed
34160 to
34161 the
34162 &pdf‐
34163 tex;
34164 util‐
34165 ity.
34166
34167
34168 PKGCHK On
34169 Solaris
34170 sys‐
34171 tems,
34172 the
34173 pack‐
34174 age-
34175 check‐
34176 ing
34177 pro‐
34178 gram
34179 that
34180 will
34181 be
34182 used
34183 (along
34184 with
34185 $PKGINFO)
34186 to
34187 look
34188 for
34189 installed
34190 ver‐
34191 sions
34192 of
34193 the
34194 Sun
34195 PRO
34196 C++
34197 com‐
34198 piler.
34199 The
34200 default
34201 is
34202 /usr/sbin/pgkchk.
34203
34204
34205 PKGINFO
34206 On
34207 Solaris
34208 sys‐
34209 tems,
34210 the
34211 pack‐
34212 age
34213 infor‐
34214 ma‐
34215 tion
34216 pro‐
34217 gram
34218 that
34219 will
34220 be
34221 used
34222 (along
34223 with
34224 $PKGCHK)
34225 to
34226 look
34227 for
34228 installed
34229 ver‐
34230 sions
34231 of
34232 the
34233 Sun
34234 PRO
34235 C++
34236 com‐
34237 piler.
34238 The
34239 default
34240 is
34241 pkginfo.
34242
34243
34244 PLAT‐
34245 FORM The
34246 name
34247 of
34248 the
34249 plat‐
34250 form
34251 used
34252 to
34253 cre‐
34254 ate
34255 the
34256 Envi‐
34257 ron‐
34258 ment.
34259 If
34260 no
34261 plat‐
34262 form
34263 is
34264 spec‐
34265 i‐
34266 fied
34267 when
34268 the
34269 Envi‐
34270 ron‐
34271 ment
34272 is
34273 cre‐
34274 ated,
34275 scons
34276 autode‐
34277 tects
34278 the
34279 plat‐
34280 form.
34281
34282 env = Environment(tools = [])
34283 if env['PLATFORM'] == 'cygwin':
34284 Tool('mingw')(env)
34285 else:
34286 Tool('msvc')(env)
34287
34288
34289 PRINT_CMD_LINE_FUNC
34290 A
34291 Python
34292 func‐
34293 tion
34294 used
34295 to
34296 print
34297 the
34298 com‐
34299 mand
34300 lines
34301 as
34302 they
34303 are
34304 exe‐
34305 cuted
34306 (assum‐
34307 ing
34308 com‐
34309 mand
34310 print‐
34311 ing
34312 is
34313 not
34314 dis‐
34315 abled
34316 by
34317 the
34318 -q
34319 or
34320 -s
34321 options
34322 or
34323 their
34324 equiv‐
34325 a‐
34326 lents).
34327 The
34328 func‐
34329 tion
34330 should
34331 take
34332 four
34333 argu‐
34334 ments:
34335 s,
34336 the
34337 com‐
34338 mand
34339 being
34340 exe‐
34341 cuted
34342 (a
34343 string),
34344 tar‐
34345 get,
34346 the
34347 tar‐
34348 get
34349 being
34350 built
34351 (file
34352 node,
34353 list,
34354 or
34355 string
34356 name(s)),
34357 source,
34358 the
34359 source(s)
34360 used
34361 (file
34362 node,
34363 list,
34364 or
34365 string
34366 name(s)),
34367 and
34368 env,
34369 the
34370 envi‐
34371 ron‐
34372 ment
34373 being
34374 used.
34375
34376 The
34377 func‐
34378 tion
34379 must
34380 do
34381 the
34382 print‐
34383 ing
34384 itself.
34385 The
34386 default
34387 imple‐
34388 men‐
34389 ta‐
34390 tion,
34391 used
34392 if
34393 this
34394 vari‐
34395 able
34396 is
34397 not
34398 set
34399 or
34400 is
34401 None,
34402 is:
34403 def print_cmd_line(s, target, source, env):
34404 sys.stdout.write(s + "\n")
34405
34406 Here's
34407 an
34408 exam‐
34409 ple
34410 of
34411 a
34412 more
34413 inter‐
34414 est‐
34415 ing
34416 func‐
34417 tion:
34418
34419 def print_cmd_line(s, target, source, env):
34420 sys.stdout.write("Building %s -> %s...\n" %
34421 (' and '.join([str(x) for x in source]),
34422 ' and '.join([str(x) for x in target])))
34423 env=Environment(PRINT_CMD_LINE_FUNC=print_cmd_line)
34424 env.Program('foo', 'foo.c')
34425
34426 This
34427 just
34428 prints
34429 "Build‐
34430 ing
34431 tar‐
34432 get‐
34433 name
34434 from
34435 source‐
34436 name..."
34437 instead
34438 of
34439 the
34440 actual
34441 com‐
34442 mands.
34443 Such
34444 a
34445 func‐
34446 tion
34447 could
34448 also
34449 log
34450 the
34451 actual
34452 com‐
34453 mands
34454 to
34455 a
34456 log
34457 file,
34458 for
34459 exam‐
34460 ple.
34461
34462
34463 PROG‐
34464 PRE‐
34465 FIX The
34466 pre‐
34467 fix
34468 used
34469 for
34470 exe‐
34471 cutable
34472 file
34473 names.
34474
34475
34476 PROG‐
34477 SUF‐
34478 FIX The
34479 suf‐
34480 fix
34481 used
34482 for
34483 exe‐
34484 cutable
34485 file
34486 names.
34487
34488
34489 PSCOM The
34490 com‐
34491 mand
34492 line
34493 used
34494 to
34495 con‐
34496 vert
34497 TeX
34498 DVI
34499 files
34500 into
34501 a
34502 Post‐
34503 Script
34504 file.
34505
34506
34507 PSCOM‐
34508 STR
34509 The
34510 string
34511 dis‐
34512 played
34513 when
34514 a
34515 TeX
34516 DVI
34517 file
34518 is
34519 con‐
34520 verted
34521 into
34522 a
34523 Post‐
34524 Script
34525 file.
34526 If
34527 this
34528 is
34529 not
34530 set,
34531 then
34532 $PSCOM
34533 (the
34534 com‐
34535 mand
34536 line)
34537 is
34538 dis‐
34539 played.
34540
34541
34542 PSPRE‐
34543 FIX The
34544 pre‐
34545 fix
34546 used
34547 for
34548 Post‐
34549 Script
34550 file
34551 names.
34552
34553
34554 PSSUF‐
34555 FIX The
34556 pre‐
34557 fix
34558 used
34559 for
34560 Post‐
34561 Script
34562 file
34563 names.
34564
34565
34566 QT_AUTOSCAN
34567 Turn
34568 off
34569 scan‐
34570 ning
34571 for
34572 moca‐
34573 ble
34574 files.
34575 Use
34576 the
34577 Moc
34578 Builder
34579 to
34580 explicitely
34581 spec‐
34582 ify
34583 files
34584 to
34585 run
34586 moc
34587 on.
34588
34589
34590 QT_BIN‐
34591 PATH
34592 The
34593 path
34594 where
34595 the
34596 qt
34597 bina‐
34598 ries
34599 are
34600 installed.
34601 The
34602 default
34603 value
34604 is
34605 '$QTDIR/bin'.
34606
34607
34608 QT_CPP‐
34609 PATH
34610 The
34611 path
34612 where
34613 the
34614 qt
34615 header
34616 files
34617 are
34618 installed.
34619 The
34620 default
34621 value
34622 is
34623 '$QTDIR/include'.
34624 Note:
34625 If
34626 you
34627 set
34628 this
34629 vari‐
34630 able
34631 to
34632 None,
34633 the
34634 tool
34635 won't
34636 change
34637 the
34638 $CPP‐
34639 PATH
34640 con‐
34641 struc‐
34642 tion
34643 vari‐
34644 able.
34645
34646
34647 QT_DEBUG
34648 Prints
34649 lots
34650 of
34651 debug‐
34652 ging
34653 infor‐
34654 ma‐
34655 tion
34656 while
34657 scan‐
34658 ning
34659 for
34660 moc
34661 files.
34662
34663
34664 QT_LIB Default
34665 value
34666 is
34667 'qt'.
34668 You
34669 may
34670 want
34671 to
34672 set
34673 this
34674 to
34675 'qt-
34676 mt'.
34677 Note:
34678 If
34679 you
34680 set
34681 this
34682 vari‐
34683 able
34684 to
34685 None,
34686 the
34687 tool
34688 won't
34689 change
34690 the
34691 $LIBS
34692 vari‐
34693 able.
34694
34695
34696 QT_LIB‐
34697 PATH
34698 The
34699 path
34700 where
34701 the
34702 qt
34703 libraries
34704 are
34705 installed.
34706 The
34707 default
34708 value
34709 is
34710 '$QTDIR/lib'.
34711 Note:
34712 If
34713 you
34714 set
34715 this
34716 vari‐
34717 able
34718 to
34719 None,
34720 the
34721 tool
34722 won't
34723 change
34724 the
34725 $LIB‐
34726 PATH
34727 con‐
34728 struc‐
34729 tion
34730 vari‐
34731 able.
34732
34733
34734 QT_MOC Default
34735 value
34736 is
34737 '$QT_BIN‐
34738 PATH/moc'.
34739
34740
34741 QT_MOC‐
34742 CXXPRE‐
34743 FIX
34744 Default
34745 value
34746 is
34747 ''.
34748 Pre‐
34749 fix
34750 for
34751 moc
34752 out‐
34753 put
34754 files,
34755 when
34756 source
34757 is
34758 a
34759 cxx
34760 file.
34761
34762
34763 QT_MOC‐
34764 CXXSUF‐
34765 FIX
34766 Default
34767 value
34768 is
34769 '.moc'.
34770 Suf‐
34771 fix
34772 for
34773 moc
34774 out‐
34775 put
34776 files,
34777 when
34778 source
34779 is
34780 a
34781 cxx
34782 file.
34783
34784
34785 QT_MOCFROM‐
34786 CXXCOM
34787 Com‐
34788 mand
34789 to
34790 gen‐
34791 er‐
34792 ate
34793 a
34794 moc
34795 file
34796 from
34797 a
34798 cpp
34799 file.
34800
34801
34802 QT_MOCFROM‐
34803 CXXCOM‐
34804 STR
34805 The
34806 string
34807 dis‐
34808 played
34809 when
34810 gen‐
34811 er‐
34812 at‐
34813 ing
34814 a
34815 moc
34816 file
34817 from
34818 a
34819 cpp
34820 file.
34821 If
34822 this
34823 is
34824 not
34825 set,
34826 then
34827 $QT_MOCFROM‐
34828 CXXCOM
34829 (the
34830 com‐
34831 mand
34832 line)
34833 is
34834 dis‐
34835 played.
34836
34837
34838 QT_MOCFROM‐
34839 CXXFLAGS
34840 Default
34841 value
34842 is
34843 '-i'.
34844 These
34845 flags
34846 are
34847 passed
34848 to
34849 moc,
34850 when
34851 moc‐
34852 c‐
34853 ing
34854 a
34855 C++
34856 file.
34857
34858
34859 QT_MOCFROMH‐
34860 COM
34861 Com‐
34862 mand
34863 to
34864 gen‐
34865 er‐
34866 ate
34867 a
34868 moc
34869 file
34870 from
34871 a
34872 header.
34873
34874
34875 QT_MOCFROMH‐
34876 COM‐
34877 STR
34878 The
34879 string
34880 dis‐
34881 played
34882 when
34883 gen‐
34884 er‐
34885 at‐
34886 ing
34887 a
34888 moc
34889 file
34890 from
34891 a
34892 cpp
34893 file.
34894 If
34895 this
34896 is
34897 not
34898 set,
34899 then
34900 $QT_MOCFROMH‐
34901 COM
34902 (the
34903 com‐
34904 mand
34905 line)
34906 is
34907 dis‐
34908 played.
34909
34910
34911 QT_MOCFROMH‐
34912 FLAGS
34913 Default
34914 value
34915 is
34916 ''.
34917 These
34918 flags
34919 are
34920 passed
34921 to
34922 moc,
34923 when
34924 moc‐
34925 c‐
34926 ing
34927 a
34928 header
34929 file.
34930
34931
34932 QT_MOCH‐
34933 PRE‐
34934 FIX
34935 Default
34936 value
34937 is
34938 'moc_'.
34939 Pre‐
34940 fix
34941 for
34942 moc
34943 out‐
34944 put
34945 files,
34946 when
34947 source
34948 is
34949 a
34950 header.
34951
34952
34953 QT_MOCHSUF‐
34954 FIX
34955 Default
34956 value
34957 is
34958 '$CXXFILE‐
34959 SUF‐
34960 FIX'.
34961 Suf‐
34962 fix
34963 for
34964 moc
34965 out‐
34966 put
34967 files,
34968 when
34969 source
34970 is
34971 a
34972 header.
34973
34974
34975 QT_UIC Default
34976 value
34977 is
34978 '$QT_BIN‐
34979 PATH/uic'.
34980
34981
34982 QT_UIC‐
34983 COM
34984 Com‐
34985 mand
34986 to
34987 gen‐
34988 er‐
34989 ate
34990 header
34991 files
34992 from
34993 .ui
34994 files.
34995
34996
34997 QT_UIC‐
34998 COM‐
34999 STR
35000 The
35001 string
35002 dis‐
35003 played
35004 when
35005 gen‐
35006 er‐
35007 at‐
35008 ing
35009 header
35010 files
35011 from
35012 .ui
35013 files.
35014 If
35015 this
35016 is
35017 not
35018 set,
35019 then
35020 $QT_UIC‐
35021 COM
35022 (the
35023 com‐
35024 mand
35025 line)
35026 is
35027 dis‐
35028 played.
35029
35030
35031 QT_UICDE‐
35032 CLFLAGS
35033 Default
35034 value
35035 is
35036 ''.
35037 These
35038 flags
35039 are
35040 passed
35041 to
35042 uic,
35043 when
35044 cre‐
35045 at‐
35046 ing
35047 a
35048 a
35049 h
35050 file
35051 from
35052 a
35053 .ui
35054 file.
35055
35056
35057 QT_UICDE‐
35058 CL‐
35059 PRE‐
35060 FIX
35061 Default
35062 value
35063 is
35064 ''.
35065 Pre‐
35066 fix
35067 for
35068 uic
35069 gen‐
35070 er‐
35071 ated
35072 header
35073 files.
35074
35075
35076 QT_UICDE‐
35077 CLSUF‐
35078 FIX
35079 Default
35080 value
35081 is
35082 '.h'.
35083 Suf‐
35084 fix
35085 for
35086 uic
35087 gen‐
35088 er‐
35089 ated
35090 header
35091 files.
35092
35093
35094 QT_UICIM‐
35095 PLFLAGS
35096 Default
35097 value
35098 is
35099 ''.
35100 These
35101 flags
35102 are
35103 passed
35104 to
35105 uic,
35106 when
35107 cre‐
35108 at‐
35109 ing
35110 a
35111 cxx
35112 file
35113 from
35114 a
35115 .ui
35116 file.
35117
35118
35119 QT_UICIM‐
35120 PL‐
35121 PRE‐
35122 FIX
35123 Default
35124 value
35125 is
35126 'uic_'.
35127 Pre‐
35128 fix
35129 for
35130 uic
35131 gen‐
35132 er‐
35133 ated
35134 imple‐
35135 men‐
35136 ta‐
35137 tion
35138 files.
35139
35140
35141 QT_UICIM‐
35142 PLSUF‐
35143 FIX
35144 Default
35145 value
35146 is
35147 '$CXXFILE‐
35148 SUF‐
35149 FIX'.
35150 Suf‐
35151 fix
35152 for
35153 uic
35154 gen‐
35155 er‐
35156 ated
35157 imple‐
35158 men‐
35159 ta‐
35160 tion
35161 files.
35162
35163
35164 QT_UISUF‐
35165 FIX
35166 Default
35167 value
35168 is
35169 '.ui'.
35170 Suf‐
35171 fix
35172 of
35173 designer
35174 input
35175 files.
35176
35177
35178 QTDIR The
35179 qt
35180 tool
35181 tries
35182 to
35183 take
35184 this
35185 from
35186 os.env‐
35187 i‐
35188 ron.
35189 It
35190 also
35191 ini‐
35192 tial‐
35193 izes
35194 all
35195 QT_*
35196 con‐
35197 struc‐
35198 tion
35199 vari‐
35200 ables
35201 listed
35202 below.
35203 (Note
35204 that
35205 all
35206 paths
35207 are
35208 con‐
35209 structed
35210 with
35211 python's
35212 os.path.join()
35213 method,
35214 but
35215 are
35216 listed
35217 here
35218 with
35219 the
35220 '/'
35221 sep‐
35222 a‐
35223 ra‐
35224 tor
35225 for
35226 eas‐
35227 ier
35228 read‐
35229 ing.)
35230 In
35231 addi‐
35232 tion,
35233 the
35234 con‐
35235 struc‐
35236 tion
35237 envi‐
35238 ron‐
35239 ment
35240 vari‐
35241 ables
35242 $CPP‐
35243 PATH,
35244 $LIB‐
35245 PATH
35246 and
35247 $LIBS
35248 may
35249 be
35250 mod‐
35251 i‐
35252 fied
35253 and
35254 the
35255 vari‐
35256 ables
35257 PRO‐
35258 GEMIT‐
35259 TER,
35260 SHLIBE‐
35261 MIT‐
35262 TER
35263 and
35264 LIBE‐
35265 MIT‐
35266 TER
35267 are
35268 mod‐
35269 i‐
35270 fied.
35271 Because
35272 the
35273 build-
35274 per‐
35275 for‐
35276 mance
35277 is
35278 affected
35279 when
35280 using
35281 this
35282 tool,
35283 you
35284 have
35285 to
35286 explic‐
35287 itly
35288 spec‐
35289 ify
35290 it
35291 at
35292 Envi‐
35293 ron‐
35294 ment
35295 cre‐
35296 ation:
35297
35298 Environment(tools=['default','qt'])
35299
35300 The
35301 qt
35302 tool
35303 sup‐
35304 ports
35305 the
35306 fol‐
35307 low‐
35308 ing
35309 oper‐
35310 a‐
35311 tions:
35312
35313 Auto‐
35314 matic
35315 moc
35316 file
35317 gen‐
35318 er‐
35319 a‐
35320 tion
35321 from
35322 header
35323 files.
35324 You
35325 do
35326 not
35327 have
35328 to
35329 spec‐
35330 ify
35331 moc
35332 files
35333 explic‐
35334 itly,
35335 the
35336 tool
35337 does
35338 it
35339 for
35340 you.
35341 How‐
35342 ever,
35343 there
35344 are
35345 a
35346 few
35347 pre‐
35348 con‐
35349 di‐
35350 tions
35351 to
35352 do
35353 so:
35354 Your
35355 header
35356 file
35357 must
35358 have
35359 the
35360 same
35361 file‐
35362 base
35363 as
35364 your
35365 imple‐
35366 men‐
35367 ta‐
35368 tion
35369 file
35370 and
35371 must
35372 stay
35373 in
35374 the
35375 same
35376 direc‐
35377 tory.
35378 It
35379 must
35380 have
35381 one
35382 of
35383 the
35384 suf‐
35385 fixes
35386 .h,
35387 .hpp,
35388 .H,
35389 .hxx,
35390 .hh.
35391 You
35392 can
35393 turn
35394 off
35395 auto‐
35396 matic
35397 moc
35398 file
35399 gen‐
35400 er‐
35401 a‐
35402 tion
35403 by
35404 set‐
35405 ting
35406 QT_AUTOSCAN
35407 to
35408 0.
35409 See
35410 also
35411 the
35412 cor‐
35413 re‐
35414 spond‐
35415 ing
35416 builder
35417 method
35418 Moc()
35419
35420 Auto‐
35421 matic
35422 moc
35423 file
35424 gen‐
35425 er‐
35426 a‐
35427 tion
35428 from
35429 cxx
35430 files.
35431 As
35432 stated
35433 in
35434 the
35435 qt
35436 doc‐
35437 u‐
35438 men‐
35439 ta‐
35440 tion,
35441 include
35442 the
35443 moc
35444 file
35445 at
35446 the
35447 end
35448 of
35449 the
35450 cxx
35451 file.
35452 Note
35453 that
35454 you
35455 have
35456 to
35457 include
35458 the
35459 file,
35460 which
35461 is
35462 gen‐
35463 er‐
35464 ated
35465 by
35466 the
35467 trans‐
35468 for‐
35469 ma‐
35470 tion
35471 ${QT_MOC‐
35472 CXXPRE‐
35473 FIX}<base‐
35474 name>${QT_MOC‐
35475 CXXSUF‐
35476 FIX},
35477 by
35478 default
35479 <base‐
35480 name>.moc.
35481 A
35482 warn‐
35483 ing
35484 is
35485 gen‐
35486 er‐
35487 ated
35488 after
35489 build‐
35490 ing
35491 the
35492 moc
35493 file,
35494 if
35495 you
35496 do
35497 not
35498 include
35499 the
35500 cor‐
35501 rect
35502 file.
35503 If
35504 you
35505 are
35506 using
35507 Vari‐
35508 ant‐
35509 Dir,
35510 you
35511 may
35512 need
35513 to
35514 spec‐
35515 ify
35516 dupli‐
35517 cate=1.
35518 You
35519 can
35520 turn
35521 off
35522 auto‐
35523 matic
35524 moc
35525 file
35526 gen‐
35527 er‐
35528 a‐
35529 tion
35530 by
35531 set‐
35532 ting
35533 QT_AUTOSCAN
35534 to
35535 0.
35536 See
35537 also
35538 the
35539 cor‐
35540 re‐
35541 spond‐
35542 ing
35543 Moc()
35544 builder
35545 method.
35546
35547 Auto‐
35548 matic
35549 han‐
35550 dling
35551 of
35552 .ui
35553 files.
35554 The
35555 imple‐
35556 men‐
35557 ta‐
35558 tion
35559 files
35560 gen‐
35561 er‐
35562 ated
35563 from
35564 .ui
35565 files
35566 are
35567 han‐
35568 dled
35569 much
35570 the
35571 same
35572 as
35573 yacc
35574 or
35575 lex
35576 files.
35577 Each
35578 .ui
35579 file
35580 given
35581 as
35582 a
35583 source
35584 of
35585 Pro‐
35586 gram,
35587 Library
35588 or
35589 SharedLi‐
35590 brary
35591 will
35592 gen‐
35593 er‐
35594 ate
35595 three
35596 files,
35597 the
35598 dec‐
35599 la‐
35600 ra‐
35601 tion
35602 file,
35603 the
35604 imple‐
35605 men‐
35606 ta‐
35607 tion
35608 file
35609 and
35610 a
35611 moc
35612 file.
35613 Because
35614 there
35615 are
35616 also
35617 gen‐
35618 er‐
35619 ated
35620 head‐
35621 ers,
35622 you
35623 may
35624 need
35625 to
35626 spec‐
35627 ify
35628 dupli‐
35629 cate=1
35630 in
35631 calls
35632 to
35633 Vari‐
35634 ant‐
35635 Dir.
35636 See
35637 also
35638 the
35639 cor‐
35640 re‐
35641 spond‐
35642 ing
35643 Uic()
35644 builder
35645 method.
35646
35647
35648 RAN‐
35649 LIB The
35650 ar‐
35651 chive
35652 indexer.
35653
35654
35655 RAN‐
35656 LIB‐
35657 COM The
35658 com‐
35659 mand
35660 line
35661 used
35662 to
35663 index
35664 a
35665 static
35666 library
35667 ar‐
35668 chive.
35669
35670
35671 RAN‐
35672 LIB‐
35673 COM‐
35674 STR The
35675 string
35676 dis‐
35677 played
35678 when
35679 a
35680 static
35681 library
35682 ar‐
35683 chive
35684 is
35685 indexed.
35686 If
35687 this
35688 is
35689 not
35690 set,
35691 then
35692 $RAN‐
35693 LIB‐
35694 COM
35695 (the
35696 com‐
35697 mand
35698 line)
35699 is
35700 dis‐
35701 played.
35702
35703 env = Environment(RANLIBCOMSTR = "Indexing $TARGET")
35704
35705
35706 RAN‐
35707 LIBFLAGS
35708 Gen‐
35709 eral
35710 options
35711 passed
35712 to
35713 the
35714 ar‐
35715 chive
35716 indexer.
35717
35718
35719 RC The
35720 resource
35721 com‐
35722 piler
35723 used
35724 to
35725 build
35726 a
35727 Mi‐
35728 cro‐
35729 soft
35730 Vis‐
35731 ual
35732 C++
35733 resource
35734 file.
35735
35736
35737 RCCOM The
35738 com‐
35739 mand
35740 line
35741 used
35742 to
35743 build
35744 a
35745 Mi‐
35746 cro‐
35747 soft
35748 Vis‐
35749 ual
35750 C++
35751 resource
35752 file.
35753
35754
35755 RCCOM‐
35756 STR The
35757 string
35758 dis‐
35759 played
35760 when
35761 invok‐
35762 ing
35763 the
35764 resource
35765 com‐
35766 piler
35767 to
35768 build
35769 a
35770 Mi‐
35771 cro‐
35772 soft
35773 Vis‐
35774 ual
35775 C++
35776 resource
35777 file.
35778 If
35779 this
35780 is
35781 not
35782 set,
35783 then
35784 $RCCOM
35785 (the
35786 com‐
35787 mand
35788 line)
35789 is
35790 dis‐
35791 played.
35792
35793
35794 RCFLAGS
35795 The
35796 flags
35797 passed
35798 to
35799 the
35800 resource
35801 com‐
35802 piler
35803 by
35804 the
35805 RES
35806 builder.
35807
35808
35809 RCINCFLAGS
35810 An
35811 auto‐
35812 mat‐
35813 i‐
35814 cally-
35815 gen‐
35816 er‐
35817 ated
35818 con‐
35819 struc‐
35820 tion
35821 vari‐
35822 able
35823 con‐
35824 tain‐
35825 ing
35826 the
35827 com‐
35828 mand-
35829 line
35830 options
35831 for
35832 spec‐
35833 i‐
35834 fy‐
35835 ing
35836 direc‐
35837 to‐
35838 ries
35839 to
35840 be
35841 searched
35842 by
35843 the
35844 resource
35845 com‐
35846 piler.
35847 The
35848 value
35849 of
35850 $RCINCFLAGS
35851 is
35852 cre‐
35853 ated
35854 by
35855 append‐
35856 ing
35857 $RCINCPRE‐
35858 FIX
35859 and
35860 $RCINC‐
35861 SUF‐
35862 FIX
35863 to
35864 the
35865 begin‐
35866 ning
35867 and
35868 end
35869 of
35870 each
35871 direc‐
35872 tory
35873 in
35874 $CPP‐
35875 PATH.
35876
35877
35878 RCINCPRE‐
35879 FIX
35880 The
35881 pre‐
35882 fix
35883 (flag)
35884 used
35885 to
35886 spec‐
35887 ify
35888 an
35889 include
35890 direc‐
35891 tory
35892 on
35893 the
35894 resource
35895 com‐
35896 piler
35897 com‐
35898 mand
35899 line.
35900 This
35901 will
35902 be
35903 appended
35904 to
35905 the
35906 begin‐
35907 ning
35908 of
35909 each
35910 direc‐
35911 tory
35912 in
35913 the
35914 $CPP‐
35915 PATH
35916 con‐
35917 struc‐
35918 tion
35919 vari‐
35920 able
35921 when
35922 the
35923 $RCINCFLAGS
35924 vari‐
35925 able
35926 is
35927 expanded.
35928
35929
35930 RCINC‐
35931 SUF‐
35932 FIX The
35933 suf‐
35934 fix
35935 used
35936 to
35937 spec‐
35938 ify
35939 an
35940 include
35941 direc‐
35942 tory
35943 on
35944 the
35945 resource
35946 com‐
35947 piler
35948 com‐
35949 mand
35950 line.
35951 This
35952 will
35953 be
35954 appended
35955 to
35956 the
35957 end
35958 of
35959 each
35960 direc‐
35961 tory
35962 in
35963 the
35964 $CPP‐
35965 PATH
35966 con‐
35967 struc‐
35968 tion
35969 vari‐
35970 able
35971 when
35972 the
35973 $RCINCFLAGS
35974 vari‐
35975 able
35976 is
35977 expanded.
35978
35979
35980 RCS The
35981 RCS
35982 exe‐
35983 cutable.
35984 Note
35985 that
35986 this
35987 vari‐
35988 able
35989 is
35990 not
35991 actu‐
35992 ally
35993 used
35994 for
35995 the
35996 com‐
35997 mand
35998 to
35999 fetch
36000 source
36001 files
36002 from
36003 RCS;
36004 see
36005 the
36006 $RCS_CO
36007 con‐
36008 struc‐
36009 tion
36010 vari‐
36011 able,
36012 below.
36013
36014
36015 RCS_CO The
36016 RCS
36017 "check‐
36018 out"
36019 exe‐
36020 cutable,
36021 used
36022 to
36023 fetch
36024 source
36025 files
36026 from
36027 RCS.
36028
36029
36030 RCS_COCOM
36031 The
36032 com‐
36033 mand
36034 line
36035 used
36036 to
36037 fetch
36038 (check‐
36039 out)
36040 source
36041 files
36042 from
36043 RCS.
36044
36045
36046 RCS_COCOM‐
36047 STR
36048 The
36049 string
36050 dis‐
36051 played
36052 when
36053 fetch‐
36054 ing
36055 a
36056 source
36057 file
36058 from
36059 RCS.
36060 If
36061 this
36062 is
36063 not
36064 set,
36065 then
36066 $RCS_COCOM
36067 (the
36068 com‐
36069 mand
36070 line)
36071 is
36072 dis‐
36073 played.
36074
36075
36076 RCS_COFLAGS
36077 Options
36078 that
36079 are
36080 passed
36081 to
36082 the
36083 $RCS_CO
36084 com‐
36085 mand.
36086
36087
36088 RDirs A
36089 func‐
36090 tion
36091 that
36092 con‐
36093 verts
36094 a
36095 string
36096 into
36097 a
36098 list
36099 of
36100 Dir
36101 instances
36102 by
36103 search‐
36104 ing
36105 the
36106 repos‐
36107 i‐
36108 to‐
36109 ries.
36110
36111
36112 REGSVR The
36113 pro‐
36114 gram
36115 used
36116 on
36117 Win‐
36118 dows
36119 sys‐
36120 tems
36121 to
36122 reg‐
36123 is‐
36124 ter
36125 a
36126 newly-
36127 built
36128 DLL
36129 library
36130 when‐
36131 ever
36132 the
36133 SharedLi‐
36134 brary()
36135 builder
36136 is
36137 passed
36138 a
36139 key‐
36140 word
36141 argu‐
36142 ment
36143 of
36144 reg‐
36145 is‐
36146 ter=1.
36147
36148
36149 REGSVR‐
36150 COM
36151 The
36152 com‐
36153 mand
36154 line
36155 used
36156 on
36157 Win‐
36158 dows
36159 sys‐
36160 tems
36161 to
36162 reg‐
36163 is‐
36164 ter
36165 a
36166 newly-
36167 built
36168 DLL
36169 library
36170 when‐
36171 ever
36172 the
36173 SharedLi‐
36174 brary()
36175 builder
36176 is
36177 passed
36178 a
36179 key‐
36180 word
36181 argu‐
36182 ment
36183 of
36184 reg‐
36185 is‐
36186 ter=1.
36187
36188
36189 REGSVR‐
36190 COM‐
36191 STR
36192 The
36193 string
36194 dis‐
36195 played
36196 when
36197 reg‐
36198 is‐
36199 ter‐
36200 ing
36201 a
36202 newly-
36203 built
36204 DLL
36205 file.
36206 If
36207 this
36208 is
36209 not
36210 set,
36211 then
36212 $REGSVR‐
36213 COM
36214 (the
36215 com‐
36216 mand
36217 line)
36218 is
36219 dis‐
36220 played.
36221
36222
36223 REGSVR‐
36224 FLAGS
36225 Flags
36226 passed
36227 to
36228 the
36229 DLL
36230 reg‐
36231 is‐
36232 tra‐
36233 tion
36234 pro‐
36235 gram
36236 on
36237 Win‐
36238 dows
36239 sys‐
36240 tems
36241 when
36242 a
36243 newly-
36244 built
36245 DLL
36246 library
36247 is
36248 reg‐
36249 is‐
36250 tered.
36251 By
36252 default,
36253 this
36254 includes
36255 the
36256 /s
36257 that
36258 pre‐
36259 vents
36260 dia‐
36261 log
36262 boxes
36263 from
36264 pop‐
36265 ping
36266 up
36267 and
36268 requir‐
36269 ing
36270 user
36271 atten‐
36272 tion.
36273
36274
36275 RMIC The
36276 Java
36277 RMI
36278 stub
36279 com‐
36280 piler.
36281
36282
36283 RMIC‐
36284 COM The
36285 com‐
36286 mand
36287 line
36288 used
36289 to
36290 com‐
36291 pile
36292 stub
36293 and
36294 skele‐
36295 ton
36296 class
36297 files
36298 from
36299 Java
36300 classes
36301 that
36302 con‐
36303 tain
36304 RMI
36305 imple‐
36306 men‐
36307 ta‐
36308 tions.
36309 Any
36310 options
36311 spec‐
36312 i‐
36313 fied
36314 in
36315 the
36316 $RMICFLAGS
36317 con‐
36318 struc‐
36319 tion
36320 vari‐
36321 able
36322 are
36323 included
36324 on
36325 this
36326 com‐
36327 mand
36328 line.
36329
36330
36331 RMIC‐
36332 COM‐
36333 STR The
36334 string
36335 dis‐
36336 played
36337 when
36338 com‐
36339 pil‐
36340 ing
36341 stub
36342 and
36343 skele‐
36344 ton
36345 class
36346 files
36347 from
36348 Java
36349 classes
36350 that
36351 con‐
36352 tain
36353 RMI
36354 imple‐
36355 men‐
36356 ta‐
36357 tions.
36358 If
36359 this
36360 is
36361 not
36362 set,
36363 then
36364 $RMIC‐
36365 COM
36366 (the
36367 com‐
36368 mand
36369 line)
36370 is
36371 dis‐
36372 played.
36373
36374 env = Environment(RMICCOMSTR = "Generating stub/skeleton class files $TARGETS from $SOURCES")
36375
36376
36377 RMICFLAGS
36378 Gen‐
36379 eral
36380 options
36381 passed
36382 to
36383 the
36384 Java
36385 RMI
36386 stub
36387 com‐
36388 piler.
36389
36390
36391 _RPATH An
36392 auto‐
36393 mat‐
36394 i‐
36395 cally-
36396 gen‐
36397 er‐
36398 ated
36399 con‐
36400 struc‐
36401 tion
36402 vari‐
36403 able
36404 con‐
36405 tain‐
36406 ing
36407 the
36408 rpath
36409 flags
36410 to
36411 be
36412 used
36413 when
36414 link‐
36415 ing
36416 a
36417 pro‐
36418 gram
36419 with
36420 shared
36421 libraries.
36422 The
36423 value
36424 of
36425 $_RPATH
36426 is
36427 cre‐
36428 ated
36429 by
36430 append‐
36431 ing
36432 $RPATH‐
36433 PRE‐
36434 FIX
36435 and
36436 $RPATH‐
36437 SUF‐
36438 FIX
36439 to
36440 the
36441 begin‐
36442 ning
36443 and
36444 end
36445 of
36446 each
36447 direc‐
36448 tory
36449 in
36450 $RPATH.
36451
36452
36453 RPATH A
36454 list
36455 of
36456 paths
36457 to
36458 search
36459 for
36460 shared
36461 libraries
36462 when
36463 run‐
36464 ning
36465 pro‐
36466 grams.
36467 Cur‐
36468 rently
36469 only
36470 used
36471 in
36472 the
36473 GNU
36474 (gnulink),
36475 IRIX
36476 (sgilink)
36477 and
36478 Sun
36479 (sun‐
36480 link)
36481 link‐
36482 ers.
36483 Ignored
36484 on
36485 plat‐
36486 forms
36487 and
36488 toolchains
36489 that
36490 don't
36491 sup‐
36492 port
36493 it.
36494 Note
36495 that
36496 the
36497 paths
36498 added
36499 to
36500 RPATH
36501 are
36502 not
36503 trans‐
36504 formed
36505 by
36506 scons
36507 in
36508 any
36509 way:
36510 if
36511 you
36512 want
36513 an
36514 abso‐
36515 lute
36516 path,
36517 you
36518 must
36519 make
36520 it
36521 abso‐
36522 lute
36523 your‐
36524 self.
36525
36526
36527 RPATH‐
36528 PRE‐
36529 FIX The
36530 pre‐
36531 fix
36532 used
36533 to
36534 spec‐
36535 ify
36536 a
36537 direc‐
36538 tory
36539 to
36540 be
36541 searched
36542 for
36543 shared
36544 libraries
36545 when
36546 run‐
36547 ning
36548 pro‐
36549 grams.
36550 This
36551 will
36552 be
36553 appended
36554 to
36555 the
36556 begin‐
36557 ning
36558 of
36559 each
36560 direc‐
36561 tory
36562 in
36563 the
36564 $RPATH
36565 con‐
36566 struc‐
36567 tion
36568 vari‐
36569 able
36570 when
36571 the
36572 $_RPATH
36573 vari‐
36574 able
36575 is
36576 auto‐
36577 mat‐
36578 i‐
36579 cally
36580 gen‐
36581 er‐
36582 ated.
36583
36584
36585 RPATH‐
36586 SUF‐
36587 FIX The
36588 suf‐
36589 fix
36590 used
36591 to
36592 spec‐
36593 ify
36594 a
36595 direc‐
36596 tory
36597 to
36598 be
36599 searched
36600 for
36601 shared
36602 libraries
36603 when
36604 run‐
36605 ning
36606 pro‐
36607 grams.
36608 This
36609 will
36610 be
36611 appended
36612 to
36613 the
36614 end
36615 of
36616 each
36617 direc‐
36618 tory
36619 in
36620 the
36621 $RPATH
36622 con‐
36623 struc‐
36624 tion
36625 vari‐
36626 able
36627 when
36628 the
36629 $_RPATH
36630 vari‐
36631 able
36632 is
36633 auto‐
36634 mat‐
36635 i‐
36636 cally
36637 gen‐
36638 er‐
36639 ated.
36640
36641
36642 RPC‐
36643 GEN The
36644 RPC
36645 pro‐
36646 to‐
36647 col
36648 com‐
36649 piler.
36650
36651
36652 RPC‐
36653 GEN‐
36654 CLIENT‐
36655 FLAGS
36656 Options
36657 passed
36658 to
36659 the
36660 RPC
36661 pro‐
36662 to‐
36663 col
36664 com‐
36665 piler
36666 when
36667 gen‐
36668 er‐
36669 at‐
36670 ing
36671 client
36672 side
36673 stubs.
36674 These
36675 are
36676 in
36677 addi‐
36678 tion
36679 to
36680 any
36681 flags
36682 spec‐
36683 i‐
36684 fied
36685 in
36686 the
36687 $RPC‐
36688 GEN‐
36689 FLAGS
36690 con‐
36691 struc‐
36692 tion
36693 vari‐
36694 able.
36695
36696
36697 RPC‐
36698 GEN‐
36699 FLAGS Gen‐
36700 eral
36701 options
36702 passed
36703 to
36704 the
36705 RPC
36706 pro‐
36707 to‐
36708 col
36709 com‐
36710 piler.
36711
36712
36713 RPC‐
36714 GEN‐
36715 HEAD‐
36716 ER‐
36717 FLAGS Options
36718 passed
36719 to
36720 the
36721 RPC
36722 pro‐
36723 to‐
36724 col
36725 com‐
36726 piler
36727 when
36728 gen‐
36729 er‐
36730 at‐
36731 ing
36732 a
36733 header
36734 file.
36735 These
36736 are
36737 in
36738 addi‐
36739 tion
36740 to
36741 any
36742 flags
36743 spec‐
36744 i‐
36745 fied
36746 in
36747 the
36748 $RPC‐
36749 GEN‐
36750 FLAGS
36751 con‐
36752 struc‐
36753 tion
36754 vari‐
36755 able.
36756
36757
36758 RPC‐
36759 GENSER‐
36760 VICE‐
36761 FLAGS
36762 Options
36763 passed
36764 to
36765 the
36766 RPC
36767 pro‐
36768 to‐
36769 col
36770 com‐
36771 piler
36772 when
36773 gen‐
36774 er‐
36775 at‐
36776 ing
36777 server
36778 side
36779 stubs.
36780 These
36781 are
36782 in
36783 addi‐
36784 tion
36785 to
36786 any
36787 flags
36788 spec‐
36789 i‐
36790 fied
36791 in
36792 the
36793 $RPC‐
36794 GEN‐
36795 FLAGS
36796 con‐
36797 struc‐
36798 tion
36799 vari‐
36800 able.
36801
36802
36803 RPC‐
36804 GENX‐
36805 DR‐
36806 FLAGS Options
36807 passed
36808 to
36809 the
36810 RPC
36811 pro‐
36812 to‐
36813 col
36814 com‐
36815 piler
36816 when
36817 gen‐
36818 er‐
36819 at‐
36820 ing
36821 XDR
36822 rou‐
36823 tines.
36824 These
36825 are
36826 in
36827 addi‐
36828 tion
36829 to
36830 any
36831 flags
36832 spec‐
36833 i‐
36834 fied
36835 in
36836 the
36837 $RPC‐
36838 GEN‐
36839 FLAGS
36840 con‐
36841 struc‐
36842 tion
36843 vari‐
36844 able.
36845
36846
36847 SCAN‐
36848 NERS A
36849 list
36850 of
36851 the
36852 avail‐
36853 able
36854 implicit
36855 depen‐
36856 dency
36857 scan‐
36858 ners.
36859 New
36860 file
36861 scan‐
36862 ners
36863 may
36864 be
36865 added
36866 by
36867 append‐
36868 ing
36869 to
36870 this
36871 list,
36872 although
36873 the
36874 more
36875 flex‐
36876 i‐
36877 ble
36878 approach
36879 is
36880 to
36881 as‐
36882 so‐
36883 ciate
36884 scan‐
36885 ners
36886 with
36887 a
36888 spe‐
36889 cific
36890 Builder.
36891 See
36892 the
36893 sec‐
36894 tions
36895 "Builder
36896 Objects"
36897 and
36898 "Scan‐
36899 ner
36900 Objects,"
36901 below,
36902 for
36903 more
36904 infor‐
36905 ma‐
36906 tion.
36907
36908
36909 SCCS The
36910 SCCS
36911 exe‐
36912 cutable.
36913
36914
36915 SCC‐
36916 SCOM The
36917 com‐
36918 mand
36919 line
36920 used
36921 to
36922 fetch
36923 source
36924 files
36925 from
36926 SCCS.
36927
36928
36929 SCC‐
36930 SCOM‐
36931 STR The
36932 string
36933 dis‐
36934 played
36935 when
36936 fetch‐
36937 ing
36938 a
36939 source
36940 file
36941 from
36942 a
36943 CVS
36944 repos‐
36945 i‐
36946 tory.
36947 If
36948 this
36949 is
36950 not
36951 set,
36952 then
36953 $SCC‐
36954 SCOM
36955 (the
36956 com‐
36957 mand
36958 line)
36959 is
36960 dis‐
36961 played.
36962
36963
36964 SCCS‐
36965 FLAGS Gen‐
36966 eral
36967 options
36968 that
36969 are
36970 passed
36971 to
36972 SCCS.
36973
36974
36975 SCC‐
36976 S‐
36977 GET‐
36978 FLAGS Options
36979 that
36980 are
36981 passed
36982 specif‐
36983 i‐
36984 cally
36985 to
36986 the
36987 SCCS
36988 "get"
36989 sub‐
36990 com‐
36991 mand.
36992 This
36993 can
36994 be
36995 set,
36996 for
36997 exam‐
36998 ple,
36999 to
37000 -e
37001 to
37002 check
37003 out
37004 editable
37005 files
37006 from
37007 SCCS.
37008
37009
37010 SCONS_HOME
37011 The
37012 (optional)
37013 path
37014 to
37015 the
37016 SCons
37017 library
37018 direc‐
37019 tory,
37020 ini‐
37021 tial‐
37022 ized
37023 from
37024 the
37025 exter‐
37026 nal
37027 envi‐
37028 ron‐
37029 ment.
37030 If
37031 set,
37032 this
37033 is
37034 used
37035 to
37036 con‐
37037 struct
37038 a
37039 shorter
37040 and
37041 more
37042 effi‐
37043 cient
37044 search
37045 path
37046 in
37047 the
37048 $MSVSS‐
37049 CONS
37050 com‐
37051 mand
37052 line
37053 exe‐
37054 cuted
37055 from
37056 Mi‐
37057 cro‐
37058 soft
37059 Vis‐
37060 ual
37061 Stu‐
37062 dio
37063 project
37064 files.
37065
37066
37067 SHCC The
37068 C
37069 com‐
37070 piler
37071 used
37072 for
37073 gen‐
37074 er‐
37075 at‐
37076 ing
37077 shared-
37078 library
37079 objects.
37080
37081
37082 SHC‐
37083 C‐
37084 COM The
37085 com‐
37086 mand
37087 line
37088 used
37089 to
37090 com‐
37091 pile
37092 a
37093 C
37094 source
37095 file
37096 to
37097 a
37098 shared-
37099 library
37100 object
37101 file.
37102 Any
37103 options
37104 spec‐
37105 i‐
37106 fied
37107 in
37108 the
37109 $SHCFLAGS,
37110 $SHC‐
37111 CFLAGS
37112 and
37113 $CPPFLAGS
37114 con‐
37115 struc‐
37116 tion
37117 vari‐
37118 ables
37119 are
37120 included
37121 on
37122 this
37123 com‐
37124 mand
37125 line.
37126
37127
37128 SHC‐
37129 C‐
37130 COM‐
37131 STR The
37132 string
37133 dis‐
37134 played
37135 when
37136 a
37137 C
37138 source
37139 file
37140 is
37141 com‐
37142 piled
37143 to
37144 a
37145 shared
37146 object
37147 file.
37148 If
37149 this
37150 is
37151 not
37152 set,
37153 then
37154 $SHC‐
37155 C‐
37156 COM
37157 (the
37158 com‐
37159 mand
37160 line)
37161 is
37162 dis‐
37163 played.
37164
37165 env = Environment(SHCCCOMSTR = "Compiling shared object $TARGET")
37166
37167
37168 SHC‐
37169 CFLAGS Options
37170 that
37171 are
37172 passed
37173 to
37174 the
37175 C
37176 and
37177 C++
37178 com‐
37179 pil‐
37180 ers
37181 to
37182 gen‐
37183 er‐
37184 ate
37185 shared-
37186 library
37187 objects.
37188
37189
37190 SHCFLAGS
37191 Options
37192 that
37193 are
37194 passed
37195 to
37196 the
37197 C
37198 com‐
37199 piler
37200 (only;
37201 not
37202 C++)
37203 to
37204 gen‐
37205 er‐
37206 ate
37207 shared-
37208 library
37209 objects.
37210
37211
37212 SHCXX The
37213 C++
37214 com‐
37215 piler
37216 used
37217 for
37218 gen‐
37219 er‐
37220 at‐
37221 ing
37222 shared-
37223 library
37224 objects.
37225
37226
37227 SHCXXCOM
37228 The
37229 com‐
37230 mand
37231 line
37232 used
37233 to
37234 com‐
37235 pile
37236 a
37237 C++
37238 source
37239 file
37240 to
37241 a
37242 shared-
37243 library
37244 object
37245 file.
37246 Any
37247 options
37248 spec‐
37249 i‐
37250 fied
37251 in
37252 the
37253 $SHCXXFLAGS
37254 and
37255 $CPPFLAGS
37256 con‐
37257 struc‐
37258 tion
37259 vari‐
37260 ables
37261 are
37262 included
37263 on
37264 this
37265 com‐
37266 mand
37267 line.
37268
37269
37270 SHCXXCOM‐
37271 STR
37272 The
37273 string
37274 dis‐
37275 played
37276 when
37277 a
37278 C++
37279 source
37280 file
37281 is
37282 com‐
37283 piled
37284 to
37285 a
37286 shared
37287 object
37288 file.
37289 If
37290 this
37291 is
37292 not
37293 set,
37294 then
37295 $SHCXXCOM
37296 (the
37297 com‐
37298 mand
37299 line)
37300 is
37301 dis‐
37302 played.
37303
37304 env = Environment(SHCXXCOMSTR = "Compiling shared object $TARGET")
37305
37306
37307 SHCXXFLAGS
37308 Options
37309 that
37310 are
37311 passed
37312 to
37313 the
37314 C++
37315 com‐
37316 piler
37317 to
37318 gen‐
37319 er‐
37320 ate
37321 shared-
37322 library
37323 objects.
37324
37325
37326 SHELL A
37327 string
37328 nam‐
37329 ing
37330 the
37331 shell
37332 pro‐
37333 gram
37334 that
37335 will
37336 be
37337 passed
37338 to
37339 the
37340 $SPAWN
37341 func‐
37342 tion.
37343 See
37344 the
37345 $SPAWN
37346 con‐
37347 struc‐
37348 tion
37349 vari‐
37350 able
37351 for
37352 more
37353 infor‐
37354 ma‐
37355 tion.
37356
37357
37358 SHF77 The
37359 For‐
37360 tran
37361 77
37362 com‐
37363 piler
37364 used
37365 for
37366 gen‐
37367 er‐
37368 at‐
37369 ing
37370 shared-
37371 library
37372 objects.
37373 You
37374 should
37375 nor‐
37376 mally
37377 set
37378 the
37379 $SHFOR‐
37380 TRAN
37381 vari‐
37382 able,
37383 which
37384 spec‐
37385 i‐
37386 fies
37387 the
37388 default
37389 For‐
37390 tran
37391 com‐
37392 piler
37393 for
37394 all
37395 For‐
37396 tran
37397 ver‐
37398 sions.
37399 You
37400 only
37401 need
37402 to
37403 set
37404 $SHF77
37405 if
37406 you
37407 need
37408 to
37409 use
37410 a
37411 spe‐
37412 cific
37413 com‐
37414 piler
37415 or
37416 com‐
37417 piler
37418 ver‐
37419 sion
37420 for
37421 For‐
37422 tran
37423 77
37424 files.
37425
37426
37427 SHF77COM
37428 The
37429 com‐
37430 mand
37431 line
37432 used
37433 to
37434 com‐
37435 pile
37436 a
37437 For‐
37438 tran
37439 77
37440 source
37441 file
37442 to
37443 a
37444 shared-
37445 library
37446 object
37447 file.
37448 You
37449 only
37450 need
37451 to
37452 set
37453 $SHF77COM
37454 if
37455 you
37456 need
37457 to
37458 use
37459 a
37460 spe‐
37461 cific
37462 com‐
37463 mand
37464 line
37465 for
37466 For‐
37467 tran
37468 77
37469 files.
37470 You
37471 should
37472 nor‐
37473 mally
37474 set
37475 the
37476 $SHFOR‐
37477 TRAN‐
37478 COM
37479 vari‐
37480 able,
37481 which
37482 spec‐
37483 i‐
37484 fies
37485 the
37486 default
37487 com‐
37488 mand
37489 line
37490 for
37491 all
37492 For‐
37493 tran
37494 ver‐
37495 sions.
37496
37497
37498 SHF77COM‐
37499 STR
37500 The
37501 string
37502 dis‐
37503 played
37504 when
37505 a
37506 For‐
37507 tran
37508 77
37509 source
37510 file
37511 is
37512 com‐
37513 piled
37514 to
37515 a
37516 shared-
37517 library
37518 object
37519 file.
37520 If
37521 this
37522 is
37523 not
37524 set,
37525 then
37526 $SHF77COM
37527 or
37528 $SHFOR‐
37529 TRAN‐
37530 COM
37531 (the
37532 com‐
37533 mand
37534 line)
37535 is
37536 dis‐
37537 played.
37538
37539
37540 SHF77FLAGS
37541 Options
37542 that
37543 are
37544 passed
37545 to
37546 the
37547 For‐
37548 tran
37549 77
37550 com‐
37551 piler
37552 to
37553 gen‐
37554 er‐
37555 ated
37556 shared-
37557 library
37558 objects.
37559 You
37560 only
37561 need
37562 to
37563 set
37564 $SHF77FLAGS
37565 if
37566 you
37567 need
37568 to
37569 define
37570 spe‐
37571 cific
37572 user
37573 options
37574 for
37575 For‐
37576 tran
37577 77
37578 files.
37579 You
37580 should
37581 nor‐
37582 mally
37583 set
37584 the
37585 $SHFOR‐
37586 TRAN‐
37587 FLAGS
37588 vari‐
37589 able,
37590 which
37591 spec‐
37592 i‐
37593 fies
37594 the
37595 user-
37596 spec‐
37597 i‐
37598 fied
37599 options
37600 passed
37601 to
37602 the
37603 default
37604 For‐
37605 tran
37606 com‐
37607 piler
37608 for
37609 all
37610 For‐
37611 tran
37612 ver‐
37613 sions.
37614
37615
37616 SHF77PPCOM
37617 The
37618 com‐
37619 mand
37620 line
37621 used
37622 to
37623 com‐
37624 pile
37625 a
37626 For‐
37627 tran
37628 77
37629 source
37630 file
37631 to
37632 a
37633 shared-
37634 library
37635 object
37636 file
37637 after
37638 first
37639 run‐
37640 ning
37641 the
37642 file
37643 through
37644 the
37645 C
37646 pre‐
37647 proces‐
37648 sor.
37649 Any
37650 options
37651 spec‐
37652 i‐
37653 fied
37654 in
37655 the
37656 $SHF77FLAGS
37657 and
37658 $CPPFLAGS
37659 con‐
37660 struc‐
37661 tion
37662 vari‐
37663 ables
37664 are
37665 included
37666 on
37667 this
37668 com‐
37669 mand
37670 line.
37671 You
37672 only
37673 need
37674 to
37675 set
37676 $SHF77PPCOM
37677 if
37678 you
37679 need
37680 to
37681 use
37682 a
37683 spe‐
37684 cific
37685 C-
37686 pre‐
37687 proces‐
37688 sor
37689 com‐
37690 mand
37691 line
37692 for
37693 For‐
37694 tran
37695 77
37696 files.
37697 You
37698 should
37699 nor‐
37700 mally
37701 set
37702 the
37703 $SHFOR‐
37704 TRANPP‐
37705 COM
37706 vari‐
37707 able,
37708 which
37709 spec‐
37710 i‐
37711 fies
37712 the
37713 default
37714 C-
37715 pre‐
37716 proces‐
37717 sor
37718 com‐
37719 mand
37720 line
37721 for
37722 all
37723 For‐
37724 tran
37725 ver‐
37726 sions.
37727
37728
37729 SHF77PPCOM‐
37730 STR
37731 The
37732 string
37733 dis‐
37734 played
37735 when
37736 a
37737 For‐
37738 tran
37739 77
37740 source
37741 file
37742 is
37743 com‐
37744 piled
37745 to
37746 a
37747 shared-
37748 library
37749 object
37750 file
37751 after
37752 first
37753 run‐
37754 ning
37755 the
37756 file
37757 through
37758 the
37759 C
37760 pre‐
37761 proces‐
37762 sor.
37763 If
37764 this
37765 is
37766 not
37767 set,
37768 then
37769 $SHF77PPCOM
37770 or
37771 $SHFOR‐
37772 TRANPP‐
37773 COM
37774 (the
37775 com‐
37776 mand
37777 line)
37778 is
37779 dis‐
37780 played.
37781
37782
37783 SHF90 The
37784 For‐
37785 tran
37786 90
37787 com‐
37788 piler
37789 used
37790 for
37791 gen‐
37792 er‐
37793 at‐
37794 ing
37795 shared-
37796 library
37797 objects.
37798 You
37799 should
37800 nor‐
37801 mally
37802 set
37803 the
37804 $SHFOR‐
37805 TRAN
37806 vari‐
37807 able,
37808 which
37809 spec‐
37810 i‐
37811 fies
37812 the
37813 default
37814 For‐
37815 tran
37816 com‐
37817 piler
37818 for
37819 all
37820 For‐
37821 tran
37822 ver‐
37823 sions.
37824 You
37825 only
37826 need
37827 to
37828 set
37829 $SHF90
37830 if
37831 you
37832 need
37833 to
37834 use
37835 a
37836 spe‐
37837 cific
37838 com‐
37839 piler
37840 or
37841 com‐
37842 piler
37843 ver‐
37844 sion
37845 for
37846 For‐
37847 tran
37848 90
37849 files.
37850
37851
37852 SHF90COM
37853 The
37854 com‐
37855 mand
37856 line
37857 used
37858 to
37859 com‐
37860 pile
37861 a
37862 For‐
37863 tran
37864 90
37865 source
37866 file
37867 to
37868 a
37869 shared-
37870 library
37871 object
37872 file.
37873 You
37874 only
37875 need
37876 to
37877 set
37878 $SHF90COM
37879 if
37880 you
37881 need
37882 to
37883 use
37884 a
37885 spe‐
37886 cific
37887 com‐
37888 mand
37889 line
37890 for
37891 For‐
37892 tran
37893 90
37894 files.
37895 You
37896 should
37897 nor‐
37898 mally
37899 set
37900 the
37901 $SHFOR‐
37902 TRAN‐
37903 COM
37904 vari‐
37905 able,
37906 which
37907 spec‐
37908 i‐
37909 fies
37910 the
37911 default
37912 com‐
37913 mand
37914 line
37915 for
37916 all
37917 For‐
37918 tran
37919 ver‐
37920 sions.
37921
37922
37923 SHF90COM‐
37924 STR
37925 The
37926 string
37927 dis‐
37928 played
37929 when
37930 a
37931 For‐
37932 tran
37933 90
37934 source
37935 file
37936 is
37937 com‐
37938 piled
37939 to
37940 a
37941 shared-
37942 library
37943 object
37944 file.
37945 If
37946 this
37947 is
37948 not
37949 set,
37950 then
37951 $SHF90COM
37952 or
37953 $SHFOR‐
37954 TRAN‐
37955 COM
37956 (the
37957 com‐
37958 mand
37959 line)
37960 is
37961 dis‐
37962 played.
37963
37964
37965 SHF90FLAGS
37966 Options
37967 that
37968 are
37969 passed
37970 to
37971 the
37972 For‐
37973 tran
37974 90
37975 com‐
37976 piler
37977 to
37978 gen‐
37979 er‐
37980 ated
37981 shared-
37982 library
37983 objects.
37984 You
37985 only
37986 need
37987 to
37988 set
37989 $SHF90FLAGS
37990 if
37991 you
37992 need
37993 to
37994 define
37995 spe‐
37996 cific
37997 user
37998 options
37999 for
38000 For‐
38001 tran
38002 90
38003 files.
38004 You
38005 should
38006 nor‐
38007 mally
38008 set
38009 the
38010 $SHFOR‐
38011 TRAN‐
38012 FLAGS
38013 vari‐
38014 able,
38015 which
38016 spec‐
38017 i‐
38018 fies
38019 the
38020 user-
38021 spec‐
38022 i‐
38023 fied
38024 options
38025 passed
38026 to
38027 the
38028 default
38029 For‐
38030 tran
38031 com‐
38032 piler
38033 for
38034 all
38035 For‐
38036 tran
38037 ver‐
38038 sions.
38039
38040
38041 SHF90PPCOM
38042 The
38043 com‐
38044 mand
38045 line
38046 used
38047 to
38048 com‐
38049 pile
38050 a
38051 For‐
38052 tran
38053 90
38054 source
38055 file
38056 to
38057 a
38058 shared-
38059 library
38060 object
38061 file
38062 after
38063 first
38064 run‐
38065 ning
38066 the
38067 file
38068 through
38069 the
38070 C
38071 pre‐
38072 proces‐
38073 sor.
38074 Any
38075 options
38076 spec‐
38077 i‐
38078 fied
38079 in
38080 the
38081 $SHF90FLAGS
38082 and
38083 $CPPFLAGS
38084 con‐
38085 struc‐
38086 tion
38087 vari‐
38088 ables
38089 are
38090 included
38091 on
38092 this
38093 com‐
38094 mand
38095 line.
38096 You
38097 only
38098 need
38099 to
38100 set
38101 $SHF90PPCOM
38102 if
38103 you
38104 need
38105 to
38106 use
38107 a
38108 spe‐
38109 cific
38110 C-
38111 pre‐
38112 proces‐
38113 sor
38114 com‐
38115 mand
38116 line
38117 for
38118 For‐
38119 tran
38120 90
38121 files.
38122 You
38123 should
38124 nor‐
38125 mally
38126 set
38127 the
38128 $SHFOR‐
38129 TRANPP‐
38130 COM
38131 vari‐
38132 able,
38133 which
38134 spec‐
38135 i‐
38136 fies
38137 the
38138 default
38139 C-
38140 pre‐
38141 proces‐
38142 sor
38143 com‐
38144 mand
38145 line
38146 for
38147 all
38148 For‐
38149 tran
38150 ver‐
38151 sions.
38152
38153
38154 SHF90PPCOM‐
38155 STR
38156 The
38157 string
38158 dis‐
38159 played
38160 when
38161 a
38162 For‐
38163 tran
38164 90
38165 source
38166 file
38167 is
38168 com‐
38169 piled
38170 to
38171 a
38172 shared-
38173 library
38174 object
38175 file
38176 after
38177 first
38178 run‐
38179 ning
38180 the
38181 file
38182 through
38183 the
38184 C
38185 pre‐
38186 proces‐
38187 sor.
38188 If
38189 this
38190 is
38191 not
38192 set,
38193 then
38194 $SHF90PPCOM
38195 or
38196 $SHFOR‐
38197 TRANPP‐
38198 COM
38199 (the
38200 com‐
38201 mand
38202 line)
38203 is
38204 dis‐
38205 played.
38206
38207
38208 SHF95 The
38209 For‐
38210 tran
38211 95
38212 com‐
38213 piler
38214 used
38215 for
38216 gen‐
38217 er‐
38218 at‐
38219 ing
38220 shared-
38221 library
38222 objects.
38223 You
38224 should
38225 nor‐
38226 mally
38227 set
38228 the
38229 $SHFOR‐
38230 TRAN
38231 vari‐
38232 able,
38233 which
38234 spec‐
38235 i‐
38236 fies
38237 the
38238 default
38239 For‐
38240 tran
38241 com‐
38242 piler
38243 for
38244 all
38245 For‐
38246 tran
38247 ver‐
38248 sions.
38249 You
38250 only
38251 need
38252 to
38253 set
38254 $SHF95
38255 if
38256 you
38257 need
38258 to
38259 use
38260 a
38261 spe‐
38262 cific
38263 com‐
38264 piler
38265 or
38266 com‐
38267 piler
38268 ver‐
38269 sion
38270 for
38271 For‐
38272 tran
38273 95
38274 files.
38275
38276
38277 SHF95COM
38278 The
38279 com‐
38280 mand
38281 line
38282 used
38283 to
38284 com‐
38285 pile
38286 a
38287 For‐
38288 tran
38289 95
38290 source
38291 file
38292 to
38293 a
38294 shared-
38295 library
38296 object
38297 file.
38298 You
38299 only
38300 need
38301 to
38302 set
38303 $SHF95COM
38304 if
38305 you
38306 need
38307 to
38308 use
38309 a
38310 spe‐
38311 cific
38312 com‐
38313 mand
38314 line
38315 for
38316 For‐
38317 tran
38318 95
38319 files.
38320 You
38321 should
38322 nor‐
38323 mally
38324 set
38325 the
38326 $SHFOR‐
38327 TRAN‐
38328 COM
38329 vari‐
38330 able,
38331 which
38332 spec‐
38333 i‐
38334 fies
38335 the
38336 default
38337 com‐
38338 mand
38339 line
38340 for
38341 all
38342 For‐
38343 tran
38344 ver‐
38345 sions.
38346
38347
38348 SHF95COM‐
38349 STR
38350 The
38351 string
38352 dis‐
38353 played
38354 when
38355 a
38356 For‐
38357 tran
38358 95
38359 source
38360 file
38361 is
38362 com‐
38363 piled
38364 to
38365 a
38366 shared-
38367 library
38368 object
38369 file.
38370 If
38371 this
38372 is
38373 not
38374 set,
38375 then
38376 $SHF95COM
38377 or
38378 $SHFOR‐
38379 TRAN‐
38380 COM
38381 (the
38382 com‐
38383 mand
38384 line)
38385 is
38386 dis‐
38387 played.
38388
38389
38390 SHF95FLAGS
38391 Options
38392 that
38393 are
38394 passed
38395 to
38396 the
38397 For‐
38398 tran
38399 95
38400 com‐
38401 piler
38402 to
38403 gen‐
38404 er‐
38405 ated
38406 shared-
38407 library
38408 objects.
38409 You
38410 only
38411 need
38412 to
38413 set
38414 $SHF95FLAGS
38415 if
38416 you
38417 need
38418 to
38419 define
38420 spe‐
38421 cific
38422 user
38423 options
38424 for
38425 For‐
38426 tran
38427 95
38428 files.
38429 You
38430 should
38431 nor‐
38432 mally
38433 set
38434 the
38435 $SHFOR‐
38436 TRAN‐
38437 FLAGS
38438 vari‐
38439 able,
38440 which
38441 spec‐
38442 i‐
38443 fies
38444 the
38445 user-
38446 spec‐
38447 i‐
38448 fied
38449 options
38450 passed
38451 to
38452 the
38453 default
38454 For‐
38455 tran
38456 com‐
38457 piler
38458 for
38459 all
38460 For‐
38461 tran
38462 ver‐
38463 sions.
38464
38465
38466 SHF95PPCOM
38467 The
38468 com‐
38469 mand
38470 line
38471 used
38472 to
38473 com‐
38474 pile
38475 a
38476 For‐
38477 tran
38478 95
38479 source
38480 file
38481 to
38482 a
38483 shared-
38484 library
38485 object
38486 file
38487 after
38488 first
38489 run‐
38490 ning
38491 the
38492 file
38493 through
38494 the
38495 C
38496 pre‐
38497 proces‐
38498 sor.
38499 Any
38500 options
38501 spec‐
38502 i‐
38503 fied
38504 in
38505 the
38506 $SHF95FLAGS
38507 and
38508 $CPPFLAGS
38509 con‐
38510 struc‐
38511 tion
38512 vari‐
38513 ables
38514 are
38515 included
38516 on
38517 this
38518 com‐
38519 mand
38520 line.
38521 You
38522 only
38523 need
38524 to
38525 set
38526 $SHF95PPCOM
38527 if
38528 you
38529 need
38530 to
38531 use
38532 a
38533 spe‐
38534 cific
38535 C-
38536 pre‐
38537 proces‐
38538 sor
38539 com‐
38540 mand
38541 line
38542 for
38543 For‐
38544 tran
38545 95
38546 files.
38547 You
38548 should
38549 nor‐
38550 mally
38551 set
38552 the
38553 $SHFOR‐
38554 TRANPP‐
38555 COM
38556 vari‐
38557 able,
38558 which
38559 spec‐
38560 i‐
38561 fies
38562 the
38563 default
38564 C-
38565 pre‐
38566 proces‐
38567 sor
38568 com‐
38569 mand
38570 line
38571 for
38572 all
38573 For‐
38574 tran
38575 ver‐
38576 sions.
38577
38578
38579 SHF95PPCOM‐
38580 STR
38581 The
38582 string
38583 dis‐
38584 played
38585 when
38586 a
38587 For‐
38588 tran
38589 95
38590 source
38591 file
38592 is
38593 com‐
38594 piled
38595 to
38596 a
38597 shared-
38598 library
38599 object
38600 file
38601 after
38602 first
38603 run‐
38604 ning
38605 the
38606 file
38607 through
38608 the
38609 C
38610 pre‐
38611 proces‐
38612 sor.
38613 If
38614 this
38615 is
38616 not
38617 set,
38618 then
38619 $SHF95PPCOM
38620 or
38621 $SHFOR‐
38622 TRANPP‐
38623 COM
38624 (the
38625 com‐
38626 mand
38627 line)
38628 is
38629 dis‐
38630 played.
38631
38632
38633 SHFOR‐
38634 TRAN The
38635 default
38636 For‐
38637 tran
38638 com‐
38639 piler
38640 used
38641 for
38642 gen‐
38643 er‐
38644 at‐
38645 ing
38646 shared-
38647 library
38648 objects.
38649
38650
38651 SHFOR‐
38652 TRAN‐
38653 COM The
38654 com‐
38655 mand
38656 line
38657 used
38658 to
38659 com‐
38660 pile
38661 a
38662 For‐
38663 tran
38664 source
38665 file
38666 to
38667 a
38668 shared-
38669 library
38670 object
38671 file.
38672
38673
38674 SHFOR‐
38675 TRAN‐
38676 COM‐
38677 STR The
38678 string
38679 dis‐
38680 played
38681 when
38682 a
38683 For‐
38684 tran
38685 source
38686 file
38687 is
38688 com‐
38689 piled
38690 to
38691 a
38692 shared-
38693 library
38694 object
38695 file.
38696 If
38697 this
38698 is
38699 not
38700 set,
38701 then
38702 $SHFOR‐
38703 TRAN‐
38704 COM
38705 (the
38706 com‐
38707 mand
38708 line)
38709 is
38710 dis‐
38711 played.
38712
38713
38714 SHFOR‐
38715 TRAN‐
38716 FLAGS Options
38717 that
38718 are
38719 passed
38720 to
38721 the
38722 For‐
38723 tran
38724 com‐
38725 piler
38726 to
38727 gen‐
38728 er‐
38729 ate
38730 shared-
38731 library
38732 objects.
38733
38734
38735 SHFOR‐
38736 TRANPP‐
38737 COM
38738 The
38739 com‐
38740 mand
38741 line
38742 used
38743 to
38744 com‐
38745 pile
38746 a
38747 For‐
38748 tran
38749 source
38750 file
38751 to
38752 a
38753 shared-
38754 library
38755 object
38756 file
38757 after
38758 first
38759 run‐
38760 ning
38761 the
38762 file
38763 through
38764 the
38765 C
38766 pre‐
38767 proces‐
38768 sor.
38769 Any
38770 options
38771 spec‐
38772 i‐
38773 fied
38774 in
38775 the
38776 $SHFOR‐
38777 TRAN‐
38778 FLAGS
38779 and
38780 $CPPFLAGS
38781 con‐
38782 struc‐
38783 tion
38784 vari‐
38785 ables
38786 are
38787 included
38788 on
38789 this
38790 com‐
38791 mand
38792 line.
38793
38794
38795 SHFOR‐
38796 TRANPP‐
38797 COM‐
38798 STR
38799 The
38800 string
38801 dis‐
38802 played
38803 when
38804 a
38805 For‐
38806 tran
38807 source
38808 file
38809 is
38810 com‐
38811 piled
38812 to
38813 a
38814 shared-
38815 library
38816 object
38817 file
38818 after
38819 first
38820 run‐
38821 ning
38822 the
38823 file
38824 throught
38825 the
38826 C
38827 pre‐
38828 proces‐
38829 sor.
38830 If
38831 this
38832 is
38833 not
38834 set,
38835 then
38836 $SHFOR‐
38837 TRANPP‐
38838 COM
38839 (the
38840 com‐
38841 mand
38842 line)
38843 is
38844 dis‐
38845 played.
38846
38847
38848 SHLIBPRE‐
38849 FIX
38850 The
38851 pre‐
38852 fix
38853 used
38854 for
38855 shared
38856 library
38857 file
38858 names.
38859
38860
38861 SHLIB‐
38862 SUF‐
38863 FIX The
38864 suf‐
38865 fix
38866 used
38867 for
38868 shared
38869 library
38870 file
38871 names.
38872
38873
38874 SHLINK The
38875 linker
38876 for
38877 pro‐
38878 grams
38879 that
38880 use
38881 shared
38882 libraries.
38883
38884
38885 SHLINKCOM
38886 The
38887 com‐
38888 mand
38889 line
38890 used
38891 to
38892 link
38893 pro‐
38894 grams
38895 using
38896 shared
38897 libaries.
38898
38899
38900 SHLINKCOM‐
38901 STR
38902 The
38903 string
38904 dis‐
38905 played
38906 when
38907 pro‐
38908 grams
38909 using
38910 shared
38911 libraries
38912 are
38913 linked.
38914 If
38915 this
38916 is
38917 not
38918 set,
38919 then
38920 $SHLINKCOM
38921 (the
38922 com‐
38923 mand
38924 line)
38925 is
38926 dis‐
38927 played.
38928
38929 env = Environment(SHLINKCOMSTR = "Linking shared $TARGET")
38930
38931
38932 SHLINK‐
38933 FLAGS
38934 Gen‐
38935 eral
38936 user
38937 options
38938 passed
38939 to
38940 the
38941 linker
38942 for
38943 pro‐
38944 grams
38945 using
38946 shared
38947 libraries.
38948 Note
38949 that
38950 this
38951 vari‐
38952 able
38953 should
38954 not
38955 con‐
38956 tain
38957 -l
38958 (or
38959 sim‐
38960 i‐
38961 lar)
38962 options
38963 for
38964 link‐
38965 ing
38966 with
38967 the
38968 libraries
38969 listed
38970 in
38971 $LIBS,
38972 nor
38973 -L
38974 (or
38975 sim‐
38976 i‐
38977 lar)
38978 include
38979 search
38980 path
38981 options
38982 that
38983 scons
38984 gen‐
38985 er‐
38986 ates
38987 auto‐
38988 mat‐
38989 i‐
38990 cally
38991 from
38992 $LIB‐
38993 PATH.
38994 See
38995 $_LIBFLAGS
38996 above,
38997 for
38998 the
38999 vari‐
39000 able
39001 that
39002 expands
39003 to
39004 library-
39005 link
39006 options,
39007 and
39008 $_LIB‐
39009 DIRFLAGS
39010 above,
39011 for
39012 the
39013 vari‐
39014 able
39015 that
39016 expands
39017 to
39018 library
39019 search
39020 path
39021 options.
39022
39023
39024 SHOB‐
39025 JPRE‐
39026 FIX The
39027 pre‐
39028 fix
39029 used
39030 for
39031 shared
39032 object
39033 file
39034 names.
39035
39036
39037 SHOB‐
39038 J‐
39039 SUF‐
39040 FIX The
39041 suf‐
39042 fix
39043 used
39044 for
39045 shared
39046 object
39047 file
39048 names.
39049
39050
39051 SOURCE A
39052 reserved
39053 vari‐
39054 able
39055 name
39056 that
39057 may
39058 not
39059 be
39060 set
39061 or
39062 used
39063 in
39064 a
39065 con‐
39066 struc‐
39067 tion
39068 envi‐
39069 ron‐
39070 ment.
39071 (See
39072 "Vari‐
39073 able
39074 Sub‐
39075 sti‐
39076 tu‐
39077 tion,"
39078 below.)
39079
39080
39081 SOURCE_URL
39082 The
39083 URL
39084 (web
39085 address)
39086 of
39087 the
39088 loca‐
39089 tion
39090 from
39091 which
39092 the
39093 project
39094 was
39095 retrieved.
39096 This
39097 is
39098 used
39099 to
39100 fill
39101 in
39102 the
39103 Source:
39104 field
39105 in
39106 the
39107 con‐
39108 trol‐
39109 ling
39110 infor‐
39111 ma‐
39112 tion
39113 for
39114 Ipkg
39115 and
39116 RPM
39117 pack‐
39118 ages.
39119
39120
39121 SOURCES
39122 A
39123 reserved
39124 vari‐
39125 able
39126 name
39127 that
39128 may
39129 not
39130 be
39131 set
39132 or
39133 used
39134 in
39135 a
39136 con‐
39137 struc‐
39138 tion
39139 envi‐
39140 ron‐
39141 ment.
39142 (See
39143 "Vari‐
39144 able
39145 Sub‐
39146 sti‐
39147 tu‐
39148 tion,"
39149 below.)
39150
39151
39152 SPAWN A
39153 com‐
39154 mand
39155 inter‐
39156 preter
39157 func‐
39158 tion
39159 that
39160 will
39161 be
39162 called
39163 to
39164 exe‐
39165 cute
39166 com‐
39167 mand
39168 line
39169 strings.
39170 The
39171 func‐
39172 tion
39173 must
39174 expect
39175 the
39176 fol‐
39177 low‐
39178 ing
39179 argu‐
39180 ments:
39181
39182 def spawn(shell, escape, cmd, args, env):
39183
39184 sh
39185 is
39186 a
39187 string
39188 nam‐
39189 ing
39190 the
39191 shell
39192 pro‐
39193 gram
39194 to
39195 use.
39196 escape
39197 is
39198 a
39199 func‐
39200 tion
39201 that
39202 can
39203 be
39204 called
39205 to
39206 escape
39207 shell
39208 spe‐
39209 cial
39210 char‐
39211 ac‐
39212 ters
39213 in
39214 the
39215 com‐
39216 mand
39217 line.
39218 cmd
39219 is
39220 the
39221 path
39222 to
39223 the
39224 com‐
39225 mand
39226 to
39227 be
39228 exe‐
39229 cuted.
39230 args
39231 is
39232 the
39233 argu‐
39234 ments
39235 to
39236 the
39237 com‐
39238 mand.
39239 env
39240 is
39241 a
39242 dic‐
39243 tio‐
39244 nary
39245 of
39246 the
39247 envi‐
39248 ron‐
39249 ment
39250 vari‐
39251 ables
39252 in
39253 which
39254 the
39255 com‐
39256 mand
39257 should
39258 be
39259 exe‐
39260 cuted.
39261
39262
39263 SUM‐
39264 MARY A
39265 short
39266 sum‐
39267 mary
39268 of
39269 what
39270 the
39271 project
39272 is
39273 about.
39274 This
39275 is
39276 used
39277 to
39278 fill
39279 in
39280 the
39281 Sum‐
39282 mary:
39283 field
39284 in
39285 the
39286 con‐
39287 trol‐
39288 ling
39289 infor‐
39290 ma‐
39291 tion
39292 for
39293 Ipkg
39294 and
39295 RPM
39296 pack‐
39297 ages,
39298 and
39299 as
39300 the
39301 Descrip‐
39302 tion:
39303 field
39304 in
39305 MSI
39306 pack‐
39307 ages.
39308
39309
39310 SWIG The
39311 script‐
39312 ing
39313 lan‐
39314 guage
39315 wrap‐
39316 per
39317 and
39318 inter‐
39319 face
39320 gen‐
39321 er‐
39322 a‐
39323 tor.
39324
39325
39326 SWIGC‐
39327 FILE‐
39328 SUF‐
39329 FIX The
39330 suf‐
39331 fix
39332 that
39333 will
39334 be
39335 used
39336 for
39337 inter‐
39338 me‐
39339 di‐
39340 ate
39341 C
39342 source
39343 files
39344 gen‐
39345 er‐
39346 ated
39347 by
39348 the
39349 script‐
39350 ing
39351 lan‐
39352 guage
39353 wrap‐
39354 per
39355 and
39356 inter‐
39357 face
39358 gen‐
39359 er‐
39360 a‐
39361 tor.
39362 The
39363 default
39364 value
39365 is
39366 _wrap$CFILE‐
39367 SUF‐
39368 FIX.
39369 By
39370 default,
39371 this
39372 value
39373 is
39374 used
39375 when‐
39376 ever
39377 the
39378 -c++
39379 option
39380 is
39381 not
39382 spec‐
39383 i‐
39384 fied
39385 as
39386 part
39387 of
39388 the
39389 $SWIGFLAGS
39390 con‐
39391 struc‐
39392 tion
39393 vari‐
39394 able.
39395
39396
39397 SWIG‐
39398 COM The
39399 com‐
39400 mand
39401 line
39402 used
39403 to
39404 call
39405 the
39406 script‐
39407 ing
39408 lan‐
39409 guage
39410 wrap‐
39411 per
39412 and
39413 inter‐
39414 face
39415 gen‐
39416 er‐
39417 a‐
39418 tor.
39419
39420
39421 SWIG‐
39422 COM‐
39423 STR The
39424 string
39425 dis‐
39426 played
39427 when
39428 call‐
39429 ing
39430 the
39431 script‐
39432 ing
39433 lan‐
39434 guage
39435 wrap‐
39436 per
39437 and
39438 inter‐
39439 face
39440 gen‐
39441 er‐
39442 a‐
39443 tor.
39444 If
39445 this
39446 is
39447 not
39448 set,
39449 then
39450 $SWIG‐
39451 COM
39452 (the
39453 com‐
39454 mand
39455 line)
39456 is
39457 dis‐
39458 played.
39459
39460
39461 SWIGCXXFILE‐
39462 SUF‐
39463 FIX
39464 The
39465 suf‐
39466 fix
39467 that
39468 will
39469 be
39470 used
39471 for
39472 inter‐
39473 me‐
39474 di‐
39475 ate
39476 C++
39477 source
39478 files
39479 gen‐
39480 er‐
39481 ated
39482 by
39483 the
39484 script‐
39485 ing
39486 lan‐
39487 guage
39488 wrap‐
39489 per
39490 and
39491 inter‐
39492 face
39493 gen‐
39494 er‐
39495 a‐
39496 tor.
39497 The
39498 default
39499 value
39500 is
39501 _wrap$CFILE‐
39502 SUF‐
39503 FIX.
39504 By
39505 default,
39506 this
39507 value
39508 is
39509 used
39510 when‐
39511 ever
39512 the
39513 -c++
39514 option
39515 is
39516 spec‐
39517 i‐
39518 fied
39519 as
39520 part
39521 of
39522 the
39523 $SWIGFLAGS
39524 con‐
39525 struc‐
39526 tion
39527 vari‐
39528 able.
39529
39530
39531 SWIGFLAGS
39532 Gen‐
39533 eral
39534 options
39535 passed
39536 to
39537 the
39538 script‐
39539 ing
39540 lan‐
39541 guage
39542 wrap‐
39543 per
39544 and
39545 inter‐
39546 face
39547 gen‐
39548 er‐
39549 a‐
39550 tor.
39551 This
39552 is
39553 where
39554 you
39555 should
39556 set
39557 -python,
39558 -perl5,
39559 -tcl,
39560 or
39561 what‐
39562 ever
39563 other
39564 options
39565 you
39566 want
39567 to
39568 spec‐
39569 ify
39570 to
39571 SWIG.
39572 If
39573 you
39574 set
39575 the
39576 -c++
39577 option
39578 in
39579 this
39580 vari‐
39581 able,
39582 scons
39583 will,
39584 by
39585 default,
39586 gen‐
39587 er‐
39588 ate
39589 a
39590 C++
39591 inter‐
39592 me‐
39593 di‐
39594 ate
39595 source
39596 file
39597 with
39598 the
39599 exten‐
39600 sion
39601 that
39602 is
39603 spec‐
39604 i‐
39605 fied
39606 as
39607 the
39608 $CXXFILE‐
39609 SUF‐
39610 FIX
39611 vari‐
39612 able.
39613
39614
39615 _SWIG‐
39616 INCFLAGS
39617 An
39618 auto‐
39619 mat‐
39620 i‐
39621 cally-
39622 gen‐
39623 er‐
39624 ated
39625 con‐
39626 struc‐
39627 tion
39628 vari‐
39629 able
39630 con‐
39631 tain‐
39632 ing
39633 the
39634 SWIG
39635 com‐
39636 mand-
39637 line
39638 options
39639 for
39640 spec‐
39641 i‐
39642 fy‐
39643 ing
39644 direc‐
39645 to‐
39646 ries
39647 to
39648 be
39649 searched
39650 for
39651 included
39652 files.
39653 The
39654 value
39655 of
39656 $_SWIG‐
39657 INCFLAGS
39658 is
39659 cre‐
39660 ated
39661 by
39662 append‐
39663 ing
39664 $SWIG‐
39665 INCPRE‐
39666 FIX
39667 and
39668 $SWIG‐
39669 INC‐
39670 SUF‐
39671 FIX
39672 to
39673 the
39674 begin‐
39675 ning
39676 and
39677 end
39678 of
39679 each
39680 direc‐
39681 tory
39682 in
39683 $SWIG‐
39684 PATH.
39685
39686
39687 SWIG‐
39688 INCPRE‐
39689 FIX
39690 The
39691 pre‐
39692 fix
39693 used
39694 to
39695 spec‐
39696 ify
39697 an
39698 include
39699 direc‐
39700 tory
39701 on
39702 the
39703 SWIG
39704 com‐
39705 mand
39706 line.
39707 This
39708 will
39709 be
39710 appended
39711 to
39712 the
39713 begin‐
39714 ning
39715 of
39716 each
39717 direc‐
39718 tory
39719 in
39720 the
39721 $SWIG‐
39722 PATH
39723 con‐
39724 struc‐
39725 tion
39726 vari‐
39727 able
39728 when
39729 the
39730 $_SWIG‐
39731 INCFLAGS
39732 vari‐
39733 able
39734 is
39735 auto‐
39736 mat‐
39737 i‐
39738 cally
39739 gen‐
39740 er‐
39741 ated.
39742
39743
39744 SWIG‐
39745 INC‐
39746 SUF‐
39747 FIX The
39748 suf‐
39749 fix
39750 used
39751 to
39752 spec‐
39753 ify
39754 an
39755 include
39756 direc‐
39757 tory
39758 on
39759 the
39760 SWIG
39761 com‐
39762 mand
39763 line.
39764 This
39765 will
39766 be
39767 appended
39768 to
39769 the
39770 end
39771 of
39772 each
39773 direc‐
39774 tory
39775 in
39776 the
39777 $SWIG‐
39778 PATH
39779 con‐
39780 struc‐
39781 tion
39782 vari‐
39783 able
39784 when
39785 the
39786 $_SWIG‐
39787 INCFLAGS
39788 vari‐
39789 able
39790 is
39791 auto‐
39792 mat‐
39793 i‐
39794 cally
39795 gen‐
39796 er‐
39797 ated.
39798
39799
39800 SWIGOUT‐
39801 DIR
39802 Spec‐
39803 i‐
39804 fies
39805 the
39806 out‐
39807 put
39808 direc‐
39809 tory
39810 in
39811 which
39812 the
39813 script‐
39814 ing
39815 lan‐
39816 guage
39817 wrap‐
39818 per
39819 and
39820 inter‐
39821 face
39822 gen‐
39823 er‐
39824 a‐
39825 tor
39826 should
39827 place
39828 gen‐
39829 er‐
39830 ated
39831 lan‐
39832 guage-
39833 spe‐
39834 cific
39835 files.
39836 This
39837 will
39838 be
39839 used
39840 by
39841 SCons
39842 to
39843 iden‐
39844 tify
39845 the
39846 files
39847 that
39848 will
39849 be
39850 gen‐
39851 er‐
39852 ated
39853 by
39854 the
39855 &swig;
39856 call,
39857 and
39858 trans‐
39859 lated
39860 into
39861 the
39862 swig
39863 -out‐
39864 dir
39865 option
39866 on
39867 the
39868 com‐
39869 mand
39870 line.
39871
39872
39873 SWIG‐
39874 PATH The
39875 list
39876 of
39877 direc‐
39878 to‐
39879 ries
39880 that
39881 the
39882 script‐
39883 ing
39884 lan‐
39885 guage
39886 wrap‐
39887 per
39888 and
39889 inter‐
39890 face
39891 gen‐
39892 er‐
39893 ate
39894 will
39895 search
39896 for
39897 included
39898 files.
39899 The
39900 SWIG
39901 implicit
39902 depen‐
39903 dency
39904 scan‐
39905 ner
39906 will
39907 search
39908 these
39909 direc‐
39910 to‐
39911 ries
39912 for
39913 include
39914 files.
39915 The
39916 default
39917 is
39918 to
39919 use
39920 the
39921 same
39922 path
39923 spec‐
39924 i‐
39925 fied
39926 as
39927 $CPP‐
39928 PATH.
39929
39930 Don't
39931 explic‐
39932 itly
39933 put
39934 include
39935 direc‐
39936 tory
39937 argu‐
39938 ments
39939 in
39940 SWIGFLAGS;
39941 the
39942 result
39943 will
39944 be
39945 non-
39946 por‐
39947 ta‐
39948 ble
39949 and
39950 the
39951 direc‐
39952 to‐
39953 ries
39954 will
39955 not
39956 be
39957 searched
39958 by
39959 the
39960 depen‐
39961 dency
39962 scan‐
39963 ner.
39964 Note:
39965 direc‐
39966 tory
39967 names
39968 in
39969 SWIG‐
39970 PATH
39971 will
39972 be
39973 looked-
39974 up
39975 rel‐
39976 a‐
39977 tive
39978 to
39979 the
39980 SCon‐
39981 script
39982 direc‐
39983 tory
39984 when
39985 they
39986 are
39987 used
39988 in
39989 a
39990 com‐
39991 mand.
39992 To
39993 force
39994 scons
39995 to
39996 look-
39997 up
39998 a
39999 direc‐
40000 tory
40001 rel‐
40002 a‐
40003 tive
40004 to
40005 the
40006 root
40007 of
40008 the
40009 source
40010 tree
40011 use
40012 #:
40013
40014 env = Environment(SWIGPATH='#/include')
40015
40016 The
40017 direc‐
40018 tory
40019 look-
40020 up
40021 can
40022 also
40023 be
40024 forced
40025 using
40026 the
40027 Dir()
40028 func‐
40029 tion:
40030
40031 include = Dir('include')
40032 env = Environment(SWIGPATH=include)
40033
40034 The
40035 direc‐
40036 tory
40037 list
40038 will
40039 be
40040 added
40041 to
40042 com‐
40043 mand
40044 lines
40045 through
40046 the
40047 auto‐
40048 mat‐
40049 i‐
40050 cally-
40051 gen‐
40052 er‐
40053 ated
40054 $_SWIG‐
40055 INCFLAGS
40056 con‐
40057 struc‐
40058 tion
40059 vari‐
40060 able,
40061 which
40062 is
40063 con‐
40064 structed
40065 by
40066 append‐
40067 ing
40068 the
40069 val‐
40070 ues
40071 of
40072 the
40073 $SWIG‐
40074 INCPRE‐
40075 FIX
40076 and
40077 $SWIG‐
40078 INC‐
40079 SUF‐
40080 FIX
40081 con‐
40082 struc‐
40083 tion
40084 vari‐
40085 ables
40086 to
40087 the
40088 begin‐
40089 ning
40090 and
40091 end
40092 of
40093 each
40094 direc‐
40095 tory
40096 in
40097 $SWIG‐
40098 PATH.
40099 Any
40100 com‐
40101 mand
40102 lines
40103 you
40104 define
40105 that
40106 need
40107 the
40108 SWIG‐
40109 PATH
40110 direc‐
40111 tory
40112 list
40113 should
40114 include
40115 $_SWIG‐
40116 INCFLAGS:
40117
40118 env = Environment(SWIGCOM="my_swig -o $TARGET $_SWIGINCFLAGS $SORUCES")
40119
40120
40121 TAR The
40122 tar
40123 archiver.
40124
40125
40126 TAR‐
40127 COM The
40128 com‐
40129 mand
40130 line
40131 used
40132 to
40133 call
40134 the
40135 tar
40136 archiver.
40137
40138
40139 TAR‐
40140 COM‐
40141 STR The
40142 string
40143 dis‐
40144 played
40145 when
40146 ar‐
40147 chiv‐
40148 ing
40149 files
40150 using
40151 the
40152 tar
40153 archiver.
40154 If
40155 this
40156 is
40157 not
40158 set,
40159 then
40160 $TAR‐
40161 COM
40162 (the
40163 com‐
40164 mand
40165 line)
40166 is
40167 dis‐
40168 played.
40169
40170 env = Environment(TARCOMSTR = "Archiving $TARGET")
40171
40172
40173 TARFLAGS
40174 Gen‐
40175 eral
40176 options
40177 passed
40178 to
40179 the
40180 tar
40181 archiver.
40182
40183
40184 TAR‐
40185 GET A
40186 reserved
40187 vari‐
40188 able
40189 name
40190 that
40191 may
40192 not
40193 be
40194 set
40195 or
40196 used
40197 in
40198 a
40199 con‐
40200 struc‐
40201 tion
40202 envi‐
40203 ron‐
40204 ment.
40205 (See
40206 "Vari‐
40207 able
40208 Sub‐
40209 sti‐
40210 tu‐
40211 tion,"
40212 below.)
40213
40214
40215 TAR‐
40216 GETS A
40217 reserved
40218 vari‐
40219 able
40220 name
40221 that
40222 may
40223 not
40224 be
40225 set
40226 or
40227 used
40228 in
40229 a
40230 con‐
40231 struc‐
40232 tion
40233 envi‐
40234 ron‐
40235 ment.
40236 (See
40237 "Vari‐
40238 able
40239 Sub‐
40240 sti‐
40241 tu‐
40242 tion,"
40243 below.)
40244
40245
40246 TAR‐
40247 SUF‐
40248 FIX The
40249 suf‐
40250 fix
40251 used
40252 for
40253 tar
40254 file
40255 names.
40256
40257
40258 TEMP‐
40259 FILEPRE‐
40260 FIX
40261 The
40262 pre‐
40263 fix
40264 for
40265 a
40266 tem‐
40267 po‐
40268 rary
40269 file
40270 used
40271 to
40272 exe‐
40273 cute
40274 lines
40275 longer
40276 than
40277 $MAX‐
40278 LINE‐
40279 LENGTH.
40280 The
40281 default
40282 is
40283 '@'.
40284 This
40285 may
40286 be
40287 set
40288 for
40289 toolchains
40290 that
40291 use
40292 other
40293 val‐
40294 ues,
40295 such
40296 as
40297 '-@'
40298 for
40299 the
40300 diab
40301 com‐
40302 piler
40303 or
40304 '-via'
40305 for
40306 ARM
40307 toolchain.
40308
40309
40310 TEX The
40311 TeX
40312 for‐
40313 mat‐
40314 ter
40315 and
40316 type‐
40317 set‐
40318 ter.
40319
40320
40321 TEX‐
40322 COM The
40323 com‐
40324 mand
40325 line
40326 used
40327 to
40328 call
40329 the
40330 TeX
40331 for‐
40332 mat‐
40333 ter
40334 and
40335 type‐
40336 set‐
40337 ter.
40338
40339
40340 TEX‐
40341 COM‐
40342 STR The
40343 string
40344 dis‐
40345 played
40346 when
40347 call‐
40348 ing
40349 the
40350 TeX
40351 for‐
40352 mat‐
40353 ter
40354 and
40355 type‐
40356 set‐
40357 ter.
40358 If
40359 this
40360 is
40361 not
40362 set,
40363 then
40364 $TEX‐
40365 COM
40366 (the
40367 com‐
40368 mand
40369 line)
40370 is
40371 dis‐
40372 played.
40373
40374 env = Environment(TEXCOMSTR = "Building $TARGET from TeX input $SOURCES")
40375
40376
40377 TEXFLAGS
40378 Gen‐
40379 eral
40380 options
40381 passed
40382 to
40383 the
40384 TeX
40385 for‐
40386 mat‐
40387 ter
40388 and
40389 type‐
40390 set‐
40391 ter.
40392
40393
40394 TEX‐
40395 IN‐
40396 PUTS List
40397 of
40398 direc‐
40399 to‐
40400 ries
40401 that
40402 the
40403 LaTeX
40404 pro‐
40405 gramm
40406 will
40407 search
40408 for
40409 include
40410 direc‐
40411 to‐
40412 ries.
40413 The
40414 LaTeX
40415 implicit
40416 depen‐
40417 dency
40418 scan‐
40419 ner
40420 will
40421 search
40422 these
40423 direc‐
40424 to‐
40425 ries
40426 for
40427 \include
40428 and
40429 \import
40430 files.
40431
40432
40433 TOOLS A
40434 list
40435 of
40436 the
40437 names
40438 of
40439 the
40440 Tool
40441 spec‐
40442 i‐
40443 fi‐
40444 ca‐
40445 tions
40446 that
40447 are
40448 part
40449 of
40450 this
40451 con‐
40452 struc‐
40453 tion
40454 envi‐
40455 ron‐
40456 ment.
40457
40458
40459 VEN‐
40460 DOR The
40461 per‐
40462 son
40463 or
40464 orga‐
40465 ni‐
40466 za‐
40467 tion
40468 who
40469 sup‐
40470 ply
40471 the
40472 pack‐
40473 aged
40474 soft‐
40475 ware.
40476 This
40477 is
40478 used
40479 to
40480 fill
40481 in
40482 the
40483 Ven‐
40484 dor:
40485 field
40486 in
40487 the
40488 con‐
40489 trol‐
40490 ling
40491 infor‐
40492 ma‐
40493 tion
40494 for
40495 RPM
40496 pack‐
40497 ages,
40498 and
40499 the
40500 Man‐
40501 u‐
40502 fac‐
40503 turer:
40504 field
40505 in
40506 the
40507 con‐
40508 trol‐
40509 ling
40510 infor‐
40511 ma‐
40512 tion
40513 for
40514 MSI
40515 pack‐
40516 ages.
40517
40518
40519 VER‐
40520 SION The
40521 ver‐
40522 sion
40523 of
40524 the
40525 project,
40526 spec‐
40527 i‐
40528 fied
40529 as
40530 a
40531 string.
40532
40533
40534 WIN32_INSERT_DEF
40535 A
40536 dep‐
40537 re‐
40538 cated
40539 syn‐
40540 onym
40541 for
40542 $WIN‐
40543 DOWS_INSERT_DEF.
40544
40545
40546 WIN32DEF‐
40547 PRE‐
40548 FIX
40549 A
40550 dep‐
40551 re‐
40552 cated
40553 syn‐
40554 onym
40555 for
40556 $WIN‐
40557 DOWS‐
40558 DEF‐
40559 PRE‐
40560 FIX.
40561
40562
40563 WIN32DEF‐
40564 SUF‐
40565 FIX
40566 A
40567 dep‐
40568 re‐
40569 cated
40570 syn‐
40571 onym
40572 for
40573 $WIN‐
40574 DOWS‐
40575 DEF‐
40576 SUF‐
40577 FIX.
40578
40579
40580 WIN32EXP‐
40581 PRE‐
40582 FIX
40583 A
40584 dep‐
40585 re‐
40586 cated
40587 syn‐
40588 onym
40589 for
40590 $WIN‐
40591 DOW‐
40592 S‐
40593 EX‐
40594 P‐
40595 SUF‐
40596 FIX.
40597
40598
40599 WIN32EXP‐
40600 SUF‐
40601 FIX
40602 A
40603 dep‐
40604 re‐
40605 cated
40606 syn‐
40607 onym
40608 for
40609 $WIN‐
40610 DOW‐
40611 S‐
40612 EX‐
40613 P‐
40614 SUF‐
40615 FIX.
40616
40617
40618 WIN‐
40619 DOWS_INSERT_DEF
40620 When
40621 this
40622 is
40623 set
40624 to
40625 true,
40626 a
40627 library
40628 build
40629 of
40630 a
40631 Win‐
40632 dows
40633 shared
40634 library
40635 (.dll‐
40636 file)
40637 will
40638 also
40639 build
40640 a
40641 cor‐
40642 re‐
40643 spond‐
40644 ing
40645 .def
40646 file
40647 at
40648 the
40649 same
40650 time,
40651 if
40652 a
40653 .def
40654 file
40655 is
40656 not
40657 already
40658 listed
40659 as
40660 a
40661 build
40662 tar‐
40663 get.
40664 The
40665 default
40666 is
40667 0
40668 (do
40669 not
40670 build
40671 a
40672 .def
40673 file).
40674
40675
40676 WIN‐
40677 DOWS_INSERT_MAN‐
40678 I‐
40679 FEST
40680 When
40681 this
40682 is
40683 set
40684 to
40685 true,
40686 scons
40687 will
40688 be
40689 aware
40690 of
40691 the
40692 .man‐
40693 i‐
40694 fest
40695 files
40696 gen‐
40697 er‐
40698 ated
40699 by
40700 Mi‐
40701 cro‐
40702 soft
40703 Visua
40704 C/C++
40705 8.
40706
40707
40708 WIN‐
40709 DOWS‐
40710 DEF‐
40711 PRE‐
40712 FIX The
40713 pre‐
40714 fix
40715 used
40716 for
40717 Win‐
40718 dows
40719 .def‐
40720 file
40721 names.
40722
40723
40724 WIN‐
40725 DOWS‐
40726 DEF‐
40727 SUF‐
40728 FIX The
40729 suf‐
40730 fix
40731 used
40732 for
40733 Win‐
40734 dows
40735 .def
40736 file
40737 names.
40738
40739
40740 WIN‐
40741 DOW‐
40742 S‐
40743 EXP‐
40744 PRE‐
40745 FIX The
40746 pre‐
40747 fix
40748 used
40749 for
40750 Win‐
40751 dows
40752 .exp
40753 file
40754 names.
40755
40756
40757 WIN‐
40758 DOW‐
40759 S‐
40760 EX‐
40761 P‐
40762 SUF‐
40763 FIX The
40764 suf‐
40765 fix
40766 used
40767 for
40768 Win‐
40769 dows
40770 .exp
40771 file
40772 names.
40773
40774
40775 WIN‐
40776 DOWSPROG‐
40777 MAN‐
40778 I‐
40779 FEST‐
40780 PRE‐
40781 FIX
40782 The
40783 pre‐
40784 fix
40785 used
40786 for
40787 exe‐
40788 cutable
40789 pro‐
40790 gram
40791 .man‐
40792 i‐
40793 fest
40794 files
40795 gen‐
40796 er‐
40797 ated
40798 by
40799 Mi‐
40800 cro‐
40801 soft
40802 Vis‐
40803 ual
40804 C/C++.
40805
40806
40807 WIN‐
40808 DOWSPROG‐
40809 MAN‐
40810 I‐
40811 FEST‐
40812 SUF‐
40813 FIX
40814 The
40815 suf‐
40816 fix
40817 used
40818 for
40819 exe‐
40820 cutable
40821 pro‐
40822 gram
40823 .man‐
40824 i‐
40825 fest
40826 files
40827 gen‐
40828 er‐
40829 ated
40830 by
40831 Mi‐
40832 cro‐
40833 soft
40834 Vis‐
40835 ual
40836 C/C++.
40837
40838
40839 WIN‐
40840 DOWSSH‐
40841 LIB‐
40842 MAN‐
40843 I‐
40844 FEST‐
40845 PRE‐
40846 FIX
40847 The
40848 pre‐
40849 fix
40850 used
40851 for
40852 shared
40853 library
40854 .man‐
40855 i‐
40856 fest
40857 files
40858 gen‐
40859 er‐
40860 ated
40861 by
40862 Mi‐
40863 cro‐
40864 soft
40865 Vis‐
40866 ual
40867 C/C++.
40868
40869
40870 WIN‐
40871 DOWSSH‐
40872 LIB‐
40873 MAN‐
40874 I‐
40875 FEST‐
40876 SUF‐
40877 FIX
40878 The
40879 suf‐
40880 fix
40881 used
40882 for
40883 shared
40884 library
40885 .man‐
40886 i‐
40887 fest
40888 files
40889 gen‐
40890 er‐
40891 ated
40892 by
40893 Mi‐
40894 cro‐
40895 soft
40896 Vis‐
40897 ual
40898 C/C++.
40899
40900
40901 X_IPK_DEPENDS
40902 This
40903 is
40904 used
40905 to
40906 fill
40907 in
40908 the
40909 Depends:
40910 field
40911 in
40912 the
40913 con‐
40914 trol‐
40915 ling
40916 infor‐
40917 ma‐
40918 tion
40919 for
40920 Ipkg
40921 pack‐
40922 ages.
40923
40924
40925 X_IPK_DESCRIP‐
40926 TION
40927 This
40928 is
40929 used
40930 to
40931 fill
40932 in
40933 the
40934 Descrip‐
40935 tion:
40936 field
40937 in
40938 the
40939 con‐
40940 trol‐
40941 ling
40942 infor‐
40943 ma‐
40944 tion
40945 for
40946 Ipkg
40947 pack‐
40948 ages.
40949 The
40950 default
40951 value
40952 is
40953 $SUM‐
40954 MARY\$SUM‐
40955 MARY
40956
40957 X_IPK_MAIN‐
40958 TAINER
40959 This
40960 is
40961 used
40962 to
40963 fill
40964 in
40965 the
40966 Main‐
40967 tainer:
40968 field
40969 in
40970 the
40971 con‐
40972 trol‐
40973 ling
40974 infor‐
40975 ma‐
40976 tion
40977 for
40978 Ipkg
40979 pack‐
40980 ages.
40981
40982
40983 X_IPK_PRI‐
40984 OR‐
40985 ITY
40986 This
40987 is
40988 used
40989 to
40990 fill
40991 in
40992 the
40993 Pri‐
40994 or‐
40995 ity:
40996 field
40997 in
40998 the
40999 con‐
41000 trol‐
41001 ling
41002 infor‐
41003 ma‐
41004 tion
41005 for
41006 Ipkg
41007 pack‐
41008 ages.
41009
41010
41011 X_IPK_SEC‐
41012 TION
41013 This
41014 is
41015 used
41016 to
41017 fill
41018 in
41019 the
41020 Sec‐
41021 tion:
41022 field
41023 in
41024 the
41025 con‐
41026 trol‐
41027 ling
41028 infor‐
41029 ma‐
41030 tion
41031 for
41032 Ipkg
41033 pack‐
41034 ages.
41035
41036
41037 X_MSI_LAN‐
41038 GUAGE
41039 This
41040 is
41041 used
41042 to
41043 fill
41044 in
41045 the
41046 Lan‐
41047 guage:
41048 attribute
41049 in
41050 the
41051 con‐
41052 trol‐
41053 ling
41054 infor‐
41055 ma‐
41056 tion
41057 for
41058 MSI
41059 pack‐
41060 ages.
41061
41062
41063 X_MSI_LICENSE_TEXT
41064 The
41065 text
41066 of
41067 the
41068 soft‐
41069 ware
41070 license
41071 in
41072 RTF
41073 for‐
41074 mat.
41075 Car‐
41076 riage
41077 return
41078 char‐
41079 ac‐
41080 ters
41081 will
41082 be
41083 replaced
41084 with
41085 the
41086 RTF
41087 equiv‐
41088 a‐
41089 lent
41090 \ar.
41091
41092
41093 X_MSI_UPGRADE_CODE
41094 TODO
41095
41096
41097 X_RPM_AUTORE‐
41098 QPROV
41099 This
41100 is
41101 used
41102 to
41103 fill
41104 in
41105 the
41106 AutoRe‐
41107 qProv:
41108 field
41109 in
41110 the
41111 RPM
41112 .spec
41113 file.
41114
41115
41116 X_RPM_BUILD
41117 inter‐
41118 nal,
41119 but
41120 over‐
41121 rid‐
41122 able
41123
41124
41125 X_RPM_BUIL‐
41126 DREQUIRES
41127 This
41128 is
41129 used
41130 to
41131 fill
41132 in
41133 the
41134 Buil‐
41135 dRequires:
41136 field
41137 in
41138 the
41139 RPM
41140 .spec
41141 file.
41142
41143
41144 X_RPM_BUIL‐
41145 D‐
41146 ROOT
41147 inter‐
41148 nal,
41149 but
41150 over‐
41151 rid‐
41152 able
41153
41154
41155 X_RPM_CLEAN
41156 inter‐
41157 nal,
41158 but
41159 over‐
41160 rid‐
41161 able
41162
41163
41164 X_RPM_CON‐
41165 FLICTS
41166 This
41167 is
41168 used
41169 to
41170 fill
41171 in
41172 the
41173 Con‐
41174 flicts:
41175 field
41176 in
41177 the
41178 RPM
41179 .spec
41180 file.
41181
41182
41183 X_RPM_DEFATTR
41184 This
41185 value
41186 is
41187 used
41188 as
41189 the
41190 default
41191 attributes
41192 for
41193 the
41194 files
41195 in
41196 the
41197 RPM
41198 pack‐
41199 age.
41200 The
41201 default
41202 value
41203 is
41204 (-,root,root).
41205
41206
41207 X_RPM_DIS‐
41208 TRI‐
41209 BU‐
41210 TION
41211 This
41212 is
41213 used
41214 to
41215 fill
41216 in
41217 the
41218 Dis‐
41219 tri‐
41220 bu‐
41221 tion:
41222 field
41223 in
41224 the
41225 RPM
41226 .spec
41227 file.
41228
41229
41230 X_RPM_EPOCH
41231 This
41232 is
41233 used
41234 to
41235 fill
41236 in
41237 the
41238 Epoch:
41239 field
41240 in
41241 the
41242 con‐
41243 trol‐
41244 ling
41245 infor‐
41246 ma‐
41247 tion
41248 for
41249 RPM
41250 pack‐
41251 ages.
41252
41253
41254 X_RPM_EXCLUDEARCH
41255 This
41256 is
41257 used
41258 to
41259 fill
41260 in
41261 the
41262 ExcludeArch:
41263 field
41264 in
41265 the
41266 RPM
41267 .spec
41268 file.
41269
41270
41271 X_RPM_EXLU‐
41272 SIVEARCH
41273 This
41274 is
41275 used
41276 to
41277 fill
41278 in
41279 the
41280 Exclu‐
41281 siveArch:
41282 field
41283 in
41284 the
41285 RPM
41286 .spec
41287 file.
41288
41289
41290 X_RPM_GROUP
41291 This
41292 is
41293 used
41294 to
41295 fill
41296 in
41297 the
41298 Group:
41299 field
41300 in
41301 the
41302 RPM
41303 .spec
41304 file.
41305
41306
41307 X_RPM_GROUP_lang
41308 This
41309 is
41310 used
41311 to
41312 fill
41313 in
41314 the
41315 Group(lang):
41316 field
41317 in
41318 the
41319 RPM
41320 .spec
41321 file.
41322 Note
41323 that
41324 lang
41325 is
41326 not
41327 lit‐
41328 eral
41329 and
41330 should
41331 be
41332 replaced
41333 by
41334 the
41335 appro‐
41336 pri‐
41337 ate
41338 lan‐
41339 guage
41340 code.
41341
41342
41343 X_RPM_ICON
41344 This
41345 is
41346 used
41347 to
41348 fill
41349 in
41350 the
41351 Icon:
41352 field
41353 in
41354 the
41355 RPM
41356 .spec
41357 file.
41358
41359
41360 X_RPM_INSTALL
41361 inter‐
41362 nal,
41363 but
41364 over‐
41365 rid‐
41366 able
41367
41368
41369 X_RPM_PACK‐
41370 AGER
41371 This
41372 is
41373 used
41374 to
41375 fill
41376 in
41377 the
41378 Pack‐
41379 ager:
41380 field
41381 in
41382 the
41383 RPM
41384 .spec
41385 file.
41386
41387
41388 X_RPM_POSTIN‐
41389 STALL
41390 This
41391 is
41392 used
41393 to
41394 fill
41395 in
41396 the
41397 %post:
41398 sec‐
41399 tion
41400 in
41401 the
41402 RPM
41403 .spec
41404 file.
41405
41406
41407 X_RPM_POS‐
41408 TUNIN‐
41409 STALL
41410 This
41411 is
41412 used
41413 to
41414 fill
41415 in
41416 the
41417 %pos‐
41418 tun:
41419 sec‐
41420 tion
41421 in
41422 the
41423 RPM
41424 .spec
41425 file.
41426
41427
41428 X_RPM_PRE‐
41429 FIX
41430 This
41431 is
41432 used
41433 to
41434 fill
41435 in
41436 the
41437 Pre‐
41438 fix:
41439 field
41440 in
41441 the
41442 RPM
41443 .spec
41444 file.
41445
41446
41447 X_RPM_PRE‐
41448 IN‐
41449 STALL
41450 This
41451 is
41452 used
41453 to
41454 fill
41455 in
41456 the
41457 %pre:
41458 sec‐
41459 tion
41460 in
41461 the
41462 RPM
41463 .spec
41464 file.
41465
41466
41467 X_RPM_PREP
41468 inter‐
41469 nal,
41470 but
41471 over‐
41472 rid‐
41473 able
41474
41475
41476 X_RPM_PRE‐
41477 UNIN‐
41478 STALL
41479 This
41480 is
41481 used
41482 to
41483 fill
41484 in
41485 the
41486 %preun:
41487 sec‐
41488 tion
41489 in
41490 the
41491 RPM
41492 .spec
41493 file.
41494
41495
41496 X_RPM_PRO‐
41497 VIDES
41498 This
41499 is
41500 used
41501 to
41502 fill
41503 in
41504 the
41505 Pro‐
41506 vides:
41507 field
41508 in
41509 the
41510 RPM
41511 .spec
41512 file.
41513
41514
41515 X_RPM_REQUIRES
41516 This
41517 is
41518 used
41519 to
41520 fill
41521 in
41522 the
41523 Requires:
41524 field
41525 in
41526 the
41527 RPM
41528 .spec
41529 file.
41530
41531
41532 X_RPM_SERIAL
41533 This
41534 is
41535 used
41536 to
41537 fill
41538 in
41539 the
41540 Serial:
41541 field
41542 in
41543 the
41544 RPM
41545 .spec
41546 file.
41547
41548
41549 X_RPM_URL
41550 This
41551 is
41552 used
41553 to
41554 fill
41555 in
41556 the
41557 Url:
41558 field
41559 in
41560 the
41561 RPM
41562 .spec
41563 file.
41564
41565
41566 YACC The
41567 parser
41568 gen‐
41569 er‐
41570 a‐
41571 tor.
41572
41573
41574 YAC‐
41575 C‐
41576 COM The
41577 com‐
41578 mand
41579 line
41580 used
41581 to
41582 call
41583 the
41584 parser
41585 gen‐
41586 er‐
41587 a‐
41588 tor
41589 to
41590 gen‐
41591 er‐
41592 ate
41593 a
41594 source
41595 file.
41596
41597
41598 YAC‐
41599 C‐
41600 COM‐
41601 STR The
41602 string
41603 dis‐
41604 played
41605 when
41606 gen‐
41607 er‐
41608 at‐
41609 ing
41610 a
41611 source
41612 file
41613 using
41614 the
41615 parser
41616 gen‐
41617 er‐
41618 a‐
41619 tor.
41620 If
41621 this
41622 is
41623 not
41624 set,
41625 then
41626 $YAC‐
41627 C‐
41628 COM
41629 (the
41630 com‐
41631 mand
41632 line)
41633 is
41634 dis‐
41635 played.
41636
41637 env = Environment(YACCCOMSTR = "Yacc'ing $TARGET from $SOURCES")
41638
41639
41640 YAC‐
41641 CFLAGS Gen‐
41642 eral
41643 options
41644 passed
41645 to
41646 the
41647 parser
41648 gen‐
41649 er‐
41650 a‐
41651 tor.
41652 If
41653 $YAC‐
41654 CFLAGS
41655 con‐
41656 tains
41657 a
41658 -d
41659 option,
41660 SCons
41661 assumes
41662 that
41663 the
41664 call
41665 will
41666 also
41667 cre‐
41668 ate
41669 a
41670 .h
41671 file
41672 (if
41673 the
41674 yacc
41675 source
41676 file
41677 ends
41678 in
41679 a
41680 .y
41681 suf‐
41682 fix)
41683 or
41684 a
41685 .hpp
41686 file
41687 (if
41688 the
41689 yacc
41690 source
41691 file
41692 ends
41693 in
41694 a
41695 .yy
41696 suf‐
41697 fix)
41698
41699
41700 YAC‐
41701 CH‐
41702 FILE‐
41703 SUF‐
41704 FIX The
41705 suf‐
41706 fix
41707 of
41708 the
41709 C
41710 header
41711 file
41712 gen‐
41713 er‐
41714 ated
41715 by
41716 the
41717 parser
41718 gen‐
41719 er‐
41720 a‐
41721 tor
41722 when
41723 the
41724 -d
41725 option
41726 is
41727 used.
41728 Note
41729 that
41730 set‐
41731 ting
41732 this
41733 vari‐
41734 able
41735 does
41736 not
41737 cause
41738 the
41739 parser
41740 gen‐
41741 er‐
41742 a‐
41743 tor
41744 to
41745 gen‐
41746 er‐
41747 ate
41748 a
41749 header
41750 file
41751 with
41752 the
41753 spec‐
41754 i‐
41755 fied
41756 suf‐
41757 fix,
41758 it
41759 exists
41760 to
41761 allow
41762 you
41763 to
41764 spec‐
41765 ify
41766 what
41767 suf‐
41768 fix
41769 the
41770 parser
41771 gen‐
41772 er‐
41773 a‐
41774 tor
41775 will
41776 use
41777 of
41778 its
41779 own
41780 accord.
41781 The
41782 default
41783 value
41784 is
41785 .h.
41786
41787
41788 YAC‐
41789 CHXXFILE‐
41790 SUF‐
41791 FIX
41792 The
41793 suf‐
41794 fix
41795 of
41796 the
41797 C++
41798 header
41799 file
41800 gen‐
41801 er‐
41802 ated
41803 by
41804 the
41805 parser
41806 gen‐
41807 er‐
41808 a‐
41809 tor
41810 when
41811 the
41812 -d
41813 option
41814 is
41815 used.
41816 Note
41817 that
41818 set‐
41819 ting
41820 this
41821 vari‐
41822 able
41823 does
41824 not
41825 cause
41826 the
41827 parser
41828 gen‐
41829 er‐
41830 a‐
41831 tor
41832 to
41833 gen‐
41834 er‐
41835 ate
41836 a
41837 header
41838 file
41839 with
41840 the
41841 spec‐
41842 i‐
41843 fied
41844 suf‐
41845 fix,
41846 it
41847 exists
41848 to
41849 allow
41850 you
41851 to
41852 spec‐
41853 ify
41854 what
41855 suf‐
41856 fix
41857 the
41858 parser
41859 gen‐
41860 er‐
41861 a‐
41862 tor
41863 will
41864 use
41865 of
41866 its
41867 own
41868 accord.
41869 The
41870 default
41871 value
41872 is
41873 .hpp,
41874 except
41875 on
41876 Mac
41877 OS
41878 X,
41879 where
41880 the
41881 default
41882 is
41883 ${TAR‐
41884 GET.suf‐
41885 fix}.h.
41886 because
41887 the
41888 default
41889 &bison;
41890 parser
41891 gen‐
41892 er‐
41893 a‐
41894 tor
41895 just
41896 appends
41897 .h
41898 to
41899 the
41900 name
41901 of
41902 the
41903 gen‐
41904 er‐
41905 ated
41906 C++
41907 file.
41908
41909
41910 YAC‐
41911 CVCG‐
41912 FILE‐
41913 SUF‐
41914 FIX The
41915 suf‐
41916 fix
41917 of
41918 the
41919 file
41920 con‐
41921 tain‐
41922 ing
41923 the
41924 VCG
41925 gram‐
41926 mar
41927 au‐
41928 tom‐
41929 a‐
41930 ton
41931 def‐
41932 i‐
41933 ni‐
41934 tion
41935 when
41936 the
41937 --graph=
41938 option
41939 is
41940 used.
41941 Note
41942 that
41943 set‐
41944 ting
41945 this
41946 vari‐
41947 able
41948 does
41949 not
41950 cause
41951 the
41952 parser
41953 gen‐
41954 er‐
41955 a‐
41956 tor
41957 to
41958 gen‐
41959 er‐
41960 ate
41961 a
41962 VCG
41963 file
41964 with
41965 the
41966 spec‐
41967 i‐
41968 fied
41969 suf‐
41970 fix,
41971 it
41972 exists
41973 to
41974 allow
41975 you
41976 to
41977 spec‐
41978 ify
41979 what
41980 suf‐
41981 fix
41982 the
41983 parser
41984 gen‐
41985 er‐
41986 a‐
41987 tor
41988 will
41989 use
41990 of
41991 its
41992 own
41993 accord.
41994 The
41995 default
41996 value
41997 is
41998 .vcg.
41999
42000
42001 ZIP The
42002 zip
42003 com‐
42004 pres‐
42005 sion
42006 and
42007 file
42008 pack‐
42009 ag‐
42010 ing
42011 util‐
42012 ity.
42013
42014
42015 ZIP‐
42016 COM The
42017 com‐
42018 mand
42019 line
42020 used
42021 to
42022 call
42023 the
42024 zip
42025 util‐
42026 ity,
42027 or
42028 the
42029 inter‐
42030 nal
42031 Python
42032 func‐
42033 tion
42034 used
42035 to
42036 cre‐
42037 ate
42038 a
42039 zip
42040 ar‐
42041 chive.
42042
42043
42044 ZIP‐
42045 COM‐
42046 PRES‐
42047 SION The
42048 com‐
42049 pres‐
42050 sion
42051 flag
42052 from
42053 the
42054 Python
42055 zip‐
42056 file
42057 mod‐
42058 ule
42059 used
42060 by
42061 the
42062 inter‐
42063 nal
42064 Python
42065 func‐
42066 tion
42067 to
42068 con‐
42069 trol
42070 whether
42071 the
42072 zip
42073 ar‐
42074 chive
42075 is
42076 com‐
42077 pressed
42078 or
42079 not.
42080 The
42081 default
42082 value
42083 is
42084 zip‐
42085 file.ZIP_DEFLATED,
42086 which
42087 cre‐
42088 ates
42089 a
42090 com‐
42091 pressed
42092 zip
42093 ar‐
42094 chive.
42095 This
42096 value
42097 has
42098 no
42099 effect
42100 when
42101 using
42102 Python
42103 1.5.2
42104 or
42105 if
42106 the
42107 zip‐
42108 file
42109 mod‐
42110 ule
42111 is
42112 oth‐
42113 er‐
42114 wise
42115 unavail‐
42116 able.
42117
42118
42119 ZIP‐
42120 COM‐
42121 STR The
42122 string
42123 dis‐
42124 played
42125 when
42126 ar‐
42127 chiv‐
42128 ing
42129 files
42130 using
42131 the
42132 zip
42133 util‐
42134 ity.
42135 If
42136 this
42137 is
42138 not
42139 set,
42140 then
42141 $ZIP‐
42142 COM
42143 (the
42144 com‐
42145 mand
42146 line
42147 or
42148 inter‐
42149 nal
42150 Python
42151 func‐
42152 tion)
42153 is
42154 dis‐
42155 played.
42156
42157 env = Environment(ZIPCOMSTR = "Zipping $TARGET")
42158
42159
42160 ZIPFLAGS
42161 Gen‐
42162 eral
42163 options
42164 passed
42165 to
42166 the
42167 zip
42168 util‐
42169 ity.
42170
42171
42172 ZIP‐
42173 SUF‐
42174 FIX The
42175 suf‐
42176 fix
42177 used
42178 for
42179 zip
42180 file
42181 names.
42182
42183
42184 Con‐
42185 struc‐
42186 tion
42187 vari‐
42188 ables
42189 can
42190 be
42191 retrieved
42192 and
42193 set
42194 using
42195 the
42196 Dic‐
42197 tio‐
42198 nary
42199 method
42200 of
42201 the
42202 con‐
42203 struc‐
42204 tion
42205 envi‐
42206 ron‐
42207 ment:
42208
42209 dict = env.Dictionary()
42210 dict["CC"] = "cc"
42211
42212 or
42213 using
42214 the
42215 []
42216 oper‐
42217 a‐
42218 tor:
42219
42220 env["CC"] = "cc"
42221
42222 Con‐
42223 struc‐
42224 tion
42225 vari‐
42226 ables
42227 can
42228 also
42229 be
42230 passed
42231 to
42232 the
42233 con‐
42234 struc‐
42235 tion
42236 envi‐
42237 ron‐
42238 ment
42239 con‐
42240 struc‐
42241 tor:
42242
42243 env = Environment(CC="cc")
42244
42245 or
42246 when
42247 copy‐
42248 ing
42249 a
42250 con‐
42251 struc‐
42252 tion
42253 envi‐
42254 ron‐
42255 ment
42256 using
42257 the
42258 Clone
42259 method:
42260
42261 env2 = env.Clone(CC="cl.exe")
42262
42263
42264 Configure Contexts
42265 scons supports configure contexts, an integrated mechanism similar to
42266 the various AC_CHECK macros in GNU autoconf for testing for the exis‐
42267 tence of C header files, libraries, etc. In contrast to autoconf,
42268 scons does not maintain an explicit cache of the tested values, but
42269 uses its normal dependency tracking to keep the checked values up to
42270 date. However, users may override this behaviour with the --config com‐
42271 mand line option.
42272
42273 The following methods can be used to perform checks:
42274
42275
42276 Configure(env, [custom_tests, conf_dir, log_file, config_h, clean,
42277 help])
42278
42279 env.Configure([custom_tests, conf_dir, log_file, config_h, clean,
42280 help])
42281 This creates a configure context, which can be used to perform
42282 checks. env specifies the environment for building the tests.
42283 This environment may be modified when performing checks. cus‐
42284 tom_tests is a dictionary containing custom tests. See also the
42285 section about custom tests below. By default, no custom tests
42286 are added to the configure context. conf_dir specifies a direc‐
42287 tory where the test cases are built. Note that this directory
42288 is not used for building normal targets. The default value is
42289 the directory #/.sconf_temp. log_file specifies a file which
42290 collects the output from commands that are executed to check for
42291 the existence of header files, libraries, etc. The default is
42292 the file #/config.log. If you are using the VariantDir()
42293 method, you may want to specify a subdirectory under your vari‐
42294 ant directory. config_h specifies a C header file where the
42295 results of tests will be written, e.g. #define HAVE_STDIO_H,
42296 #define HAVE_LIBM, etc. The default is to not write a config.h
42297 file. You can specify the same config.h file in multiple calls
42298 to Configure, in which case scons will concatenate all results
42299 in the specified file. Note that SCons uses its normal depen‐
42300 dency checking to decide if it's necessary to rebuild the speci‐
42301 fied config_h file. This means that the file is not necessarily
42302 re-built each time scons is run, but is only rebuilt if its con‐
42303 tents will have changed and some target that depends on the con‐
42304 fig_h file is being built.
42305
42306 The optional clean and help arguments can be used to suppress
42307 execution of the configuration tests when the -c/--clean or
42308 -H/-h/--help options are used, respectively. The default behav‐
42309 ior is always to execute configure context tests, since the
42310 results of the tests may affect the list of targets to be
42311 cleaned or the help text. If the configure tests do not affect
42312 these, then you may add the clean=False or help=False arguments
42313 (or both) to avoid unnecessary test execution.
42314
42315 A created Configure instance has the following associated meth‐
42316 ods:
42317
42318
42319 Configure.Finish(self)
42320 This method should be called after configuration is done. It
42321 returns the environment as modified by the configuration checks
42322 performed. After this method is called, no further checks can
42323 be performed with this configuration context. However, you can
42324 create a new Configure context to perform additional checks.
42325 Only one context should be active at a time.
42326
42327 The following Checks are predefined. (This list will likely
42328 grow larger as time goes by and developers contribute new useful
42329 tests.)
42330
42331
42332 Configure.CheckHeader(self, header, [include_quotes, language])
42333 Checks if header is usable in the specified language. header
42334 may be a list, in which case the last item in the list is the
42335 header file to be checked, and the previous list items are
42336 header files whose #include lines should precede the header line
42337 being checked for. The optional argument include_quotes must be
42338 a two character string, where the first character denotes the
42339 opening quote and the second character denotes the closing
42340 quote. By default, both characters are " (double quote). The
42341 optional argument language should be either C or C++ and selects
42342 the compiler to be used for the check. Returns 1 on success and
42343 0 on failure.
42344
42345
42346 Configure.CheckCHeader(self, header, [include_quotes])
42347 This is a wrapper around Configure.CheckHeader which checks if
42348 header is usable in the C language. header may be a list, in
42349 which case the last item in the list is the header file to be
42350 checked, and the previous list items are header files whose
42351 #include lines should precede the header line being checked for.
42352 The optional argument include_quotes must be a two character
42353 string, where the first character denotes the opening quote and
42354 the second character denotes the closing quote (both default to
42355 "). Returns 1 on success and 0 on failure.
42356
42357
42358 Configure.CheckCXXHeader(self, header, [include_quotes])
42359 This is a wrapper around Configure.CheckHeader which checks if
42360 header is usable in the C++ language. header may be a list, in
42361 which case the last item in the list is the header file to be
42362 checked, and the previous list items are header files whose
42363 #include lines should precede the header line being checked for.
42364 The optional argument include_quotes must be a two character
42365 string, where the first character denotes the opening quote and
42366 the second character denotes the closing quote (both default to
42367 "). Returns 1 on success and 0 on failure.
42368
42369
42370 Configure.CheckFunc(self, function_name, [header, language])
42371 Checks if the specified C or C++ function is available. func‐
42372 tion_name is the name of the function to check for. The
42373 optional header argument is a string that will be placed at the
42374 top of the test file that will be compiled to check if the func‐
42375 tion exists; the default is:
42376 #ifdef __cplusplus
42377 extern "C"
42378 #endif
42379 char function_name();
42380 The optional language argument should be C or C++ and selects
42381 the compiler to be used for the check; the default is "C".
42382
42383
42384 Configure.CheckLib(self, [library, symbol, header, language,
42385 autoadd=1])
42386 Checks if library provides symbol. If the value of
42387 autoadd is 1 and the library provides the specified sym‐
42388 bol, appends the library to the LIBS construction envi‐
42389 ronment variable. library may also be None (the
42390 default), in which case symbol is checked with the cur‐
42391 rent LIBS variable, or a list of library names, in which
42392 case each library in the list will be checked for symbol.
42393 If symbol is not set or is None, then Configure.Check‐
42394 Lib() just checks if you can link against the specified
42395 library. The optional language argument should be C or
42396 C++ and selects the compiler to be used for the check;
42397 the default is "C". The default value for autoadd is 1.
42398 This method returns 1 on success and 0 on error.
42399
42400
42401 Configure.CheckLibWithHeader(self, library, header, language,
42402 [call, autoadd])
42403
42404 In contrast to the Configure.CheckLib call, this call
42405 provides a more sophisticated way to check against
42406 libraries. Again, library specifies the library or a
42407 list of libraries to check. header specifies a header to
42408 check for. header may be a list, in which case the last
42409 item in the list is the header file to be checked, and
42410 the previous list items are header files whose #include
42411 lines should precede the header line being checked for.
42412 language may be one of 'C','c','CXX','cxx','C++' and
42413 'c++'. call can be any valid expression (with a trailing
42414 ';'). If call is not set, the default simply checks that
42415 you can link against the specified library. autoadd
42416 specifies whether to add the library to the environment
42417 (only if the check succeeds). This method returns 1 on
42418 success and 0 on error.
42419
42420
42421 Configure.CheckType(self, type_name, [includes, language])
42422 Checks for the existence of a type defined by typedef.
42423 type_name specifies the typedef name to check for.
42424 includes is a string containing one or more #include
42425 lines that will be inserted into the program that will be
42426 run to test for the existence of the type. The optional
42427 language argument should be C or C++ and selects the com‐
42428 piler to be used for the check; the default is "C".
42429
42430 Example of a typical Configure usage:
42431
42432 env = Environment()
42433 conf = Configure( env )
42434 if not conf.CheckCHeader( 'math.h' ):
42435 print 'We really need math.h!'
42436 Exit(1)
42437 if conf.CheckLibWithHeader( 'qt', 'qapp.h', 'c++', 'QApplication qapp(0,0);' ):
42438 # do stuff for qt - usage, e.g.
42439 conf.env.Append( CPPFLAGS = '-DWITH_QT' )
42440 env = conf.Finish()
42441
42442
42443 Configure.CheckTypeSize(self, type_name, [header, lan‐
42444 guage, expect])
42445 Checks for the size of a type defined by typedef.
42446 type_name specifies the typedef name to check for.
42447 The optional header argument is a string that will
42448 be placed at the top of the test file that will be
42449 compiled to check if the function exists; the
42450 default is empty. The optional language argument
42451 should be C or C++ and selects the compiler to be
42452 used for the check; the default is "C". The
42453 optional expect argument should be an integer. If
42454 this argument is used, the function will only
42455 check whether the type given in type_name has the
42456 expected size (in bytes). For example, CheckType‐
42457 Size('short', expect = 2) will return success only
42458 if short is two bytes.
42459
42460
42461
42462 Configure.CheckDeclaration(self, symbol,
42463 [includes, language])
42464 Checks if the specified symbol is declared.
42465 includes is a string containing one or more
42466 #include lines that will be inserted into
42467 the program that will be run to test for
42468 the existence of the type. The optional
42469 language argument should be C or C++ and
42470 selects the compiler to be used for the
42471 check; the default is "C".
42472
42473
42474 Configure.Define(self, symbol, [value, comment])
42475 This function does not check for anything,
42476 but defines a preprocessor symbol that will
42477 be added to the configuration header file.
42478 It is the equivalent of AC_DEFINE, and
42479 defines the symbol name with the optional
42480 value and the optional comment comment.
42481
42482
42483 Examples:
42484
42485 env = Environment()
42486 conf = Configure( env )
42487
42488 # Puts the following line in the config header file:
42489 # #define A_SYMBOL
42490 conf.Define('A_SYMBOL')
42491
42492 # Puts the following line in the config header file:
42493 # #define A_SYMBOL 1
42494 conf.Define('A_SYMBOL', 1)
42495
42496
42497 Be careful about quoting string val‐
42498 ues, though:
42499
42500 env = Environment()
42501 conf = Configure( env )
42502
42503 # Puts the following line in the config header file:
42504 # #define A_SYMBOL YA
42505 conf.Define('A_SYMBOL', "YA")
42506
42507 # Puts the following line in the config header file:
42508 # #define A_SYMBOL "YA"
42509 conf.Define('A_SYMBOL', '"YA"')
42510
42511
42512 For comment:
42513
42514 env = Environment()
42515 conf = Configure( env )
42516
42517 # Puts the following lines in the config header file:
42518 # /* Set to 1 if you have a symbol */
42519 # #define A_SYMBOL 1
42520 conf.Define('A_SYMBOL', 1, 'Set to 1 if you have a symbol')
42521
42522 You can define your own cus‐
42523 tom checks. in addition to
42524 the predefined checks. These
42525 are passed in a dictionary to
42526 the Configure function. This
42527 dictionary maps the names of
42528 the checks to user defined
42529 Python callables (either
42530 Python functions or class
42531 instances implementing the
42532 __call__ method). The first
42533 argument of the call is
42534 always a CheckContext
42535 instance followed by the
42536 arguments, which must be sup‐
42537 plied by the user of the
42538 check. These CheckContext
42539 instances define the follow‐
42540 ing methods:
42541
42542
42543 CheckContext.Message(self,
42544 text)
42545
42546 Usually called before
42547 the check is started.
42548 text will be displayed
42549 to the user, e.g.
42550 'Checking for library
42551 X...'
42552
42553
42554 CheckContext.Result(self,,
42555 res)
42556
42557 Usually called after
42558 the check is done.
42559 res can be either an
42560 integer or a string.
42561 In the former case,
42562 'ok' (res != 0) or
42563 'failed' (res == 0) is
42564 displayed to the user,
42565 in the latter case the
42566 given string is dis‐
42567 played.
42568
42569
42570 CheckContext.TryCompile(self,
42571 text, extension)
42572 Checks if a file with
42573 the specified exten‐
42574 sion (e.g. '.c') con‐
42575 taining text can be
42576 compiled using the
42577 environment's Object
42578 builder. Returns 1 on
42579 success and 0 on fail‐
42580 ure.
42581
42582
42583 CheckContext.TryLink(self,
42584 text, extension)
42585 Checks, if a file with
42586 the specified exten‐
42587 sion (e.g. '.c') con‐
42588 taining text can be
42589 compiled using the
42590 environment's Program
42591 builder. Returns 1 on
42592 success and 0 on fail‐
42593 ure.
42594
42595
42596 CheckContext.TryRun(self,
42597 text, extension)
42598 Checks, if a file with
42599 the specified exten‐
42600 sion (e.g. '.c') con‐
42601 taining text can be
42602 compiled using the
42603 environment's Program
42604 builder. On success,
42605 the program is run. If
42606 the program executes
42607 successfully (that is,
42608 its return status is
42609 0), a tuple (1, out‐
42610 putStr) is returned,
42611 where outputStr is the
42612 standard output of the
42613 program. If the pro‐
42614 gram fails execution
42615 (its return status is
42616 non-zero), then (0,
42617 '') is returned.
42618
42619
42620 CheckContext.TryAction(self,
42621 action, [text, extension])
42622 Checks if the speci‐
42623 fied action with an
42624 optional source file
42625 (contents text ,
42626 extension extension =
42627 '' ) can be executed.
42628 action may be anything
42629 which can be converted
42630 to a scons Action. On
42631 success, (1, output‐
42632 Str) is returned,
42633 where outputStr is the
42634 content of the target
42635 file. On failure (0,
42636 '') is returned.
42637
42638
42639 CheckContext.TryBuild(self,
42640 builder, [text, extension])
42641 Low level implementa‐
42642 tion for testing spe‐
42643 cific builds; the
42644 methods above are
42645 based on this method.
42646 Given the Builder
42647 instance builder and
42648 the optional text of a
42649 source file with
42650 optional extension,
42651 this method returns 1
42652 on success and 0 on
42653 failure. In addition,
42654 self.lastTarget is set
42655 to the build target
42656 node, if the build was
42657 successful.
42658
42659 Example for implement‐
42660 ing and using custom
42661 tests:
42662
42663 def CheckQt(context, qtdir):
42664 context.Message( 'Checking for qt ...' )
42665 lastLIBS = context.env['LIBS']
42666 lastLIBPATH = context.env['LIBPATH']
42667 lastCPPPATH= context.env['CPPPATH']
42668 context.env.Append(LIBS = 'qt', LIBPATH = qtdir + '/lib', CPPPATH = qtdir + '/include' )
42669 ret = context.TryLink("""
42670 #include <qapp.h>
42671 int main(int argc, char **argv) {
42672 QApplication qapp(argc, argv);
42673 return 0;
42674 }
42675 """)
42676 if not ret:
42677 context.env.Replace(LIBS = lastLIBS, LIBPATH=lastLIBPATH, CPPPATH=lastCPPPATH)
42678 context.Result( ret )
42679 return ret
42680
42681 env = Environment()
42682 conf = Configure( env, custom_tests = { 'CheckQt' : CheckQt } )
42683 if not conf.CheckQt('/usr/lib/qt'):
42684 print 'We really need qt!'
42685 Exit(1)
42686 env = conf.Finish()
42687
42688
42689 Command-Line Construction Variables
42690 Often when building software, some variables must be specified at build
42691 time. For example, libraries needed for the build may be in non-stan‐
42692 dard locations, or site-specific compiler options may need to be passed
42693 to the compiler. scons provides a Variables object to support overrid‐
42694 ing construction variables on the command line:
42695 $ scons VARIABLE=foo
42696 The variable values can also be specified in a text-based SCon‐
42697 script file. To create a Variables object, call the Variables()
42698 function:
42699
42700
42701 Variables([files], [args])
42702 This creates a Variables object that will read construc‐
42703 tion variables from the file or list of filenames speci‐
42704 fied in files. If no files are specified, or the files
42705 argument is None, then no files will be read. The
42706 optional argument args is a dictionary of values that
42707 will override anything read from the specified files; it
42708 is primarily intended to be passed the ARGUMENTS dictio‐
42709 nary that holds variables specified on the command line.
42710 Example:
42711
42712 vars = Variables('custom.py')
42713 vars = Variables('overrides.py', ARGUMENTS)
42714 vars = Variables(None, {FOO:'expansion', BAR:7})
42715
42716 Variables objects have the following methods:
42717
42718
42719 Add(key, [help, default, validator, converter])
42720 This adds a customizable construction variable to
42721 the Variables object. key is the name of the
42722 variable. help is the help text for the variable.
42723 default is the default value of the variable; if
42724 the default value is None and there is no explicit
42725 value specified, the construction variable will
42726 not be added to the construction environment.
42727 validator is called to validate the value of the
42728 variable, and should take three arguments: key,
42729 value, and environment. The recommended way to
42730 handle an invalid value is to raise an exception
42731 (see example below). converter is called to con‐
42732 vert the value before putting it in the environ‐
42733 ment, and should take either a value, or the value
42734 and environment, as parameters. The converter
42735 must return a value, which will be converted into
42736 a string before being validated by the validator
42737 (if any) and then added to the environment.
42738
42739 Examples:
42740
42741 vars.Add('CC', 'The C compiler')
42742
42743 def validate_color(key, val, env):
42744 if not val in ['red', 'blue', 'yellow']:
42745 raise "Invalid color value '%s'" % val
42746 vars.Add('COLOR', validator=valid_color)
42747
42748
42749 AddVariables(list)
42750 A wrapper script that adds multiple custom‐
42751 izable construction variables to a Vari‐
42752 ables object. list is a list of tuple or
42753 list objects that contain the arguments for
42754 an individual call to the Add method.
42755
42756 opt.AddVariables(
42757 ('debug', '', 0),
42758 ('CC', 'The C compiler'),
42759 ('VALIDATE', 'An option for testing validation',
42760 'notset', validator, None),
42761 )
42762
42763
42764 Update(env, [args])
42765 This updates a construction environ‐
42766 ment env with the customized con‐
42767 struction variables. Any specified
42768 variables that are not configured
42769 for the Variables object will be
42770 saved and may be retrieved with the
42771 UnknownVariables() method, below.
42772
42773 Normally this method is not called
42774 directly, but is called indirectly
42775 by passing the Variables object to
42776 the Environment() function:
42777
42778 env = Environment(variables=vars)
42779
42780
42781 The text file(s) that were
42782 specified when the Variables
42783 object was created are exe‐
42784 cuted as Python scripts, and
42785 the values of (global) Python
42786 variables set in the file are
42787 added to the construction
42788 environment.
42789
42790 Example:
42791
42792 CC = 'my_cc'
42793
42794
42795 UnknownVariables()
42796 Returns a dictionary
42797 containing any vari‐
42798 ables that were speci‐
42799 fied either in the
42800 files or the dictio‐
42801 nary with which the
42802 Variables object was
42803 initialized, but for
42804 which the Variables
42805 object was not config‐
42806 ured.
42807
42808 env = Environment(variables=vars)
42809 for key, value in vars.UnknownVariables():
42810 print "unknown variable: %s=%s" % (key, value)
42811
42812
42813 Save(filename, env)
42814 This saves the
42815 currently set
42816 variables into
42817 a script file
42818 named filename
42819 that can be
42820 used on the
42821 next invocation
42822 to automati‐
42823 cally load the
42824 current set‐
42825 tings. This
42826 method combined
42827 with the Vari‐
42828 ables method
42829 can be used to
42830 support caching
42831 of variables
42832 between runs.
42833
42834 env = Environment()
42835 vars = Variables(['variables.cache', 'custom.py'])
42836 vars.Add(...)
42837 vars.Update(env)
42838 vars.Save('variables.cache', env)
42839
42840
42841 GenerateHelp‐
42842 Text(env,
42843 [sort])
42844 This
42845 gener‐
42846 ates
42847 help
42848 text
42849 docu‐
42850 menting
42851 the cus‐
42852 tomiza‐
42853 ble con‐
42854 struc‐
42855 tion
42856 vari‐
42857 ables
42858 suitable
42859 to pass‐
42860 ing in
42861 to the
42862 Help()
42863 func‐
42864 tion.
42865 env is
42866 the con‐
42867 struc‐
42868 tion
42869 environ‐
42870 ment
42871 that
42872 will be
42873 used to
42874 get the
42875 actual
42876 values
42877 of cus‐
42878 tomiza‐
42879 ble
42880 vari‐
42881 ables.
42882 Calling
42883 with an
42884 optional
42885 sort
42886 function
42887 will
42888 cause
42889 the out‐
42890 put to
42891 be
42892 sorted
42893 by the
42894 speci‐
42895 fied
42896 argu‐
42897 ment.
42898 The spe‐
42899 cific
42900 sort
42901 function
42902 should
42903 take two
42904 argu‐
42905 ments
42906 and
42907 return
42908 -1, 0 or
42909 1 (like
42910 the
42911 standard
42912 Python
42913 cmp
42914 func‐
42915 tion).
42916
42917 Help(vars.GenerateHelpText(env))
42918 Help(vars.GenerateHelpText(env, sort=cmp))
42919
42920
42921 Format‐
42922 Vari‐
42923 able‐
42924 Help‐
42925 Text(env,
42926 opt,
42927 help,
42928 default,
42929 actual)
42930 This
42931 method
42932 returns
42933 a
42934 for‐
42935 mat‐
42936 ted
42937 string
42938 con‐
42939 tain‐
42940 ing
42941 the
42942 print‐
42943 able
42944 help
42945 text
42946 for
42947 one
42948 option.
42949 It
42950 is
42951 nor‐
42952 mally
42953 not
42954 called
42955 directly,
42956 but
42957 is
42958 called
42959 by
42960 the
42961 Gen‐
42962 er‐
42963 ate‐
42964 Help‐
42965 Text()
42966 method
42967 to
42968 cre‐
42969 ate
42970 the
42971 returned
42972 help
42973 text.
42974 It
42975 may
42976 be
42977 over‐
42978 rid‐
42979 den
42980 with
42981 your
42982 own
42983 func‐
42984 tion
42985 that
42986 takes
42987 the
42988 argu‐
42989 ments
42990 spec‐
42991 i‐
42992 fied
42993 above
42994 and
42995 returns
42996 a
42997 string
42998 of
42999 help
43000 text
43001 for‐
43002 mat‐
43003 ted
43004 to
43005 your
43006 lik‐
43007 ing.
43008 Note
43009 that
43010 the
43011 Gen‐
43012 er‐
43013 ate‐
43014 Help‐
43015 Text()
43016 will
43017 not
43018 put
43019 any
43020 blank
43021 lines
43022 or
43023 extra
43024 char‐
43025 ac‐
43026 ters
43027 in
43028 between
43029 the
43030 entries,
43031 so
43032 you
43033 must
43034 add
43035 those
43036 char‐
43037 ac‐
43038 ters
43039 to
43040 the
43041 returned
43042 string
43043 if
43044 you
43045 want
43046 the
43047 entries
43048 sep‐
43049 a‐
43050 rated.
43051
43052 def my_format(env, opt, help, default, actual):
43053 fmt = "531s: default=%s actual=%s (%s)0
43054 return fmt % (opt, default. actual, help)
43055 vars.FormatVariableHelpText = my_format
43056
43057 To
43058 make
43059 it
43060 more
43061 con‐
43062 ve‐
43063 nient
43064 to
43065 work
43066 with
43067 cus‐
43068 tom‐
43069 iz‐
43070 a‐
43071 ble
43072 Vari‐
43073 ables,
43074 scons
43075 pro‐
43076 vides
43077 a
43078 num‐
43079 ber
43080 of
43081 func‐
43082 tions
43083 that
43084 make
43085 it
43086 easy
43087 to
43088 set
43089 up
43090 var‐
43091 i‐
43092 ous
43093 types
43094 of
43095 Vari‐
43096 ables:
43097
43098
43099 BoolVari‐
43100 able(key,
43101 help,
43102 default)
43103 Return
43104 a
43105 tuple
43106 of
43107 argu‐
43108 ments
43109 to
43110 set
43111 up
43112 a
43113 Bool‐
43114 ean
43115 option.
43116 The
43117 option
43118 will
43119 use
43120 the
43121 spec‐
43122 i‐
43123 fied
43124 name
43125 key,
43126 have
43127 a
43128 default
43129 value
43130 of
43131 default,
43132 and
43133 dis‐
43134 play
43135 the
43136 spec‐
43137 i‐
43138 fied
43139 help
43140 text.
43141 The
43142 option
43143 will
43144 inter‐
43145 pret
43146 the
43147 val‐
43148 ues
43149 y,
43150 yes,
43151 t,
43152 true,
43153 1,
43154 on
43155 and
43156 all
43157 as
43158 true,
43159 and
43160 the
43161 val‐
43162 ues
43163 n,
43164 no,
43165 f,
43166 false,
43167 0,
43168 off
43169 and
43170 none
43171 as
43172 false.
43173
43174
43175 Enum‐
43176 Vari‐
43177 able(key,
43178 help,
43179 default,
43180 allowed_val‐
43181 ues,
43182 [map,
43183 ignore‐
43184 case])
43185 Return
43186 a
43187 tuple
43188 of
43189 argu‐
43190 ments
43191 to
43192 set
43193 up
43194 an
43195 option
43196 whose
43197 value
43198 may
43199 be
43200 one
43201 of
43202 a
43203 spec‐
43204 i‐
43205 fied
43206 list
43207 of
43208 legal
43209 enu‐
43210 mer‐
43211 ated
43212 val‐
43213 ues.
43214 The
43215 option
43216 will
43217 use
43218 the
43219 spec‐
43220 i‐
43221 fied
43222 name
43223 key,
43224 have
43225 a
43226 default
43227 value
43228 of
43229 default,
43230 and
43231 dis‐
43232 play
43233 the
43234 spec‐
43235 i‐
43236 fied
43237 help
43238 text.
43239 The
43240 option
43241 will
43242 only
43243 sup‐
43244 port
43245 those
43246 val‐
43247 ues
43248 in
43249 the
43250 allowed_val‐
43251 ues
43252 list.
43253 The
43254 optional
43255 map
43256 argu‐
43257 ment
43258 is
43259 a
43260 dic‐
43261 tio‐
43262 nary
43263 that
43264 can
43265 be
43266 used
43267 to
43268 con‐
43269 vert
43270 input
43271 val‐
43272 ues
43273 into
43274 spe‐
43275 cific
43276 legal
43277 val‐
43278 ues
43279 in
43280 the
43281 allowed_val‐
43282 ues
43283 list.
43284 If
43285 the
43286 value
43287 of
43288 ignore_case
43289 is
43290 0
43291 (the
43292 default),
43293 then
43294 the
43295 val‐
43296 ues
43297 are
43298 case-
43299 sen‐
43300 si‐
43301 tive.
43302 If
43303 the
43304 value
43305 of
43306 ignore_case
43307 is
43308 1,
43309 then
43310 val‐
43311 ues
43312 will
43313 be
43314 matched
43315 case-
43316 insen‐
43317 si‐
43318 tive.
43319 If
43320 the
43321 value
43322 of
43323 ignore_case
43324 is
43325 1,
43326 then
43327 val‐
43328 ues
43329 will
43330 be
43331 matched
43332 case-
43333 insen‐
43334 si‐
43335 tive,
43336 and
43337 all
43338 input
43339 val‐
43340 ues
43341 will
43342 be
43343 con‐
43344 verted
43345 to
43346 lower
43347 case.
43348
43349
43350 List‐
43351 Vari‐
43352 able(key,
43353 help,
43354 default,
43355 names,
43356 [,map])
43357 Return
43358 a
43359 tuple
43360 of
43361 argu‐
43362 ments
43363 to
43364 set
43365 up
43366 an
43367 option
43368 whose
43369 value
43370 may
43371 be
43372 one
43373 or
43374 more
43375 of
43376 a
43377 spec‐
43378 i‐
43379 fied
43380 list
43381 of
43382 legal
43383 enu‐
43384 mer‐
43385 ated
43386 val‐
43387 ues.
43388 The
43389 option
43390 will
43391 use
43392 the
43393 spec‐
43394 i‐
43395 fied
43396 name
43397 key,
43398 have
43399 a
43400 default
43401 value
43402 of
43403 default,
43404 and
43405 dis‐
43406 play
43407 the
43408 spec‐
43409 i‐
43410 fied
43411 help
43412 text.
43413 The
43414 option
43415 will
43416 only
43417 sup‐
43418 port
43419 the
43420 val‐
43421 ues
43422 all,
43423 none,
43424 or
43425 the
43426 val‐
43427 ues
43428 in
43429 the
43430 names
43431 list.
43432 More
43433 than
43434 one
43435 value
43436 may
43437 be
43438 spec‐
43439 i‐
43440 fied,
43441 with
43442 all
43443 val‐
43444 ues
43445 sep‐
43446 a‐
43447 rated
43448 by
43449 com‐
43450 mas.
43451 The
43452 default
43453 may
43454 be
43455 a
43456 string
43457 of
43458 comma-
43459 sep‐
43460 a‐
43461 rated
43462 default
43463 val‐
43464 ues,
43465 or
43466 a
43467 list
43468 of
43469 the
43470 default
43471 val‐
43472 ues.
43473 The
43474 optional
43475 map
43476 argu‐
43477 ment
43478 is
43479 a
43480 dic‐
43481 tio‐
43482 nary
43483 that
43484 can
43485 be
43486 used
43487 to
43488 con‐
43489 vert
43490 input
43491 val‐
43492 ues
43493 into
43494 spe‐
43495 cific
43496 legal
43497 val‐
43498 ues
43499 in
43500 the
43501 names
43502 list.
43503
43504
43505 Pack‐
43506 ageVari‐
43507 able(key,
43508 help,
43509 default)
43510 Return
43511 a
43512 tuple
43513 of
43514 argu‐
43515 ments
43516 to
43517 set
43518 up
43519 an
43520 option
43521 whose
43522 value
43523 is
43524 a
43525 path
43526 name
43527 of
43528 a
43529 pack‐
43530 age
43531 that
43532 may
43533 be
43534 enabled,
43535 dis‐
43536 abled
43537 or
43538 given
43539 an
43540 explicit
43541 path
43542 name.
43543 The
43544 option
43545 will
43546 use
43547 the
43548 spec‐
43549 i‐
43550 fied
43551 name
43552 key,
43553 have
43554 a
43555 default
43556 value
43557 of
43558 default,
43559 and
43560 dis‐
43561 play
43562 the
43563 spec‐
43564 i‐
43565 fied
43566 help
43567 text.
43568 The
43569 option
43570 will
43571 sup‐
43572 port
43573 the
43574 val‐
43575 ues
43576 yes,
43577 true,
43578 on,
43579 enable
43580 or
43581 search,
43582 in
43583 which
43584 case
43585 the
43586 spec‐
43587 i‐
43588 fied
43589 default
43590 will
43591 be
43592 used,
43593 or
43594 the
43595 option
43596 may
43597 be
43598 set
43599 to
43600 an
43601 arbi‐
43602 trary
43603 string
43604 (typ‐
43605 i‐
43606 cally
43607 the
43608 path
43609 name
43610 to
43611 a
43612 pack‐
43613 age
43614 that
43615 is
43616 being
43617 enabled).
43618 The
43619 option
43620 will
43621 also
43622 sup‐
43623 port
43624 the
43625 val‐
43626 ues
43627 no,
43628 false,
43629 off
43630 or
43631 dis‐
43632 able
43633 to
43634 dis‐
43635 able
43636 use
43637 of
43638 the
43639 spec‐
43640 i‐
43641 fied
43642 option.
43643
43644
43645 Path‐
43646 Vari‐
43647 able(key,
43648 help,
43649 default,
43650 [val‐
43651 ida‐
43652 tor])
43653 Return
43654 a
43655 tuple
43656 of
43657 argu‐
43658 ments
43659 to
43660 set
43661 up
43662 an
43663 option
43664 whose
43665 value
43666 is
43667 expected
43668 to
43669 be
43670 a
43671 path
43672 name.
43673 The
43674 option
43675 will
43676 use
43677 the
43678 spec‐
43679 i‐
43680 fied
43681 name
43682 key,
43683 have
43684 a
43685 default
43686 value
43687 of
43688 default,
43689 and
43690 dis‐
43691 play
43692 the
43693 spec‐
43694 i‐
43695 fied
43696 help
43697 text.
43698 An
43699 addi‐
43700 tional
43701 val‐
43702 ida‐
43703 tor
43704 may
43705 be
43706 spec‐
43707 i‐
43708 fied
43709 that
43710 will
43711 be
43712 called
43713 to
43714 ver‐
43715 ify
43716 that
43717 the
43718 spec‐
43719 i‐
43720 fied
43721 path
43722 is
43723 accept‐
43724 able.
43725 SCons
43726 sup‐
43727 plies
43728 the
43729 fol‐
43730 low‐
43731 ing
43732 ready-
43733 made
43734 val‐
43735 ida‐
43736 tors:
43737 Path‐
43738 Vari‐
43739 able.PathEx‐
43740 ists
43741 (the
43742 default),
43743 which
43744 ver‐
43745 i‐
43746 fies
43747 that
43748 the
43749 spec‐
43750 i‐
43751 fied
43752 path
43753 exists;
43754 Path‐
43755 Vari‐
43756 able.Path‐
43757 Is‐
43758 File,
43759 which
43760 ver‐
43761 i‐
43762 fies
43763 that
43764 the
43765 spec‐
43766 i‐
43767 fied
43768 path
43769 is
43770 an
43771 exist‐
43772 ing
43773 file;
43774 Path‐
43775 Vari‐
43776 able.PathIs‐
43777 Dir,
43778 which
43779 ver‐
43780 i‐
43781 fies
43782 that
43783 the
43784 spec‐
43785 i‐
43786 fied
43787 path
43788 is
43789 an
43790 exist‐
43791 ing
43792 direc‐
43793 tory;
43794 Path‐
43795 Vari‐
43796 able.PathIs‐
43797 DirCre‐
43798 ate,
43799 which
43800 ver‐
43801 i‐
43802 fies
43803 that
43804 the
43805 spec‐
43806 i‐
43807 fied
43808 path
43809 is
43810 a
43811 direc‐
43812 tory
43813 and
43814 will
43815 cre‐
43816 ate
43817 the
43818 spec‐
43819 i‐
43820 fied
43821 direc‐
43822 tory
43823 if
43824 the
43825 path
43826 does
43827 not
43828 exist;
43829 and
43830 Path‐
43831 Vari‐
43832 able.PathAc‐
43833 cept,
43834 which
43835 sim‐
43836 ply
43837 accepts
43838 the
43839 spe‐
43840 cific
43841 path
43842 name
43843 argu‐
43844 ment
43845 with‐
43846 out
43847 val‐
43848 i‐
43849 da‐
43850 tion,
43851 and
43852 which
43853 is
43854 suit‐
43855 able
43856 if
43857 you
43858 want
43859 your
43860 users
43861 to
43862 be
43863 able
43864 to
43865 spec‐
43866 ify
43867 a
43868 direc‐
43869 tory
43870 path
43871 that
43872 will
43873 be
43874 cre‐
43875 ated
43876 as
43877 part
43878 of
43879 the
43880 build
43881 process,
43882 for
43883 exam‐
43884 ple.
43885 You
43886 may
43887 sup‐
43888 ply
43889 your
43890 own
43891 val‐
43892 ida‐
43893 tor
43894 func‐
43895 tion,
43896 which
43897 must
43898 take
43899 three
43900 argu‐
43901 ments
43902 (key,
43903 the
43904 name
43905 of
43906 the
43907 vari‐
43908 able
43909 to
43910 be
43911 set;
43912 val,
43913 the
43914 spec‐
43915 i‐
43916 fied
43917 value
43918 being
43919 checked;
43920 and
43921 env,
43922 the
43923 con‐
43924 struc‐
43925 tion
43926 envi‐
43927 ron‐
43928 ment)
43929 and
43930 should
43931 raise
43932 an
43933 excep‐
43934 tion
43935 if
43936 the
43937 spec‐
43938 i‐
43939 fied
43940 value
43941 is
43942 not
43943 accept‐
43944 able.
43945
43946 These
43947 func‐
43948 tions
43949 make it
43950 conve‐
43951 nient to
43952 create a
43953 number
43954 of vari‐
43955 ables
43956 with
43957 consis‐
43958 tent
43959 behavior
43960 in a
43961 single
43962 call to
43963 the
43964 AddVari‐
43965 ables
43966 method:
43967
43968 vars.AddVariables(
43969 BoolVariable('warnings', 'compilation with -Wall and similiar', 1),
43970 EnumVariable('debug', 'debug output and symbols', 'no'
43971 allowed_values=('yes', 'no', 'full'),
43972 map={}, ignorecase=0), # case sensitive
43973 ListVariable('shared',
43974 'libraries to build as shared libraries',
43975 'all',
43976 names = list_of_libs),
43977 PackageVariable('x11',
43978 'use X11 installed here (yes = search some places)',
43979 'yes'),
43980 PathVariable('qtdir', 'where the root of Qt is installed', qtdir),
43981 PathVariable('foopath', 'where the foo library is installed', foopath,
43982 PathVariable.PathIsDir),
43983
43984 )
43985
43986
43987 File and Directory Nodes
43988 The File() and Dir() functions return File and Dir Nodes, respectively.
43989 python objects, respectively. Those objects have several user-visible
43990 attributes and methods that are often useful:
43991
43992
43993 path The build path of the given file or directory. This path is
43994 relative to the top-level directory (where the SConstruct file
43995 is found). The build path is the same as the source path if
43996 variant_dir is not being used.
43997
43998
43999 abspath
44000 The absolute build path of the given file or directory.
44001
44002
44003 srcnode()
44004 The srcnode() method returns another File or Dir object repre‐
44005 senting the source path of the given File or Dir. The
44006
44007 # Get the current build dir's path, relative to top.
44008 Dir('.').path
44009 # Current dir's absolute path
44010 Dir('.').abspath
44011 # Next line is always '.', because it is the top dir's path relative to itself.
44012 Dir('#.').path
44013 File('foo.c').srcnode().path # source path of the given source file.
44014
44015 # Builders also return File objects:
44016 foo = env.Program('foo.c')
44017 print "foo will be built in %s"%foo.path
44018
44019 A Dir Node or File Node can also be used to create file and sub‐
44020 directory Nodes relative to the generating Node. A Dir Node
44021 will place the new Nodes within the directory it represents. A
44022 File node will place the new Nodes within its parent directory
44023 (that is, "beside" the file in question). If d is a Dir (direc‐
44024 tory) Node and f is a File (file) Node, then these methods are
44025 available:
44026
44027
44028 d.Dir(name)
44029 Returns a directory Node for a subdirectory of d named
44030 name.
44031
44032
44033 d.File(name)
44034 Returns a file Node for a file within d named name.
44035
44036
44037 d.Entry(name)
44038 Returns an unresolved Node within d named name.
44039
44040
44041 f.Dir(name)
44042 Returns a directory named name within the parent direc‐
44043 tory of f.
44044
44045
44046 f.File(name)
44047 Returns a file named name within the parent directory of
44048 f.
44049
44050
44051 f.Entry(name)
44052 Returns an unresolved Node named name within the parent
44053 directory of f.
44054
44055 For example:
44056
44057 # Get a Node for a file within a directory
44058 incl = Dir('include')
44059 f = incl.File('header.h')
44060
44061 # Get a Node for a subdirectory within a directory
44062 dist = Dir('project-3.2.1)
44063 src = dist.Dir('src')
44064
44065 # Get a Node for a file in the same directory
44066 cfile = File('sample.c')
44067 hfile = cfile.File('sample.h')
44068
44069 # Combined example
44070 docs = Dir('docs')
44071 html = docs.Dir('html')
44072 index = html.File('index.html')
44073 css = index.File('app.css')
44074
44075
44077 Builder Objects
44078 scons can be extended to build different types of targets by adding new
44079 Builder objects to a construction environment. In general, you should
44080 only need to add a new Builder object when you want to build a new type
44081 of file or other external target. If you just want to invoke a differ‐
44082 ent compiler or other tool to build a Program, Object, Library, or any
44083 other type of output file for which scons already has an existing
44084 Builder, it is generally much easier to use those existing Builders in
44085 a construction environment that sets the appropriate construction vari‐
44086 ables (CC, LINK, etc.).
44087
44088 Builder objects are created using the Builder function. The Builder
44089 function accepts the following arguments:
44090
44091
44092 action The command line string used to build the target from the
44093 source. action can also be: a list of strings representing the
44094 command to be executed and its arguments (suitable for enclosing
44095 white space in an argument), a dictionary mapping source file
44096 name suffixes to any combination of command line strings (if the
44097 builder should accept multiple source file extensions), a Python
44098 function; an Action object (see the next section); or a list of
44099 any of the above.
44100
44101 An action function takes three arguments: source - a list of
44102 source nodes, target - a list of target nodes, env - the con‐
44103 struction environment.
44104
44105
44106 prefix The prefix that will be prepended to the target file name. This
44107 may be specified as a:
44108
44109
44110 * string,
44111
44112
44113 * callable object - a function or other callable that takes
44114 two arguments (a construction environment and a list of
44115 sources) and returns a prefix,
44116
44117
44118 * dictionary - specifies a mapping from a specific source
44119 suffix (of the first source specified) to a correspond‐
44120 ing target prefix. Both the source suffix and target
44121 prefix specifications may use environment variable sub‐
44122 stitution, and the target prefix (the 'value' entries
44123 in the dictionary) may also be a callable object. The
44124 default target prefix may be indicated by a dictionary
44125 entry with a key value of None.
44126
44127 b = Builder("build_it < $SOURCE > $TARGET"
44128 prefix = "file-")
44129
44130 def gen_prefix(env, sources):
44131 return "file-" + env['PLATFORM'] + '-'
44132 b = Builder("build_it < $SOURCE > $TARGET",
44133 prefix = gen_prefix)
44134
44135 b = Builder("build_it < $SOURCE > $TARGET",
44136 suffix = { None: "file-",
44137 "$SRC_SFX_A": gen_prefix })
44138
44139
44140 suffix The suffix that will be appended to the target file name.
44141 This may be specified in the same manner as the prefix
44142 above. If the suffix is a string, then scons will append
44143 a '.' to the beginning of the suffix if it's not already
44144 there. The string returned by callable object (or
44145 obtained from the dictionary) is untouched and must
44146 append its own '.' to the beginning if one is desired.
44147
44148 b = Builder("build_it < $SOURCE > $TARGET"
44149 suffix = "-file")
44150
44151 def gen_suffix(env, sources):
44152 return "." + env['PLATFORM'] + "-file"
44153 b = Builder("build_it < $SOURCE > $TARGET",
44154 suffix = gen_suffix)
44155
44156 b = Builder("build_it < $SOURCE > $TARGET",
44157 suffix = { None: ".sfx1",
44158 "$SRC_SFX_A": gen_suffix })
44159
44160
44161 ensure_suffix
44162 When set to any true value, causes scons to add
44163 the target suffix specified by the suffix keyword
44164 to any target strings that have a different suf‐
44165 fix. (The default behavior is to leave untouched
44166 any target file name that looks like it already
44167 has any suffix.)
44168
44169 b1 = Builder("build_it < $SOURCE > $TARGET"
44170 suffix = ".out")
44171 b2 = Builder("build_it < $SOURCE > $TARGET"
44172 suffix = ".out",
44173 ensure_suffix)
44174 env = Environment()
44175 env['BUILDERS']['B1'] = b1
44176 env['BUILDERS']['B2'] = b2
44177
44178 # Builds "foo.txt" because ensure_suffix is not set.
44179 env.B1('foo.txt', 'foo.in')
44180
44181 # Builds "bar.txt.out" because ensure_suffix is set.
44182 env.B2('bar.txt', 'bar.in')
44183
44184
44185 src_suffix
44186 The expected source file name suffix. This
44187 may be a string or a list of strings.
44188
44189
44190 target_scanner
44191 A Scanner object that will be invoked to
44192 find implicit dependencies for this target
44193 file. This keyword argument should be used
44194 for Scanner objects that find implicit
44195 dependencies based only on the target file
44196 and the construction environment, not for
44197 implicit (See the section "Scanner
44198 Objects," below, for information about cre‐
44199 ating Scanner objects.)
44200
44201
44202 source_scanner
44203 A Scanner object that will be invoked to
44204 find implicit dependences in any source
44205 files used to build this target file. This
44206 is where you would specify a scanner to
44207 find things like #include lines in source
44208 files. The pre-built DirScanner Scanner
44209 object may be used to indicate that this
44210 Builder should scan directory trees for on-
44211 disk changes to files that scons does not
44212 know about from other Builder or function
44213 calls. (See the section "Scanner Objects,"
44214 below, for information about creating your
44215 own Scanner objects.)
44216
44217
44218 target_factory
44219 A factory function that the Builder will
44220 use to turn any targets specified as
44221 strings into SCons Nodes. By default,
44222 SCons assumes that all targets are files.
44223 Other useful target_factory values include
44224 Dir, for when a Builder creates a directory
44225 target, and Entry, for when a Builder can
44226 create either a file or directory target.
44227
44228 Example:
44229
44230 MakeDirectoryBuilder = Builder(action=my_mkdir, target_factory=Dir)
44231 env = Environment()
44232 env.Append(BUILDERS = {'MakeDirectory':MakeDirectoryBuilder})
44233 env.MakeDirectory('new_directory', [])
44234
44235
44236 Note that the call to the MakeDirec‐
44237 tory Builder needs to specify an
44238 empty source list to make the string
44239 represent the builder's target;
44240 without that, it would assume the
44241 argument is the source, and would
44242 try to deduce the target name from
44243 it, which in the absence of an auto‐
44244 matically-added prefix or suffix
44245 would lead to a matching target and
44246 source name and a circular depen‐
44247 dency.
44248
44249
44250 source_factory
44251 A factory function that the Builder
44252 will use to turn any sources speci‐
44253 fied as strings into SCons Nodes.
44254 By default, SCons assumes that all
44255 source are files. Other useful
44256 source_factory values include Dir,
44257 for when a Builder uses a directory
44258 as a source, and Entry, for when a
44259 Builder can use files or directories
44260 (or both) as sources.
44261
44262 Example:
44263
44264 CollectBuilder = Builder(action=my_mkdir, source_factory=Entry)
44265 env = Environment()
44266 env.Append(BUILDERS = {'Collect':CollectBuilder})
44267 env.Collect('archive', ['directory_name', 'file_name'])
44268
44269
44270 emitter
44271 A function or list of func‐
44272 tions to manipulate the tar‐
44273 get and source lists before
44274 dependencies are established
44275 and the target(s) are actu‐
44276 ally built. emitter can also
44277 be a string containing a con‐
44278 struction variable to expand
44279 to an emitter function or
44280 list of functions, or a dic‐
44281 tionary mapping source file
44282 suffixes to emitter func‐
44283 tions. (Only the suffix of
44284 the first source file is used
44285 to select the actual emitter
44286 function from an emitter dic‐
44287 tionary.)
44288
44289 An emitter function takes
44290 three arguments: source - a
44291 list of source nodes, target
44292 - a list of target nodes, env
44293 - the construction environ‐
44294 ment. An emitter must return
44295 a tuple containing two lists,
44296 the list of targets to be
44297 built by this builder, and
44298 the list of sources for this
44299 builder.
44300
44301 Example:
44302
44303 def e(target, source, env):
44304 return (target + ['foo.foo'], source + ['foo.src'])
44305
44306 # Simple association of an emitter function with a Builder.
44307 b = Builder("my_build < $TARGET > $SOURCE",
44308 emitter = e)
44309
44310 def e2(target, source, env):
44311 return (target + ['bar.foo'], source + ['bar.src'])
44312
44313 # Simple association of a list of emitter functions with a Builder.
44314 b = Builder("my_build < $TARGET > $SOURCE",
44315 emitter = [e, e2])
44316
44317 # Calling an emitter function through a construction variable.
44318 env = Environment(MY_EMITTER = e)
44319 b = Builder("my_build < $TARGET > $SOURCE",
44320 emitter = '$MY_EMITTER')
44321
44322 # Calling a list of emitter functions through a construction variable.
44323 env = Environment(EMITTER_LIST = [e, e2])
44324 b = Builder("my_build < $TARGET > $SOURCE",
44325 emitter = '$EMITTER_LIST')
44326
44327 # Associating multiple emitters with different file
44328 # suffixes using a dictionary.
44329 def e_suf1(target, source, env):
44330 return (target + ['another_target_file'], source)
44331 def e_suf2(target, source, env):
44332 return (target, source + ['another_source_file'])
44333 b = Builder("my_build < $TARGET > $SOURCE",
44334 emitter = {'.suf1' : e_suf1,
44335 '.suf2' : e_suf2})
44336
44337
44338 multi Specifies whether this
44339 builder is allowed to
44340 be called multiple
44341 times for the same
44342 target file(s). The
44343 default is 0, which
44344 means the builder can
44345 not be called multiple
44346 times for the same
44347 target file(s). Call‐
44348 ing a builder multiple
44349 times for the same
44350 target simply adds
44351 additional source
44352 files to the target;
44353 it is not allowed to
44354 change the environment
44355 associated with the
44356 target, specify addi‐
44357 tion environment over‐
44358 rides, or associate a
44359 different builder with
44360 the target.
44361
44362
44363 env A construction envi‐
44364 ronment that can be
44365 used to fetch source
44366 code using this
44367 Builder. (Note that
44368 this environment is
44369 not used for normal
44370 builds of normal tar‐
44371 get files, which use
44372 the environment that
44373 was used to call the
44374 Builder for the target
44375 file.)
44376
44377
44378 generator
44379 A function that
44380 returns a list of
44381 actions that will be
44382 executed to build the
44383 target(s) from the
44384 source(s). The
44385 returned action(s) may
44386 be an Action object,
44387 or anything that can
44388 be converted into an
44389 Action object (see the
44390 next section).
44391
44392 The generator function
44393 takes four arguments:
44394 source - a list of
44395 source nodes, target -
44396 a list of target
44397 nodes, env - the con‐
44398 struction environment,
44399 for_signature - a
44400 Boolean value that
44401 specifies whether the
44402 generator is being
44403 called for generating
44404 a build signature (as
44405 opposed to actually
44406 executing the com‐
44407 mand). Example:
44408
44409 def g(source, target, env, for_signature):
44410 return [["gcc", "-c", "-o"] + target + source]
44411
44412 b = Builder(generator=g)
44413
44414
44415 The generator
44416 and action
44417 arguments must
44418 not both be
44419 used for the
44420 same Builder.
44421
44422
44423 src_builder
44424 Specifies a
44425 builder to use
44426 when a source
44427 file name suf‐
44428 fix does not
44429 match any of
44430 the suffixes of
44431 the builder.
44432 Using this
44433 argument pro‐
44434 duces a multi-
44435 stage builder.
44436
44437
44438 single_source
44439 Specifies that
44440 this builder
44441 expects exactly
44442 one source file
44443 per call. Giv‐
44444 ing more than
44445 one source
44446 files without
44447 target files
44448 results in
44449 implicitely
44450 calling the
44451 builder multi‐
44452 ple times (once
44453 for each source
44454 given). Giving
44455 multiple source
44456 files together
44457 with target
44458 files results
44459 in a UserError
44460 exception.
44461
44462
44463 The generator and
44464 action arguments must
44465 not both be used for
44466 the same Builder.
44467
44468
44469 source_ext_match
44470 When the specified
44471 action argument is a
44472 dictionary, the
44473 default behavior when
44474 a builder is passed
44475 multiple source files
44476 is to make sure that
44477 the extensions of all
44478 the source files
44479 match. If it is legal
44480 for this builder to be
44481 called with a list of
44482 source files with dif‐
44483 ferent extensions,
44484 this check can be sup‐
44485 pressed by setting
44486 source_ext_match to
44487 None or some other
44488 non-true value. When
44489 source_ext_match is
44490 disable, scons will
44491 use the suffix of the
44492 first specified source
44493 file to select the
44494 appropriate action
44495 from the action dic‐
44496 tionary.
44497
44498 In the following exam‐
44499 ple, the setting of
44500 source_ext_match pre‐
44501 vents scons from exit‐
44502 ing with an error due
44503 to the mismatched suf‐
44504 fixes of foo.in and
44505 foo.extra.
44506
44507 b = Builder(action={'.in' : 'build $SOURCES > $TARGET'},
44508 source_ext_match = None)
44509
44510 env = Environment(BUILDERS = {'MyBuild':b})
44511 env.MyBuild('foo.out', ['foo.in', 'foo.extra'])
44512
44513
44514 env A construction
44515 environment
44516 that can be
44517 used to fetch
44518 source code
44519 using this
44520 Builder. (Note
44521 that this envi‐
44522 ronment is not
44523 used for normal
44524 builds of nor‐
44525 mal target
44526 files, which
44527 use the envi‐
44528 ronment that
44529 was used to
44530 call the
44531 Builder for the
44532 target file.)
44533
44534 b = Builder(action="build < $SOURCE > $TARGET")
44535 env = Environment(BUILDERS = {'MyBuild' : b})
44536 env.MyBuild('foo.out', 'foo.in', my_arg = 'xyzzy')
44537
44538
44539 chdir A direc‐
44540 tory
44541 from
44542 which
44543 scons
44544 will
44545 execute
44546 the
44547 action(s)
44548 speci‐
44549 fied for
44550 this
44551 Builder.
44552 If the
44553 chdir
44554 argument
44555 is a
44556 string
44557 or a
44558 direc‐
44559 tory
44560 Node,
44561 scons
44562 will
44563 change
44564 to the
44565 speci‐
44566 fied
44567 direc‐
44568 tory.
44569 If the
44570 chdir is
44571 not a
44572 string
44573 or Node
44574 and is
44575 non-
44576 zero,
44577 then
44578 scons
44579 will
44580 change
44581 to the
44582 target
44583 file's
44584 direc‐
44585 tory.
44586
44587 Note
44588 that
44589 scons
44590 will not
44591 automat‐
44592 ically
44593 modify
44594 its
44595 expan‐
44596 sion of
44597 con‐
44598 struc‐
44599 tion
44600 vari‐
44601 ables
44602 like
44603 $TARGET
44604 and
44605 $SOURCE
44606 when
44607 using
44608 the
44609 chdir
44610 keyword
44611 argu‐
44612 ment--that
44613 is, the
44614 expanded
44615 file
44616 names
44617 will
44618 still be
44619 relative
44620 to the
44621 top-
44622 level
44623 SCon‐
44624 struct
44625 direc‐
44626 tory,
44627 and con‐
44628 se‐
44629 quently
44630 incor‐
44631 rect
44632 relative
44633 to the
44634 chdir
44635 direc‐
44636 tory.
44637 Builders
44638 created
44639 using
44640 chdir
44641 keyword
44642 argu‐
44643 ment,
44644 will
44645 need to
44646 use con‐
44647 struc‐
44648 tion
44649 variable
44650 expan‐
44651 sions
44652 like
44653 ${TAR‐
44654 GET.file}
44655 and
44656 ${SOURCE.file}
44657 to use
44658 just the
44659 filename
44660 portion
44661 of the
44662 targets
44663 and
44664 source.
44665
44666 b = Builder(action="build < ${SOURCE.file} > ${TARGET.file}",
44667 chdir=1)
44668 env = Environment(BUILDERS = {'MyBuild' : b})
44669 env.MyBuild('sub/dir/foo.out', 'sub/dir/foo.in')
44670
44671 WARNING:
44672 Python
44673 only
44674 keeps
44675 one cur‐
44676 rent
44677 direc‐
44678 tory
44679 location
44680 for all
44681 of the
44682 threads.
44683 This
44684 means
44685 that use
44686 of the
44687 chdir
44688 argument
44689 will not
44690 work
44691 with the
44692 SCons -j
44693 option,
44694 because
44695 individ‐
44696 ual
44697 worker
44698 threads
44699 spawned
44700 by SCons
44701 inter‐
44702 fere
44703 with
44704 each
44705 other
44706 when
44707 they
44708 start
44709 changing
44710 direc‐
44711 tory.
44712
44713 Any additional
44714 keyword argu‐
44715 ments supplied
44716 when a Builder
44717 object is cre‐
44718 ated (that is,
44719 when the
44720 Builder() func‐
44721 tion is called)
44722 will be set in
44723 the executing
44724 construction
44725 environment
44726 when the
44727 Builder object
44728 is called. The
44729 canonical exam‐
44730 ple here would
44731 be to set a
44732 construction
44733 variable to the
44734 repository of a
44735 source code
44736 system.
44737
44738 Any additional
44739 keyword argu‐
44740 ments supplied
44741 when a Builder
44742 object is
44743 called will
44744 only be associ‐
44745 ated with the
44746 target created
44747 by that partic‐
44748 ular Builder
44749 call (and any
44750 other files
44751 built as a
44752 result of the
44753 call).
44754
44755 These extra
44756 keyword argu‐
44757 ments are
44758 passed to the
44759 following func‐
44760 tions: command
44761 generator func‐
44762 tions, function
44763 Actions, and
44764 emitter func‐
44765 tions.
44766
44767
44768 Action Objects
44769 The Builder() function will turn its action keyword argument into an
44770 appropriate internal Action object. You can also explicity create
44771 Action objects using the Action() global function, which can then be
44772 passed to the Builder() function. This can be used to configure an
44773 Action object more flexibly, or it may simply be more efficient than
44774 letting each separate Builder object create a separate Action when mul‐
44775 tiple Builder objects need to do the same thing.
44776
44777 The Action() global function returns an appropriate object for the
44778 action represented by the type of the first argument:
44779
44780
44781 Action If the first argument is already an Action object, the object is
44782 simply returned.
44783
44784
44785 String If the first argument is a string, a command-line Action is
44786 returned. Note that the command line string may be preceded by
44787 an @ (at-sign) to suppress printing of the specified command
44788 line, or by a - (hyphen) to ignore the exit status from the
44789 specified command. Examples:
44790
44791 Action('$CC -c -o $TARGET $SOURCES')
44792
44793 # Doesn't print the line being executed.
44794 Action('@build $TARGET $SOURCES')
44795
44796 # Ignores
44797 Action('-build $TARGET $SOURCES')
44798
44799
44800
44801
44802 List If the first argument is a list, then a list of Action
44803 objects is returned. An Action object is created as nec‐
44804 essary for each element in the list. If an element
44805 within the list is itself a list, the internal list is
44806 the command and arguments to be executed via the command
44807 line. This allows white space to be enclosed in an argu‐
44808 ment by defining a command in a list within a list:
44809
44810 Action([['cc', '-c', '-DWHITE SPACE', '-o', '$TARGET', '$SOURCES']])
44811
44812
44813 Function
44814 If the first argument is a Python function, a
44815 function Action is returned. The Python function
44816 takes three keyword arguments, target (a Node
44817 object representing the target file), source (a
44818 Node object representing the source file) and env
44819 (the construction environment used for building
44820 the target file). The target and source arguments
44821 may be lists of Node objects if there is more than
44822 one target file or source file. The actual target
44823 and source file name(s) may be retrieved from
44824 their Node objects via the built-in Python str()
44825 function:
44826
44827 target_file_name = str(target)
44828 source_file_names = map(lambda x: str(x), source)
44829
44830 The function should return 0 or None to
44831 indicate a successful build of the target
44832 file(s). The function may raise an excep‐
44833 tion or return a non-zero exit status to
44834 indicate an unsuccessful build.
44835
44836 def build_it(target = None, source = None, env = None):
44837 # build the target from the source
44838 return 0
44839
44840 a = Action(build_it)
44841
44842 If the action argument is not one of the
44843 above, None is returned.
44844
44845 The second, optional argument is used to
44846 define the output which is printed when the
44847 Action is actually performed. In the
44848 absence of this parameter, or if it's an
44849 empty string, a default output depending on
44850 the type of the action is used. For exam‐
44851 ple, a command-line action will print the
44852 executed command. The argument is either a
44853 python function or a string.
44854
44855 In the first case, it's a function that
44856 returns a string to be printed to describe
44857 the action being executed. Like a function
44858 to build a file, this function takes three
44859 arguments: target (a Node object represent‐
44860 ing the target file), source (a Node object
44861 representing the source file) and env (a
44862 construction environment). The target and
44863 source arguments may be lists of Node
44864 objects if there is more than one target
44865 file or source file.
44866
44867 In the second case, you provide the string
44868 itself. The string typically contains
44869 variables, notably $TARGET(S) and
44870 $SOURCE(S), or consists of just a single
44871 variable, which is optionally defined some‐
44872 where else. SCons itself heavily uses the
44873 latter variant.
44874
44875 Examples:
44876
44877 def build_it(target, source, env):
44878 # build the target from the source
44879 return 0
44880
44881 def string_it(target, source, env):
44882 return "building '%s' from '%s'" % (target[0], source[0])
44883
44884 # Use a positional argument.
44885 f = Action(build_it, string_it)
44886 s = Action(build_it, "building '$TARGET' from '$SOURCE'")
44887
44888 # Alternatively, use a keyword argument.
44889 f = Action(build_it, strfunction=string_it)
44890 s = Action(build_it, cmdstr="building '$TARGET' from '$SOURCE'")
44891
44892 # You can provide a configurable variable.
44893 l = Action(build_it, '$STRINGIT')
44894
44895 The third, also optional argument is
44896 a list of construction variables
44897 whose values will be included in the
44898 signature of the Action when decid‐
44899 ing whether a target should be
44900 rebuilt because the action changed.
44901 This is necessary whenever you want
44902 a target to be rebuilt when a spe‐
44903 cific construction variable changes,
44904 because the underlying Python code
44905 for a function will not change when
44906 the value of the construction vari‐
44907 able does.
44908
44909 def build_it(target, source, env):
44910 # build the target from the 'XXX' construction variable
44911 open(target[0], 'w').write(env['XXX'])
44912 return 0
44913
44914 # Use positional arguments.
44915 a = Action(build_it, '$STRINGIT', ['XXX'])
44916
44917 # Alternatively, use a keyword argument.
44918 a = Action(build_it, varlist=['XXX'])
44919
44920 The Action() global function
44921 also takes a chdir keyword
44922 argument which specifies that
44923 scons will execute the action
44924 after changing to the speci‐
44925 fied directory. If the chdir
44926 argument is a string or a
44927 directory Node, scons will
44928 change to the specified
44929 directory. If the chdir
44930 argument is not a string or
44931 Node and is non-zero, then
44932 scons will change to the tar‐
44933 get file's directory.
44934
44935 Note that scons will not
44936 automatically modify its
44937 expansion of construction
44938 variables like $TARGET and
44939 $SOURCE when using the chdir
44940 keyword argument--that is,
44941 the expanded file names will
44942 still be relative to the top-
44943 level SConstruct directory,
44944 and consequently incorrect
44945 relative to the chdir direc‐
44946 tory. Builders created using
44947 chdir keyword argument, will
44948 need to use construction
44949 variable expansions like
44950 ${TARGET.file} and
44951 ${SOURCE.file} to use just
44952 the filename portion of the
44953 targets and source.
44954
44955 a = Action("build < ${SOURCE.file} > ${TARGET.file}",
44956 chdir=1)
44957
44958 The Action() global
44959 function also takes an
44960 exitstatfunc keyword
44961 argument which speci‐
44962 fies a function that
44963 is passed the exit
44964 status (or return
44965 value) from the speci‐
44966 fied action and can
44967 return an arbitrary or
44968 modified value. This
44969 can be used, for exam‐
44970 ple, to specify that
44971 an Action object's
44972 return value should be
44973 ignored and SCons
44974 should, therefore,
44975 consider that the
44976 action always suceeds:
44977
44978 def always_succeed(s):
44979 # Always return 0, which indicates success.
44980 return 0
44981 a = Action("build < ${SOURCE.file} > ${TARGET.file}",
44982 exitstatfunc=always_succeed)
44983
44984
44985 Miscellaneous Action Functions
44986 scons supplies a number of functions that arrange for various common
44987 file and directory manipulations to be performed. These are similar in
44988 concept to "tasks" in the Ant build tool, although the implementation
44989 is slightly different. These functions do not actually perform the
44990 specified action at the time the function is called, but instead return
44991 an Action object that can be executed at the appropriate time. (In
44992 Object-Oriented terminology, these are actually Action Factory func‐
44993 tions that return Action objects.)
44994
44995 In practice, there are two natural ways that these Action Functions are
44996 intended to be used.
44997
44998 First, if you need to perform the action at the time the SConscript
44999 file is being read, you can use the Execute global function to do so:
45000 Execute(Touch('file'))
45001
45002 Second, you can use these functions to supply Actions in a list
45003 for use by the Command method. This can allow you to perform
45004 more complicated sequences of file manipulation without relying
45005 on platform-specific external commands: that
45006 env = Environment(TMPBUILD = '/tmp/builddir')
45007 env.Command('foo.out', 'foo.in',
45008 [Mkdir('$TMPBUILD'),
45009 Copy('$TMPBUILD', '${SOURCE.dir}'),
45010 "cd $TMPBUILD && make",
45011 Delete('$TMPBUILD')])
45012
45013
45014 Chmod(dest, mode)
45015 Returns an Action object that changes the permis‐
45016 sions on the specified dest file or directory to
45017 the specified mode. Examples:
45018
45019 Execute(Chmod('file', 0755))
45020
45021 env.Command('foo.out', 'foo.in',
45022 [Copy('$TARGET', '$SOURCE'),
45023 Chmod('$TARGET', 0755)])
45024
45025
45026 Copy(dest, src)
45027 Returns an Action object that will copy the
45028 src source file or directory to the dest
45029 destination file or directory. Examples:
45030
45031 Execute(Copy('foo.output', 'foo.input'))
45032
45033 env.Command('bar.out', 'bar.in',
45034 Copy('$TARGET', '$SOURCE'))
45035
45036
45037 Delete(entry, [must_exist])
45038 Returns an Action that deletes the
45039 specified entry, which may be a file
45040 or a directory tree. If a directory
45041 is specified, the entire directory
45042 tree will be removed. If the
45043 must_exist flag is set, then a
45044 Python error will be thrown if the
45045 specified entry does not exist; the
45046 default is must_exist=0, that is,
45047 the Action will silently do nothing
45048 if the entry does not exist. Exam‐
45049 ples:
45050
45051 Execute(Delete('/tmp/buildroot'))
45052
45053 env.Command('foo.out', 'foo.in',
45054 [Delete('${TARGET.dir}'),
45055 MyBuildAction])
45056
45057 Execute(Delete('file_that_must_exist', must_exist=1))
45058
45059
45060 Mkdir(dir)
45061 Returns an Action that cre‐
45062 ates the specified directory
45063 dir . Examples:
45064
45065 Execute(Mkdir('/tmp/outputdir'))
45066
45067 env.Command('foo.out', 'foo.in',
45068 [Mkdir('/tmp/builddir',
45069 Copy('$SOURCE', '/tmp/builddir')
45070 "cd /tmp/builddir && ])
45071
45072
45073
45074 Move(dest, src)
45075 Returns an Action that
45076 moves the specified
45077 src file or directory
45078 to the specified dest
45079 file or directory.
45080 Examples:
45081
45082 Execute(Move('file.destination', 'file.source'))
45083
45084 env.Command('output_file', 'input_file',
45085 [MyBuildAction,
45086 Move('$TARGET', 'file_created_by_MyBuildAction')])
45087
45088
45089 Touch(file)
45090 Returns an
45091 Action that
45092 updates the
45093 modification
45094 time on the
45095 specified file.
45096 Examples:
45097
45098 Execute(Touch('file_to_be_touched'))
45099
45100 env.Command('marker', 'input_file',
45101 [MyBuildAction,
45102 Touch('$TARGET')])
45103
45104
45105 Variable Substitution
45106 Before executing a command, scons performs construction variable inter‐
45107 polation on the strings that make up the command line of builders.
45108 Variables are introduced by a $ prefix. Besides construction vari‐
45109 ables, scons provides the following variables for each command execu‐
45110 tion:
45111
45112
45113 TARGET The file name of the target being built, or the file name of the
45114 first target if multiple targets are being built.
45115
45116
45117 TARGETS
45118 The file names of all targets being built.
45119
45120
45121 SOURCE The file name of the source of the build command, or the file
45122 name of the first source if multiple sources are being built.
45123
45124
45125 SOURCES
45126 The file names of the sources of the build command.
45127
45128 (Note that the above variables are reserved and may not be set
45129 in a construction environment.)
45130
45131
45132 For example, given the construction variable CC='cc', targets=['foo'],
45133 and sources=['foo.c', 'bar.c']:
45134
45135 action='$CC -c -o $TARGET $SOURCES'
45136
45137 would produce the command line:
45138
45139 cc -c -o foo foo.c bar.c
45140
45141 Variable names may be surrounded by curly braces ({}) to
45142 separate the name from the trailing characters. Within
45143 the curly braces, a variable name may have a Python slice
45144 subscript appended to select one or more items from a
45145 list. In the previous example, the string:
45146
45147 ${SOURCES[1]}
45148
45149 would produce:
45150
45151 bar.c
45152
45153 Additionally, a variable name may have the
45154 following special modifiers appended within
45155 the enclosing curly braces to modify the
45156 interpolated string:
45157
45158
45159 base The base path of the file name,
45160 including the directory path but
45161 excluding any suffix.
45162
45163
45164 dir The name of the directory in which
45165 the file exists.
45166
45167
45168 file The file name, minus any directory
45169 portion.
45170
45171
45172 filebase
45173 Just the basename of the file, minus
45174 any suffix and minus the directory.
45175
45176
45177 suffix Just the file suffix.
45178
45179
45180 abspath
45181 The absolute path name of the file.
45182
45183
45184 posix The POSIX form of the path, with
45185 directories separated by / (forward
45186 slashes) not backslashes. This is
45187 sometimes necessary on Windows sys‐
45188 tems when a path references a file
45189 on other (POSIX) systems.
45190
45191
45192 srcpath
45193 The directory and file name to the
45194 source file linked to this file
45195 through VariantDir(). If this file
45196 isn't linked, it just returns the
45197 directory and filename unchanged.
45198
45199
45200 srcdir The directory containing the source
45201 file linked to this file through
45202 VariantDir(). If this file isn't
45203 linked, it just returns the direc‐
45204 tory part of the filename.
45205
45206
45207 rsrcpath
45208 The directory and file name to the
45209 source file linked to this file
45210 through VariantDir(). If the file
45211 does not exist locally but exists in
45212 a Repository, the path in the Repos‐
45213 itory is returned. If this file
45214 isn't linked, it just returns the
45215 directory and filename unchanged.
45216
45217
45218 rsrcdir
45219 The Repository directory containing
45220 the source file linked to this file
45221 through VariantDir(). If this file
45222 isn't linked, it just returns the
45223 directory part of the filename.
45224
45225
45226 For example, the specified target will
45227 expand as follows for the corresponding
45228 modifiers:
45229
45230 $TARGET => sub/dir/file.x
45231 ${TARGET.base} => sub/dir/file
45232 ${TARGET.dir} => sub/dir
45233 ${TARGET.file} => file.x
45234 ${TARGET.filebase} => file
45235 ${TARGET.suffix} => .x
45236 ${TARGET.abspath} => /top/dir/sub/dir/file.x
45237
45238 SConscript('src/SConscript', variant_dir='sub/dir')
45239 $SOURCE => sub/dir/file.x
45240 ${SOURCE.srcpath} => src/file.x
45241 ${SOURCE.srcdir} => src
45242
45243 Repository('/usr/repository')
45244 $SOURCE => sub/dir/file.x
45245 ${SOURCE.rsrcpath} => /usr/repository/src/file.x
45246 ${SOURCE.rsrcdir} => /usr/repository/src
45247
45248 Note that curly braces braces may
45249 also be used to enclose arbitrary
45250 Python code to be evaluated. (In
45251 fact, this is how the above modi‐
45252 fiers are substituted, they are sim‐
45253 ply attributes of the Python objects
45254 that represent TARGET, SOURCES,
45255 etc.) See the section "Python Code
45256 Substitution," below, for more thor‐
45257 ough examples of how this can be
45258 used.
45259
45260 Lastly, a variable name may be a
45261 callable Python function associated
45262 with a construction variable in the
45263 environment. The function should
45264 take four arguments: target - a list
45265 of target nodes, source - a list of
45266 source nodes, env - the construction
45267 environment, for_signature - a Bool‐
45268 ean value that specifies whether the
45269 function is being called for gener‐
45270 ating a build signature. SCons will
45271 insert whatever the called function
45272 returns into the expanded string:
45273
45274 def foo(target, source, env, for_signature):
45275 return "bar"
45276
45277 # Will expand $BAR to "bar baz"
45278 env=Environment(FOO=foo, BAR="$FOO baz")
45279
45280 You can use this feature to
45281 pass arguments to a Python
45282 function by creating a
45283 callable class that stores
45284 one or more arguments in an
45285 object, and then uses them
45286 when the __call__() method is
45287 called. Note that in this
45288 case, the entire variable
45289 expansion must be enclosed by
45290 curly braces so that the
45291 arguments will be associated
45292 with the instantiation of the
45293 class:
45294
45295 class foo:
45296 def __init__(self, arg):
45297 self.arg = arg
45298
45299 def __call__(self, target, source, env, for_signature):
45300 return self.arg + " bar"
45301
45302 # Will expand $BAR to "my argument bar baz"
45303 env=Environment(FOO=foo, BAR="${FOO('my argument')} baz")
45304
45305
45306 The special pseudo-
45307 variables $( and $)
45308 may be used to sur‐
45309 round parts of a com‐
45310 mand line that may
45311 change without causing
45312 a rebuild--that is,
45313 which are not included
45314 in the signature of
45315 target files built
45316 with this command.
45317 All text between $(
45318 and $) will be removed
45319 from the command line
45320 before it is added to
45321 file signatures, and
45322 the $( and $) will be
45323 removed before the
45324 command is executed.
45325 For example, the com‐
45326 mand line:
45327
45328 echo Last build occurred $( $TODAY $). > $TARGET
45329
45330
45331 would execute
45332 the command:
45333
45334 echo Last build occurred $TODAY. > $TARGET
45335
45336
45337 but the
45338 command
45339 signa‐
45340 ture
45341 added to
45342 any tar‐
45343 get
45344 files
45345 would
45346 be:
45347
45348 echo Last build occurred . > $TARGET
45349
45350
45351 Python Code Substitution
45352 Any python code within ${-} pairs gets evaluated by python 'eval', with
45353 the python globals set to the current environment's set of construction
45354 variables. So in the following case:
45355 env['COND'] = 0
45356 env.Command('foo.out', 'foo.in',
45357 '''echo ${COND==1 and 'FOO' or 'BAR'} > $TARGET''')
45358 the command executed will be either
45359 echo FOO > foo.out
45360 or
45361 echo BAR > foo.out
45362 according to the current value of env['COND'] when
45363 the command is executed. The evaluation occurs
45364 when the target is being built, not when the SCon‐
45365 script is being read. So if env['COND'] is
45366 changed later in the SConscript, the final value
45367 will be used.
45368
45369 Here's a more interesting example. Note that all
45370 of COND, FOO, and BAR are environment variables,
45371 and their values are substituted into the final
45372 command. FOO is a list, so its elements are
45373 interpolated separated by spaces.
45374
45375 env=Environment()
45376 env['COND'] = 0
45377 env['FOO'] = ['foo1', 'foo2']
45378 env['BAR'] = 'barbar'
45379 env.Command('foo.out', 'foo.in',
45380 'echo ${COND==1 and FOO or BAR} > $TARGET')
45381
45382 # Will execute this:
45383 # echo foo1 foo2 > foo.out
45384
45385 SCons uses the following rules when con‐
45386 verting construction variables into command
45387 lines:
45388
45389
45390 String When the value is a string it is
45391 interpreted as a space delimited
45392 list of command line arguments.
45393
45394
45395 List When the value is a list it is
45396 interpreted as a list of command
45397 line arguments. Each element of the
45398 list is converted to a string.
45399
45400
45401 Other Anything that is not a list or
45402 string is converted to a string and
45403 interpreted as a single command line
45404 argument.
45405
45406
45407 Newline
45408 Newline characters (\n) delimit
45409 lines. The newline parsing is done
45410 after all other parsing, so it is
45411 not possible for arguments (e.g.
45412 file names) to contain embedded new‐
45413 line characters. This limitation
45414 will likely go away in a future ver‐
45415 sion of SCons.
45416
45417
45418 Scanner Objects
45419 You can use the Scanner function to define objects to scan new file
45420 types for implicit dependencies. Scanner accepts the following argu‐
45421 ments:
45422
45423
45424 function
45425 This can be either: 1) a Python function that will process the
45426 Node (file) and return a list of strings (file names) represent‐
45427 ing the implicit dependencies found in the contents; or: 2) a
45428 dictionary that maps keys (typically the file suffix, but see
45429 below for more discussion) to other Scanners that should be
45430 called.
45431
45432 If the argument is actually a Python function, the function must
45433 take three or four arguments:
45434
45435 def scanner_function(node, env, path):
45436
45437 def scanner_function(node, env, path, arg=None):
45438
45439 The node argument is the internal SCons node representing the
45440 file. Use str(node) to fetch the name of the file, and
45441 node.get_contents() to fetch contents of the file. Note that
45442 the file is not guaranteed to exist before the scanner is
45443 called, so the scanner function should check that if there's any
45444 chance that the scanned file might not exist (for example, if
45445 it's built from other files).
45446
45447 The env argument is the construction environment for the scan.
45448 Fetch values from it using the env.Dictionary() method.
45449
45450 The path argument is a tuple (or list) of directories that can
45451 be searched for files. This will usually be the tuple returned
45452 by the path_function argument (see below).
45453
45454 The arg argument is the argument supplied when the scanner was
45455 created, if any.
45456
45457
45458 name The name of the Scanner. This is mainly used to identify the
45459 Scanner internally.
45460
45461
45462 argument
45463 An optional argument that, if specified, will be passed to the
45464 scanner function (described above) and the path function (speci‐
45465 fied below).
45466
45467
45468 skeys An optional list that can be used to determine which scanner
45469 should be used for a given Node. In the usual case of scanning
45470 for file names, this argument will be a list of suffixes for the
45471 different file types that this Scanner knows how to scan. If
45472 the argument is a string, then it will be expanded into a list
45473 by the current environment.
45474
45475
45476 path_function
45477 A Python function that takes four or five arguments: a construc‐
45478 tion environment, a Node for the directory containing the SCon‐
45479 script file in which the first target was defined, a list of
45480 target nodes, a list of source nodes, and an optional argument
45481 supplied when the scanner was created. The path_function
45482 returns a tuple of directories that can be searched for files to
45483 be returned by this Scanner object. (Note that the Find‐
45484 PathDirs() function can be used to return a ready-made
45485 path_function for a given construction variable name, instead of
45486 having to write your own function from scratch.)
45487
45488
45489 node_class
45490 The class of Node that should be returned by this Scanner
45491 object. Any strings or other objects returned by the scanner
45492 function that are not of this class will be run through the
45493 node_factory function.
45494
45495
45496 node_factory
45497 A Python function that will take a string or other object and
45498 turn it into the appropriate class of Node to be returned by
45499 this Scanner object.
45500
45501
45502 scan_check
45503 An optional Python function that takes two arguments, a Node
45504 (file) and a construction environment, and returns whether the
45505 Node should, in fact, be scanned for dependencies. This check
45506 can be used to eliminate unnecessary calls to the scanner func‐
45507 tion when, for example, the underlying file represented by a
45508 Node does not yet exist.
45509
45510
45511 recursive
45512 An optional flag that specifies whether this scanner should be
45513 re-invoked on the dependency files returned by the scanner.
45514 When this flag is not set, the Node subsystem will only invoke
45515 the scanner on the file being scanned, and not (for example)
45516 also on the files specified by the #include lines in the file
45517 being scanned. recursive may be a callable function, in which
45518 case it will be called with a list of Nodes found and should
45519 return a list of Nodes that should be scanned recursively; this
45520 can be used to select a specific subset of Nodes for additional
45521 scanning.
45522
45523 Note that scons has a global SourceFileScanner object that is
45524 used by the Object(), SharedObject(), and StaticObject()
45525 builders to decide which scanner should be used for different
45526 file extensions. You can using the SourceFileScanner.add_scan‐
45527 ner() method to add your own Scanner object to the scons infra‐
45528 structure that builds target programs or libraries from a list
45529 of source files of different types:
45530
45531 def xyz_scan(node, env, path):
45532 contents = node.get_contents()
45533 # Scan the contents and return the included files.
45534
45535 XYZScanner = Scanner(xyz_scan)
45536
45537 SourceFileScanner.add_scanner('.xyx', XYZScanner)
45538
45539 env.Program('my_prog', ['file1.c', 'file2.f', 'file3.xyz'])
45540
45541
45543 SCons and its configuration files are very portable, due largely to its
45544 implementation in Python. There are, however, a few portability issues
45545 waiting to trap the unwary.
45546
45547 .C file suffix
45548 SCons handles the upper-case .C file suffix differently, depending on
45549 the capabilities of the underlying system. On a case-sensitive system
45550 such as Linux or UNIX, SCons treats a file with a .C suffix as a C++
45551 source file. On a case-insensitive system such as Windows, SCons
45552 treats a file with a .C suffix as a C source file.
45553
45554 .F file suffix
45555 SCons handles the upper-case .F file suffix differently, depending on
45556 the capabilities of the underlying system. On a case-sensitive system
45557 such as Linux or UNIX, SCons treats a file with a .F suffix as a For‐
45558 tran source file that is to be first run through the standard C pre‐
45559 processor. On a case-insensitive system such as Windows, SCons treats
45560 a file with a .F suffix as a Fortran source file that should not be run
45561 through the C preprocessor.
45562
45563 Windows: Cygwin Tools and Cygwin Python vs. Windows Pythons
45564 Cygwin supplies a set of tools and utilities that let users work on a
45565 Windows system using a more POSIX-like environment. The Cygwin tools,
45566 including Cygwin Python, do this, in part, by sharing an ability to
45567 interpret UNIX-like path names. For example, the Cygwin tools will
45568 internally translate a Cygwin path name like /cygdrive/c/mydir to an
45569 equivalent Windows pathname of C:/mydir (equivalent to C:\mydir).
45570
45571 Versions of Python that are built for native Windows execution, such as
45572 the python.org and ActiveState versions, do not have the Cygwin path
45573 name semantics. This means that using a native Windows version of
45574 Python to build compiled programs using Cygwin tools (such as gcc,
45575 bison, and flex) may yield unpredictable results. "Mixing and match‐
45576 ing" in this way can be made to work, but it requires careful attention
45577 to the use of path names in your SConscript files.
45578
45579 In practice, users can sidestep the issue by adopting the following
45580 rules: When using gcc, use the Cygwin-supplied Python interpreter to
45581 run SCons; when using Microsoft Visual C/C++ (or some other Windows
45582 compiler) use the python.org or ActiveState version of Python to run
45583 SCons.
45584
45585 Windows: scons.bat file
45586 On Windows systems, SCons is executed via a wrapper scons.bat file.
45587 This has (at least) two ramifications:
45588
45589 First, Windows command-line users that want to use variable assignment
45590 on the command line may have to put double quotes around the assign‐
45591 ments:
45592
45593 scons "FOO=BAR" "BAZ=BLEH"
45594
45595 Second, the Cygwin shell does not recognize this file as being
45596 the same as an scons command issued at the command-line prompt.
45597 You can work around this either by executing scons.bat from the
45598 Cygwin command line, or by creating a wrapper shell script named
45599 scons .
45600
45601
45602 MinGW
45603 The MinGW bin directory must be in your PATH environment variable or
45604 the PATH variable under the ENV construction variable for SCons to
45605 detect and use the MinGW tools. When running under the native Windows
45606 Python interpreter, SCons will prefer the MinGW tools over the Cygwin
45607 tools, if they are both installed, regardless of the order of the bin
45608 directories in the PATH variable. If you have both MSVC and MinGW
45609 installed and you want to use MinGW instead of MSVC, then you must
45610 explictly tell SCons to use MinGW by passing
45611
45612 tools=['mingw']
45613
45614 to the Environment() function, because SCons will prefer the
45615 MSVC tools over the MinGW tools.
45616
45617
45619 To help you get started using SCons, this section contains a brief
45620 overview of some common tasks.
45621
45622
45623 Basic Compilation From a Single Source File
45624 env = Environment()
45625 env.Program(target = 'foo', source = 'foo.c')
45626
45627 Note: Build the file by specifying the target as an argument
45628 ("scons foo" or "scons foo.exe"). or by specifying a dot
45629 ("scons .").
45630
45631
45632 Basic Compilation From Multiple Source Files
45633 env = Environment()
45634 env.Program(target = 'foo', source = Split('f1.c f2.c f3.c'))
45635
45636
45637 Setting a Compilation Flag
45638 env = Environment(CCFLAGS = '-g')
45639 env.Program(target = 'foo', source = 'foo.c')
45640
45641
45642 Search The Local Directory For .h Files
45643 Note: You do not need to set CCFLAGS to specify -I options by hand.
45644 SCons will construct the right -I options from CPPPATH.
45645
45646 env = Environment(CPPPATH = ['.'])
45647 env.Program(target = 'foo', source = 'foo.c')
45648
45649
45650 Search Multiple Directories For .h Files
45651 env = Environment(CPPPATH = ['include1', 'include2'])
45652 env.Program(target = 'foo', source = 'foo.c')
45653
45654
45655 Building a Static Library
45656 env = Environment()
45657 env.StaticLibrary(target = 'foo', source = Split('l1.c l2.c'))
45658 env.StaticLibrary(target = 'bar', source = ['l3.c', 'l4.c'])
45659
45660
45661 Building a Shared Library
45662 env = Environment()
45663 env.SharedLibrary(target = 'foo', source = ['l5.c', 'l6.c'])
45664 env.SharedLibrary(target = 'bar', source = Split('l7.c l8.c'))
45665
45666
45667 Linking a Local Library Into a Program
45668 env = Environment(LIBS = 'mylib', LIBPATH = ['.'])
45669 env.Library(target = 'mylib', source = Split('l1.c l2.c'))
45670 env.Program(target = 'prog', source = ['p1.c', 'p2.c'])
45671
45672
45673 Defining Your Own Builder Object
45674 Notice that when you invoke the Builder, you can leave off the target
45675 file suffix, and SCons will add it automatically.
45676
45677 bld = Builder(action = 'pdftex < $SOURCES > $TARGET'
45678 suffix = '.pdf',
45679 src_suffix = '.tex')
45680 env = Environment(BUILDERS = {'PDFBuilder' : bld})
45681 env.PDFBuilder(target = 'foo.pdf', source = 'foo.tex')
45682
45683 # The following creates "bar.pdf" from "bar.tex"
45684 env.PDFBuilder(target = 'bar', source = 'bar')
45685
45686 Note also that the above initialization overwrites the default
45687 Builder objects, so the Environment created above can not be
45688 used call Builders like env.Program(), env.Object(), env.Stati‐
45689 cLibrary(), etc.
45690
45691
45692 Adding Your Own Builder Object to an Environment
45693 bld = Builder(action = 'pdftex < $SOURCES > $TARGET'
45694 suffix = '.pdf',
45695 src_suffix = '.tex')
45696 env = Environment()
45697 env.Append(BUILDERS = {'PDFBuilder' : bld})
45698 env.PDFBuilder(target = 'foo.pdf', source = 'foo.tex')
45699 env.Program(target = 'bar', source = 'bar.c')
45700
45701 You also can use other Pythonic techniques to add to the
45702 BUILDERS construction variable, such as:
45703
45704 env = Environment()
45705 env['BUILDERS]['PDFBuilder'] = bld
45706
45707
45708 Defining Your Own Scanner Object
45709 The following example shows an extremely simple scanner (the
45710 kfile_scan() function) that doesn't use a search path at all and simply
45711 returns the file names present on any include lines in the scanned
45712 file. This would implicitly assume that all included files live in the
45713 top-level directory:
45714
45715 import re
45716
45717 include_re = re.compile(r'^include\s+(\S+)$', re.M)
45718
45719 def kfile_scan(node, env, path, arg):
45720 contents = node.get_contents()
45721 includes = include_re.findall(contents)
45722 return includes
45723
45724 kscan = Scanner(name = 'kfile',
45725 function = kfile_scan,
45726 argument = None,
45727 skeys = ['.k'])
45728 scanners = Environment().Dictionary('SCANNERS')
45729 env = Environment(SCANNERS = scanners + [kscan])
45730
45731 env.Command('foo', 'foo.k', 'kprocess < $SOURCES > $TARGET')
45732
45733 bar_in = File('bar.in')
45734 env.Command('bar', bar_in, 'kprocess $SOURCES > $TARGET')
45735 bar_in.target_scanner = kscan
45736
45737 Here is a similar but more complete example that searches a path
45738 of directories (specified as the MYPATH construction variable)
45739 for files that actually exist:
45740
45741 include_re = re.compile(r'^include\s+(\S+)$', re.M)
45742
45743 def my_scan(node, env, path, arg):
45744 contents = node.get_contents()
45745 includes = include_re.findall(contents)
45746 if includes == []:
45747 return []
45748 results = []
45749 for inc in includes:
45750 for dir in path:
45751 file = dir + os.sep + inc
45752 if os.path.exists(file):
45753 results.append(file)
45754 break
45755 return results
45756
45757 scanner = Scanner(name = 'myscanner',
45758 function = my_scan,
45759 argument = None,
45760 skeys = ['.x'],
45761 path_function = FindPathDirs('MYPATH'),
45762 )
45763 scanners = Environment().Dictionary('SCANNERS')
45764 env = Environment(SCANNERS = scanners + [scanner])
45765
45766 The FindPathDirs() function used in the previous example
45767 returns a function (actually a callable Python object)
45768 that will return a list of directories specified in the
45769 $MYPATH construction variable. If you need to customize
45770 how the search path is derived, you would provide your
45771 own path_function argument when creating the Scanner
45772 object, as follows:
45773
45774 # MYPATH is a list of directories to search for files in
45775 def pf(env, dir, target, source, arg):
45776 top_dir = Dir('#').abspath
45777 results = []
45778 if env.has_key('MYPATH'):
45779 for p in env['MYPATH']:
45780 results.append(top_dir + os.sep + p)
45781 return results
45782
45783 scanner = Scanner(name = 'myscanner',
45784 function = my_scan,
45785 argument = None,
45786 skeys = ['.x'],
45787 path_function = pf,
45788 )
45789
45790
45791 Creating a Hierarchical Build
45792 Notice that the file names specified in a subdirectory's SConscript
45793 file are relative to that subdirectory.
45794
45795 SConstruct:
45796
45797 env = Environment()
45798 env.Program(target = 'foo', source = 'foo.c')
45799
45800 SConscript('sub/SConscript')
45801
45802 sub/SConscript:
45803
45804 env = Environment()
45805 # Builds sub/foo from sub/foo.c
45806 env.Program(target = 'foo', source = 'foo.c')
45807
45808 SConscript('dir/SConscript')
45809
45810 sub/dir/SConscript:
45811
45812 env = Environment()
45813 # Builds sub/dir/foo from sub/dir/foo.c
45814 env.Program(target = 'foo', source = 'foo.c')
45815
45816
45817 Sharing Variables Between SConscript Files
45818 You must explicitly Export() and Import() variables that you want to
45819 share between SConscript files.
45820
45821 SConstruct:
45822
45823 env = Environment()
45824 env.Program(target = 'foo', source = 'foo.c')
45825
45826 Export("env")
45827 SConscript('subdirectory/SConscript')
45828
45829 subdirectory/SConscript:
45830
45831 Import("env")
45832 env.Program(target = 'foo', source = 'foo.c')
45833
45834
45835 Building Multiple Variants From the Same Source
45836 Use the variant_dir keyword argument to the SConscript function to
45837 establish one or more separate variant build directory trees for a
45838 given source directory:
45839
45840 SConstruct:
45841
45842 cppdefines = ['FOO']
45843 Export("cppdefines")
45844 SConscript('src/SConscript', variant_dir='foo')
45845
45846 cppdefines = ['BAR']
45847 Export("cppdefines")
45848 SConscript('src/SConscript', variant_dir='bar')
45849
45850 src/SConscript:
45851
45852 Import("cppdefines")
45853 env = Environment(CPPDEFINES = cppdefines)
45854 env.Program(target = 'src', source = 'src.c')
45855
45856 Note the use of the Export() method to set the "cppdefines"
45857 variable to a different value each time we call the SConscript
45858 function.
45859
45860
45861 Hierarchical Build of Two Libraries Linked With a Program
45862 SConstruct:
45863
45864 env = Environment(LIBPATH = ['#libA', '#libB'])
45865 Export('env')
45866 SConscript('libA/SConscript')
45867 SConscript('libB/SConscript')
45868 SConscript('Main/SConscript')
45869
45870 libA/SConscript:
45871
45872 Import('env')
45873 env.Library('a', Split('a1.c a2.c a3.c'))
45874
45875 libB/SConscript:
45876
45877 Import('env')
45878 env.Library('b', Split('b1.c b2.c b3.c'))
45879
45880 Main/SConscript:
45881
45882 Import('env')
45883 e = env.Copy(LIBS = ['a', 'b'])
45884 e.Program('foo', Split('m1.c m2.c m3.c'))
45885
45886 The '#' in the LIBPATH directories specify that they're relative
45887 to the top-level directory, so they don't turn into "Main/libA"
45888 when they're used in Main/SConscript.
45889
45890 Specifying only 'a' and 'b' for the library names allows SCons
45891 to append the appropriate library prefix and suffix for the cur‐
45892 rent platform (for example, 'liba.a' on POSIX systems,
45893
45894
45895 Customizing construction variables from the command line.
45896 The following would allow the C compiler to be specified on the command
45897 line or in the file custom.py.
45898
45899 vars = Variables('custom.py')
45900 vars.Add('CC', 'The C compiler.')
45901 env = Environment(variables=vars)
45902 Help(vars.GenerateHelpText(env))
45903
45904 The user could specify the C compiler on the command line:
45905
45906 scons "CC=my_cc"
45907
45908 or in the custom.py file:
45909
45910 CC = 'my_cc'
45911
45912 or get documentation on the options:
45913
45914 $ scons -h
45915
45916 CC: The C compiler.
45917 default: None
45918 actual: cc
45919
45920
45921
45922 Using Microsoft Visual C++ precompiled headers
45923 Since windows.h includes everything and the kitchen sink, it can take
45924 quite some time to compile it over and over again for a bunch of object
45925 files, so Microsoft provides a mechanism to compile a set of headers
45926 once and then include the previously compiled headers in any object
45927 file. This technology is called precompiled headers. The general recipe
45928 is to create a file named "StdAfx.cpp" that includes a single header
45929 named "StdAfx.h", and then include every header you want to precompile
45930 in "StdAfx.h", and finally include "StdAfx.h" as the first header in
45931 all the source files you are compiling to object files. For example:
45932
45933 StdAfx.h:
45934 #include <windows.h>
45935 #include <my_big_header.h>
45936
45937 StdAfx.cpp:
45938 #include <StdAfx.h>
45939
45940 Foo.cpp:
45941 #include <StdAfx.h>
45942
45943 /* do some stuff */
45944
45945 Bar.cpp:
45946 #include <StdAfx.h>
45947
45948 /* do some other stuff */
45949
45950 SConstruct:
45951 env=Environment()
45952 env['PCHSTOP'] = 'StdAfx.h'
45953 env['PCH'] = env.PCH('StdAfx.cpp')[0]
45954 env.Program('MyApp', ['Foo.cpp', 'Bar.cpp'])
45955
45956 For more information see the docu‐
45957 ment for the PCH builder, and the
45958 PCH and PCHSTOP construction vari‐
45959 ables. To learn about the details of
45960 precompiled headers consult the MSDN
45961 documention for /Yc, /Yu, and /Yp.
45962
45963
45964 Using Microsoft Visual C++ external debugging information
45965 Since including debugging information in programs and shared libraries
45966 can cause their size to increase significantly, Microsoft provides a
45967 mechanism for including the debugging information in an external file
45968 called a PDB file. SCons supports PDB files through the PDB construc‐
45969 tion variable.
45970
45971 SConstruct:
45972 env=Environment()
45973 env['PDB'] = 'MyApp.pdb'
45974 env.Program('MyApp', ['Foo.cpp', 'Bar.cpp'])
45975
45976 For more information see the document for the PDB construction
45977 variable.
45978
45979
45981 SCONS_LIB_DIR
45982 Specifies the directory that contains the SCons Python module
45983 directory (e.g. /home/aroach/scons-src-0.01/src/engine).
45984
45985
45986 SCONSFLAGS
45987 A string of options that will be used by scons in addition to
45988 those passed on the command line.
45989
45990
45992 scons User Manual, scons Design Document, scons source code.
45993
45994
45996 Steven Knight <knight@baldmt.com>
45997 Anthony Roach <aroach@electriceyeball.com>
45998
45999
46000
46001
46002 May 2008 SCONS(1)