OS Manuals

/usr/bin/scons

Software construction system

From scons 4.11.1-r0 (os), captured 2026-11-05 by running scons --help (exit 0). permalink

usage: scons [OPTIONS] [VARIABLES] [TARGETS]

SCons Options:
  -c, --clean, --remove       Remove specified targets and dependencies
  -C DIR, --directory=DIR     Change to DIR before doing anything
  --cache-debug=FILE          Print CacheDir debug info to FILE
  --cache-disable, --no-cache
                              Do not retrieve built targets from CacheDir
  --cache-force, --cache-populate
                              Copy already-built targets into the CacheDir
  --cache-readonly            Do not update CacheDir with built targets
  --cache-show                Print build actions for files from CacheDir
  --config=MODE               Controls Configure subsystem [auto, force, cache]
  -D                          Search up directory tree for SConstruct, build all Default() targets
  --debug=TYPE                Print various types of debugging information [count, duplicate,
                                explain, findlibs, includes, memoizer, memory, objects, pdb,
                                prepare, presub, stacktrace, time, action-timestamps, json,
                                sconscript]
  --diskcheck=TYPE            Enable specific on-disk checks
  --duplicate=DUPLICATE       Set the preferred duplication methods [hard-soft-copy, soft-hard-copy,
                                hard-copy, soft-copy, copy]
  --enable-virtualenv         Import certain virtualenv variables to SCons
  --experimental=EXPERIMENTAL
                              Enable experimental features
  -f FILE, --file=FILE, --makefile=FILE, --sconstruct=FILE
                              Read FILE as the top-level SConstruct file
  -h, --help                  Print defined help message, or this one
  -H, --help-options          Print this message and exit
  --hash-chunksize=N, --md5-chunksize=N
                              Set chunk-size for hash signature computation to N kilobytes
  --hash-format=HASH_FORMAT   Hash format [md5, sha1, sha256, etc].
  -i, --ignore-errors         Ignore errors from build actions
  -I DIR, --include-dir=DIR   Search DIR for imported Python modules
  --ignore-virtualenv         Do not import virtualenv variables to SCons
  --implicit-cache            Cache implicit dependencies
  --implicit-deps-changed     Ignore cached implicit dependencies
  --implicit-deps-unchanged   Ignore changes in implicit dependencies
  --interact, --interactive   Run in interactive mode
  -j N, --jobs=N              Allow N jobs at once
  -k, --keep-going            Keep going when a target can't be made
  --max-drift=N               Set maximum system clock drift to N seconds
  -n, --no-exec, --just-print, --dry-run, --recon
                              Don't build; just print commands
  --no-site-dir               Don't search or use the usual site_scons dir
  --profile=FILE              Profile SCons and put results in FILE
  -q, --question              Don't build; exit status says if up to date
  -Q                          Suppress "Reading/Building" progress messages
  --random                    Build dependencies in random order
  -s, --silent, --quiet       Don't print commands
  --site-dir=DIR              Use DIR instead of the usual site_scons dir
  --stack-size=N              Set the stack size of the threads used to run jobs to N kilobytes
  --taskmastertrace=FILE      Trace Node evaluation to FILE
  --tree=OPTIONS              Print a dependency tree in various formats [all, derived, prune,
                                status, linedraw]
  -u, --up, --search-up       Search up directory tree for SConstruct, build targets at or below
                                current directory
  -U                          Search up directory tree for SConstruct, build Default() targets from
                                local SConscript
  -v, --version               Print the SCons version number and exit
  --warn=WARNING-SPEC, --warning=WARNING-SPEC
                              Enable or disable warnings
  -Y REPOSITORY, --repository=REPOSITORY, --srcdir=REPOSITORY
                              Search REPOSITORY for source and target files
