diff options
author | Steven Knight <knight@baldmt.com> | 2003-02-18 08:04:29 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2003-02-18 08:04:29 (GMT) |
commit | 5aaf9d3bad67e5ac33a342478e4449e4c71f039c (patch) | |
tree | 9b62b6fab5539b7ef535182b0fe29b05acd4baff /doc | |
parent | bdbeeed7d1492c270c24d809237eb5f724c7cbf5 (diff) | |
download | SCons-5aaf9d3bad67e5ac33a342478e4449e4c71f039c.zip SCons-5aaf9d3bad67e5ac33a342478e4449e4c71f039c.tar.gz SCons-5aaf9d3bad67e5ac33a342478e4449e4c71f039c.tar.bz2 |
Add support for fetching files from rcs.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/man/scons.1 | 281 |
1 files changed, 279 insertions, 2 deletions
diff --git a/doc/man/scons.1 b/doc/man/scons.1 index 1bf9157..f026b72 100644 --- a/doc/man/scons.1 +++ b/doc/man/scons.1 @@ -1349,6 +1349,45 @@ env.Append(CCFLAGS = ' -g', FOO = ['foo.yyy']) .EE .TP +.RI BitKeeper( repository ", " module ) +A factory function that +returns a Builder object +to be used to fetch source files +from the specified +BitKeeper +.IR repository . +The returned Builder +is intended to be passed to the +.B SourceCode +function. + +The optional specified +.I module +will be added to the beginning +of all repository path names; +this can be used, in essence, +to strip initial directory names +from the repository path names, +so that you only have to +replicate part of the repository +directory hierarchy in your +local build directory: + +.ES +# Will fetch foo/bar/src.c +# from /usr/local/BKsources/foo/bar/src.c. +env.SourceCode('.', env.BitKeeper('/usr/local/BKsources')) + +# Will fetch bar/src.c +# from /usr/local/BKsources/foo/bar/src.c. +env.SourceCode('.', env.BitKeeper('/usr/local/BKsources', 'foo')) + +# Will fetch src.c +# from /usr/local/BKsources/foo/bar/src.c. +env.SourceCode('.', env.BitKeeper('/usr/local/BKsources', 'foo/bar')) +.EE + +.TP .RI Command( target ", " source ", " commands ) Executes a specific action (or list of actions) @@ -1394,6 +1433,45 @@ env3 = env.Copy(CCFLAGS = '-g') .EE .TP +.RI CVS( repository ", " module ) +A factory function that +returns a Builder object +to be used to fetch source files +from the specified +CVS +.IR repository . +The returned Builder +is intended to be passed to the +.B SourceCode +function. + +The optional specified +.I module +will be added to the beginning +of all repository path names; +this can be used, in essence, +to strip initial directory names +from the repository path names, +so that you only have to +replicate part of the repository +directory hierarchy in your +local build directory: + +.ES +# Will fetch foo/bar/src.c +# from /usr/local/CVSROOT/foo/bar/src.c. +env.SourceCode('.', env.CVS('/usr/local/CVSROOT')) + +# Will fetch bar/src.c +# from /usr/local/CVSROOT/foo/bar/src.c. +env.SourceCode('.', env.CVS('/usr/local/CVSROOT', 'foo')) + +# Will fetch src.c +# from /usr/local/CVSROOT/foo/bar/src.c. +env.SourceCode('.', env.CVS('/usr/local/CVSROOT', 'foo/bar')) +.EE + +.TP .RI Depends( target ", " dependency ) Specifies an explicit dependency; the target file(s) will be rebuilt @@ -1487,16 +1565,43 @@ env.Prepend(CCFLAGS = '-g ', FOO = ['foo.yyy']) .EE .TP +.RI RCS( ) +A factory function that +returns a Builder object +to be used to fetch source files +from RCS. +The returned Builder +is intended to be passed to the +.B SourceCode +function: +.ES +env.SourceCode('.', env.RCS()) +.EE + +.TP .RI Replace( key = val ", [...])" Replaces construction variables in the Environment with the specified keyword arguments. -(Note: "Update()" is a deprecated synonym for this method.) .ES env.Replace(CCFLAGS = '-g', FOO = 'foo.xxx') .EE .TP +.RI SCCS( ) +A factory function that +returns a Builder object +to be used to fetch source files +from SCCS. +The returned Builder +is intended to be passed to the +.B SourceCode +function: +.ES +env.SourceCode('.', env.SCCS()) +.EE + +.TP .RI SideEffect( side_effect , target ) Declares .I side_effect @@ -1520,6 +1625,96 @@ Consequently, you only need to use this method for side-effect targets that are built as a result of multiple build commands. +.TP +.RI SourceCode( entries , builder ) +Arrange for non-existent source files to +be fetched from a source code system +using the specified +.IR builder . +The specified +.I entries +may be a Node, string or list of both, +and may represent either individual +source files or directories in which +source files can be found. +For any non-existent source files, +.B scons +will search up the directory tree +and use the first +.B SourceCode +builder it finds. +The specified +.I builder +may be +.BR None , +in which case +.B scons +will not use a builder to fetch +source files for the specified +.IR entries , +even if a +.B SourceCode +builder has been specified +for a directory higher up the tree. +Note that if the specified +.I builder +is one you create by hand, +it must have an associated +construction environment to use +when fetching a source file. +.B scons +provides a set of canned factory +functions that return appropriate +Builders for various popular +source code management systems. +Canonical examples of invocation include: +.ES +env.SourceCode('.', env.BitKeeper('/usr/local/BKsources')) +env.SourceCode('src', env.CVS('/usr/local/CVSROOT')) +env.SourceCode('/', env.RCS()) +env.SourceCode(['f1.c', 'f2.c'], env.SCCS()) +env.SourceCode('.', env.Subversion('file:///usr/local/Subversion')) +env.SourceCode('no_source.c', None) +.EE + +.TP +.RI Subversion( repository ", " module ) +A factory function that +returns a Builder object +to be used to fetch source files +from the specified Subversion +.IR repository . +The returned Builder +is intended to be passed to the +.B SourceCode +function. + +The optional specified +.I module +will be added to the beginning +of all repository path names; +this can be used, in essence, +to strip initial directory names +from the repository path names, +so that you only have to +replicate part of the repository +directory hierarchy in your +local build directory: + +.ES +# Will fetch foo/bar/src.c +# from /usr/local/Subversion/foo/bar/src.c. +env.SourceCode('.', env.Subversion('file:///usr/local/Subversion')) + +# Will fetch bar/src.c +# from /usr/local/Subversion/foo/bar/src.c. +env.SourceCode('.', env.Subversion('file:///usr/local/Subversion', 'foo')) + +# Will fetch src.c +# from /usr/local/Subversion/foo/bar/src.c. +env.SourceCode('.', env.Subversion('file:///usr/local/Subversion', 'foo/bar')) +.EE + .SS Construction Variables .\" XXX From Gary Ruben, 23 April 2002: .\" I think it would be good to have an example with each construction @@ -1570,6 +1765,16 @@ after first running the file through the C preprocessor. Any options specified in the $ASFLAGS and $CPPFLAGS construction variables are included on this command line. +.IP BITKEEPER +The BitKeeper executable. + +.IP BITKEEPERCOM +The command line used to +fetch source files from a BitKeeper repository. + +.IP BITKEEPERFLAGS +General options that are passed to BitKeeper. + .IP BUILDERS A dictionary mapping the names of the builders available through this environment @@ -1619,6 +1824,15 @@ SCons also treats (upper case) files as C files. +.IP CO +The RCS "checkout" executable, +used to fetch source files from RCS. +See the related variables +.B RCSCOM +and +.BR RCSFLAGS , +below. + .IP _concat A function used to produce variables like $_CPPINCFLAGS. It takes six arguments: a prefix to concatenate onto each element, a list of elements, a @@ -1631,7 +1845,6 @@ before concatenation. env['_CPPINCFLAGS'] = '$( ${_concat(INCPREFIX, CPPPATH, INCSUFFIX, locals(), globals(), RDirs)} $)', .EE - .IP CPPFLAGS C preprocessor options. These will be included in any command that uses the C preprocessor, @@ -1696,6 +1909,16 @@ include $_CPPINCFLAGS: env = Environment(CCCOM="my_compiler $_CPPINCFLAGS -c -o $TARGET $SOURCE") .EE +.IP CVS +The CVS executable. + +.IP CVSCOM +The command line used to +fetch source files from a CVS repository. + +.IP CVSFLAGS +General options that are passed to CVS. + .IP CXX The C++ compiler. @@ -2135,6 +2358,21 @@ The command line used by the RES builder. .IP RCFLAGS The flags passed to the resource compiler by the RES builder. +.IP RCS +The RCS executable. +Note that this variable is not actually used +to fetch source files from RCS; +see the +.B CO +construction variable, above. + +.IP RCSCOM +The command line used to +fetch source files from RCS. + +.IP RCSFLAGS +General options that are passed to RCS. + .IP RDirs A function that converts a file name into a list of Dir instances by searching the repositories. @@ -2142,6 +2380,16 @@ searching the repositories. .IP SCANNERS A list of the available implicit dependency scanners. [CScan] by default. +.IP SCCS +The SCCS executable. + +.IP SCCSCOM +The command line used to +fetch source files from SCCS. + +.IP SCCSFLAGS +General options that are passed to SCCS. + .IP SHCC The C compiler used for generating shared-library objects. @@ -2233,6 +2481,17 @@ is that arguments to the command. is a dictionary of the environment variables in which the command should be executed. +.IP SUBVERSION +The Subversion executable (usually named +.BR svn ). + +.IP SUBVERSIONCOM +The command line used to +fetch source files from a Subversion repository. + +.IP SUBVERSIONFLAGS +General options that are passed to Subversion. + .IP TAR The tar archiver. @@ -3189,6 +3448,24 @@ and .I action arguments must not both be used for the same Builder. +.IP env +A construction environment that can be used +to fetch source code using this Builder. +(Note that this environment is +.I not +used for normal builds of normal target files, +which use the environment that was +used to call the Builder for the target file.) + +.IP overrides +A dictionary of construction variables +that will be set in the executing +construction environment when this +Builder is invoked. +The canonical example here would be +to set a construction variable to +the repository of a source code system. + Any additional keyword arguments supplied when a Builder object is called will be associated with the target |