Supported command-line parameters

The script accepts the following command-line options:

--async

Enables the asynchronous mode, which can perform the source code updates and module builds at the same time. This is the default, this option only needs specified if you have disabled it in the configuration.

--help

Only display simple help on this script.

--version

Display the program version.

--author

Display contact information for the author.

--color

Enable colorful output. (This is the default for interactive terminals).

--nice=value

This value adjusts the computer CPU priority requested by kdesrc-build, and should be in the range of 0-20. 0 is highest priority (because it is the least nice), 20 is lowest priority. kdesrc-build defaults to 10.

--no-async

Disables the asynchronous mode of updating. Instead the update will be performed in its entirety before the build starts. This option will slow down the overall process, but if you encounter IPC errors while running kdesrc-build try using this option, and submitting a bug report.

--no-color

Disable colorful output.

--pretend (or -p)

kdesrc-build will run through the update and build process, but instead of performing any actions to update or build, will instead output what the script would have done (e.g. what commands to run, general steps being taken, etc.).

Note: Simple read-only commands (such as reading file information) may still be run to make the output more relevant (such as correctly simulating whether source code would be checked out or updated).

--quiet (or -q)

Do not be as noisy with the output. With this switch only the basics are output.

--really-quiet

Only output warnings and errors.

--verbose (or -v)

Be very descriptive about what is going on, and what kdesrc-build is doing.

--src-only (or --svn-only)

Only perform the source update. (The --svn-only is only supported for compatibility with older scripts).

--build-only

Only perform the build process.

--ignore-modules

Do not include the modules passed on the rest of the command line in the update/build process (this is useful if you want to build most of the modules in your configuration file and just skip a few).

--no-src (or --no-svn)

Skip contacting the Subversion server. (The --no-svn parameter is only supported for compatibility with older versions of the script).

--no-build

Skip the build process.

--no-install

Do not automatically install packages after they are built.

--no-build-when-unchanged, --force-build

This option explicitly disables skipping the build process (an optimization controlled by the build-when-unchanged option). This is useful for making kdesrc-build run the build when you have changed something that kdesrc-build cannot check.

--force-build performs the exact same function, and is perhaps easier to remember.

--debug

Enables debug mode for the script. Currently this means that all output will be dumped to the standard output in addition to being logged in the log directory like normal. Also, many functions are much more verbose about what they are doing in debugging mode.

--no-rebuild-on-fail

Do not try to rebuild modules that have failed building from scratch. kdesrc-build will never try to do this to a module that already was tried to be built from scratch.

--refresh-build

Recreate the build system and make from scratch.

--reconfigure

Run cmake (for KDE modules) or configure (for Qt™) again, without cleaning the build directory. You should not normally have to specify this, as kdesrc-build will detect when you change the relevant options and automatically re-run the build setup. This option is implied if --refresh-build is used.

--resume-from

This option is used to resume the build starting from the given module, which should be the next option on the command line. You should not specify other module names on the command line.

Note

This option formerly added --no-src, but does not any longer (since kdesrc-build 1.13). If you want to avoid source updates when resuming, simply pass --no-src in addition to the other options.

See also: --resume-after and the section called “Resuming a failed or canceled build”. You would prefer to use this command line option if you have fixed the build error and want kdesrc-build to complete the build.

--resume-after

This option is used to resume the build starting after the given module, which should be the next option on the command line. You should not specify other module names on the command line.

Note

This option formerly added --no-src, but does not any longer (since kdesrc-build 1.13). If you want to avoid source updates when resuming, simply pass --no-src in addition to the other options.

See also: --resume-from and the section called “Resuming a failed or canceled build”. You would prefer to use this command line option if you have fixed the build error and have also built and installed the module yourself, and want kdesrc-build to start again with the next module.

--rc-file

This interprets the next command line parameter as the file to read the configuration options from. The default value for this parameter is kdesrc-buildrc (checked in the current directory) if it is present, or ~/.kdesrc-buildrc otherwise. See also Chapter 4, Configuring kdesrc-build.

--run

This option interprets the next item on the command line as a program to run, and kdesrc-build will then finish reading the configuration file, update the environment as normal, and then execute the given program.

This will not work to start a shell with the kdesrc-build environment in most cases however, since interactive shells typically reset at least part of the environment variables (such as PATH and KDEDIRS) in the startup sequence.

Tip

If you want to see the environment used by kdesrc-build, you can run the printenv command:

$ kdesrc-build --run printenv
KDE_SESSION_VERSION=4
SDL_AUDIODRIVER=alsa
LANGUAGE=
XCURSOR_THEME=Oxygen_Blue
LESS=-R -M --shift 5
QMAIL_CONTROLDIR=/var/qmail/control
... etc.
--prefix=</path/to/kde>

This allows you to change the directory that KDE will be installed to from the command line. This option implies --reconfigure, but using --refresh-build may still be required.

--revision

This option causes kdesrc-build to checkout a specific numbered revision for each Subversion module, overriding any branch, tag, or revision options already set for these modules.

This option is likely not a good idea, and is only supported for compatibility with older scripts.

--build-system-only

This option causes kdesrc-build to abort building a module just before the make command would have been run. This is supported for compatibility with older versions only, this effect is not helpful for the current KDE build system.

--install

If this is the only command-line option, it tries to install all of the modules contained in log/latest/build-status. If command-line options are specified after --install, they are all assumed to be modules to install (even if they did not successfully build on the last run).

--no-snapshots

Supplying this option causes kdesrc-build to always perform a normal initial checkout of a module instead of using a quick-start snapshot (only available for Git modules from the kde-projects repository). Note that this option should only be used if there is a failure using snapshots, as the quick-start snapshot reduces load on the KDE source repositories.

Note

Module snapshots are real checkouts. You should not need to specify this option, it is only a troubleshooting aid.

--<option-name>=

You can use this option to override an option in your configuration file for every module. For instance, to override the log-dir option, you would do: --log-dir=/path/to/dir.

--<module-name>,<option-name>=

You can use this option to override an option in your configuration file for a specific module.

Any other command-line options are assumed to be modules to update and build. Please, do not mix building with installing.