Penguin

Differences between version 8 and predecessor to the previous major change of MakeToSCons.

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 8 Last edited on Monday, October 11, 2004 10:59:33 pm by SamJansen Revert
Older page: version 7 Last edited on Friday, June 4, 2004 11:23:00 am by SamJansen Revert
@@ -54,11 +54,19 @@
 It is simplicity itself to include multiple files in the build. Remember that SCons is Python-based? 
  
  # SConstruct file 
  import glob 
- Library(glob.glob('*.c') + glob.gloc ('source_dir_2/*.cc'), 'sam') 
+ Library(glob.glob('*.c') + glob.glob ('source_dir_2/*.cc'), 'sam') 
  
 Python's ''glob'' module does all the hard work. Again, full dependency tracking and all other features of SCons work correctly. 
  
 !! Hierarchical builds 
  
 SCons supports hierarchical builds with the use of the ''SConscript'' directive. These scripts will be read and their information processed. A new SCons is not forked for every ''SConscript'' directive, unlike the usual recursive make solution. 
+  
+Including other directories in the build is as simple as:  
+  
+ # SConstruct file  
+ SConscript("dir1/")  
+ SConscript("dir2/")  
+  
+This will read in the ''SConscript'' files in ''dir1'' and ''dir2''. It is possible to export environments to these other scripts if needs be.