Options (53)
OptionDescriptionSource
-c, --clean, --removeRemove specified targets and dependencieshelp + man
-C, --directory DIRRun as if scons was started in directory instead of the current working directory.help + man
--cache-debug FILEWrite debug information about derived-file caching to the specified file.help + man
--cache-disable, --no-cacheDo not retrieve built targets from CacheDirhelp + man
--cache-force, --cache-populateWhen using CacheDir, populate a derived-file cache by copying any existing, up-to-date derived files to it, in addition to files built during this invocation.help + man
--cache-readonlyUse the derived-file cache, if enabled, to retrieve files, but do not not update the cache with any files built during this invocation.help + man
--cache-showWhen using a derived-file cache, display the command that would have been executed to build the file (or the corresponding COMSTR contents if set), even if the file is retrieved from the cache.help + man
--config MODEControl how the Configure call should use or generate the results of configuration tests.help + man
-DWorks exactly the same way as the -u option except for the way default targets are handled.help + man
--debug TYPEPrint various types of debugging information [count, duplicate, explain, findlibs, includes, memoizer, memory, objects, pdb, prepare, presub, stacktrace, time, action-timestamps, json, sconscript]help + man
--diskcheck TYPEEnable specific checks for whether or not there is a file on disk where the SCons configuration expects a directory (or vice versa) when searching for source and include files.help + man
--duplicate DUPLICATEThere are three ways to duplicate files in a build tree: hard links, soft (symbolic) links and copies.help + man
--enable-virtualenvImport virtualenv-related variables to SCons.help + man
--experimental EXPERIMENTALEnable experimental features and/or tools.help + man
-f, --file, --makefile, --sconstruct FILERead FILE as the top-level SConstruct filehelp + man
-h, --helpPrint a local help message for this project, if one is defined in the SConscript files (see the Help function), plus a line that refers to the standard SCons help message.help + man
-H, --help-optionsPrint the standard help message about SCons command-line options and exit.help + man
--hash-chunksize, --md5-chunksize NSet the block size used when computing content signatures to KILOBYTES.help + man + man
--hash-format HASH_FORMATSet the hashing algorithm used by SCons to ALGORITHM.help + man
-i, --ignore-errorsIgnore all errors from commands executed to rebuild files.help + man
-I, --include-dir DIRSpecifies a directory to search for imported Python modules.help + man
--ignore-virtualenvSuppress importing virtualenv-related variables to SCons.help + man
--implicit-cacheCache implicit dependencies.help + man
--implicit-deps-changedForces SCons to ignore the cached implicit dependencies.help + man
--implicit-deps-unchangedForce SCons to ignore changes in the implicit dependencies.help + man
--interact, --interactiveStarts SCons in interactive mode.help + man
-j, --jobs NSpecifies the maximum number of concurrent jobs (commands) to run.help + man
-k, --keep-goingContinue as much as possible after an error.help + man
--max-drift NSet the maximum expected drift in the modification time of files to SECONDS.help + man
-n, --no-exec, --just-print, --dry-run, --reconSet no-exec mode.help + man
--no-site-dirDon't search or use the usual site_scons dirhelp + man
--profile FILERun SCons under the Python profiler and save the results to file.help + man
-q, --questionDo not run any commands, or print anything.help + man
-QSuppress status messages about reading SConscript files, building targets and entering directories.help + man
--randomBuild dependencies in a random order.help + man
-s, --silent, --quietDon't print commandshelp + man
--site-dir DIRUse path as the site directory rather than searching the list of default site directories.help + man
--stack-size NSet the stack size of the threads used to run jobs to N kilobyteshelp + man
--taskmastertrace FILEPrints trace information to the specified file about how the internal Taskmaster object evaluates and controls the order in which Nodes are built.help + man
--tree OPTIONSPrint a dependency tree in various formats [all, derived, prune, status, linedraw]help + man
-u, --up, --search-upWalks up the directory structure until an SConstruct, Sconstruct, sconstruct, SConstruct.py, Sconstruct.py or sconstruct.py file is found, and uses that as the project top directory.help + man
-UWorks exactly the same way as the -u option except for the way default targets are handled.help + man
-v, --versionPrint the scons version, copyright information, list of authors, and any other relevant information.help + man
--warn, --warning WARNING-SPECEnable or disable (with the prefix "no-") warnings (--warning is a synonym).help + man
-Y, --repository, --srcdir REPOSITORYSearch repository for any input and target files not found in the local directory hierarchy.help + man
-bIgnored for compatibility with non-GNU versions of Make (in the manual page but not in --help)man
--install-sandbox sandbox_pathWhen using the Install builders, prepend sandbox_path to the installation paths such that all installed files will be placed under that directory. (in the manual page but not in --help)man
-mIgnored for compatibility with non-GNU versions of Make. (in the manual page but not in --help)man
--package-type typeThe type of package to create when using the Package builder. (in the manual page but not in --help)man
-S, --no-keep-going, --stopIgnored for compatibility with GNU Make (in the manual page but not in --help)man
-t, --touchIgnored for compatibility with GNU Make. (in the manual page but not in --help)man
-w, --print-directoryPrint a message containing the working directory before and after other processing. (in the manual page but not in --help)man
--no-print-directoryTurn off -w, even if it was turned on implicitly. (in the manual page but not in --help)man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.