1. anatoly techtonik
  2. scons-selected-branches

Commits

Steven Knight  committed d027e1b

Add a better hierarchical build example from the scons-users mailing list.

  • Participants
  • Parent commits 3e066fe
  • Branches default

Comments (0)

Files changed (2)

File doc/man/scons.1

View file
 to set the "ccflags" variable to a different
 value for each variant build.
 
+.SS Hierarchical Build of Two Libraries Linked With a Program
+
+.ES
+SConstruct:
+
+    env = Environment(LIBPATH = ['#libA', '#libB'])
+    Export('env')
+    SConscript('libA/SConscript')
+    SConscript('libB/SConscript')
+    SConscript('Main/SConscript')
+
+libA/SConscript:
+
+    Import('env')
+    env.Library('a', 'a1.c a2.c a3.c')
+
+libB/SConscript:                                                  
+    Import('env')
+    env.Library('b', 'b1.c b2.c b3.c')
+
+Main/SConscript:
+
+    Import('env')
+    e = env.Copy(LIBS = ['a', ','b'])
+    e.Program('foo', 'm1.c m2.c m3.c')
+.EE
+
+The '#' in the LIBPATH directories specify that they're relative to the
+top-level directory, so they don't turn into "Main/libA" when they're
+used in Main/SConscript.
+
+Specifying only 'a' and 'b' for the library names
+allows SCons to append the appropriate library
+prefix and suffix for the current platform
+(for example, 'liba.a' on POSIX systems,
+'a.lib' on Windows).
+
 .SH ENVIRONMENT
 
 .IP SCONS_LIB_DIR

File src/CHANGES.txt

View file
 
   - Fix so that -c -n does *not* remove the targets!
 
+  - Man page:  Add a hierarchical libraries + Program example.
+
   From Anthony Roach:
 
   - Fix --debug=tree when used with directory targets.
 
   - Performance improvement in construction variable substitution.
 
+  - Implemented caching of content signatures, plus added --max-drift
+    option to control caching.
+
 
 
 RELEASE 0.06 - Thu, 28 Mar 2002 01:24:29 -0600