From 9b8cca83a8889b64c07cd4bb12e8642ad9ffddbb Mon Sep 17 00:00:00 2001 From: stevenknight Date: Tue, 9 Apr 2002 15:31:46 +0000 Subject: [PATCH] Add a better hierarchical build example from the scons-users mailing list. git-svn-id: http://scons.tigris.org/svn/scons/trunk@324 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- doc/man/scons.1 | 37 +++++++++++++++++++++++++++++++++++++ src/CHANGES.txt | 5 +++++ 2 files changed, 42 insertions(+) diff --git a/doc/man/scons.1 b/doc/man/scons.1 index cedfc2e6..116a5f79 100644 --- a/doc/man/scons.1 +++ b/doc/man/scons.1 @@ -1905,6 +1905,43 @@ Note the use of the Export() method 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 diff --git a/src/CHANGES.txt b/src/CHANGES.txt index e2a46e22..173fea64 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -18,6 +18,8 @@ RELEASE 0.07 - - 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. @@ -30,6 +32,9 @@ RELEASE 0.07 - - 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 -- 2.26.2