From: stevenknight Date: Fri, 22 Nov 2002 21:52:31 +0000 (+0000) Subject: Document the fact that Builder calls return Node objects. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5f8cde591afb46efb91f3fcf1f71d11aa931580a;p=scons.git Document the fact that Builder calls return Node objects. git-svn-id: http://scons.tigris.org/svn/scons/trunk@499 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/doc/man/scons.1 b/doc/man/scons.1 index 25b046c3..895742c6 100644 --- a/doc/man/scons.1 +++ b/doc/man/scons.1 @@ -867,6 +867,28 @@ or generate a shared library with a nonstandard suffix: env.SharedLibrary('word', 'word.cpp', SHLIBSUFFIX='.ocx') .EE +All builders return an object +representing the target that will be created. +This object may be used as a source for +another build, +or in any other context in +which a file name would otherwise be specified. +For example, if it were necessary +to add a specific +.B -D +flag when compiling one specific object file: + +.ES +bar_obj = env.StaticObject('bar.c', CCFLAGS='-DBAR') +env.Program(source = ['foo.c', bar_obj, 'main.c']) +.EE + +Using an object in this way +makes for a more portable build +by avoiding having to specify +a platform-specific object suffix +when calling the Program() builder. + .B scons provides the following builders: diff --git a/src/CHANGES.txt b/src/CHANGES.txt index ebb9f72a..957209f1 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -54,6 +54,8 @@ RELEASE 0.09 - - Add separate $SHOBJPREFIX and $SHOBJSUFFIX construction variables (by default, the same as $OBJPREFIX and $OBJSUFFIX). + - Man page: document the fact that Builder calls return Node objects. + From Steve LeBlanc: - Refactor option processing to use our own version of Greg Ward's