kdecvs-build Reference

You should always be able to find the latest version of this file at http://grammarian.homelinux.net/kdecvs-build/
  1. Introduction
  2. Features
  3. Configuration File
  4. Configuration File Options
  5. Command-line Options
  6. Environment Variables Used

Introduction

kdecvs-build is a Perl script to help users install KDE from CVS. Unlike the two scripts available at http://developer.kde.org/build/compile_cvs.html, this script neither requires nor uses CVSup, for those who either can't or don't feel like installing it.

It is authored by Michael Pyne (mpyne (AT) grammarian (DOT) homelinux (DOT) net), and is one of several build scripts for this purpose.

2004-Dec-12 v0.87
New features:

Bug fixes:

2004-Oct-12: v0.86
New features:

2004-Sep-20: v0.85
New features:

Bugfixes:

2004-Sep-17: v0.84
New features:

Bugfixes:

2004-Aug-29: v0.83
New features:


Features

Features that I can think of off the top of my head:

Things that kdecvs-build does NOT do:


Format of .kdecvs-buildrc

To use the script, you must have a file in your home directory called .kdecvs-buildrc, which describes the modules you'd like to download and build.

It starts with the global options, specified like the following:

global
option-name option-value
[...]
end global

It is then followed by one or more module sections, specified like the following:

module module-name
option-name option-value
[...]
end module

module-name must be a module from the KDE CVS repository (for example, kdelibs or kdebase). Some options override global options, some add to global options, and some global options simply can't be overridden.

The following is an alphabetized list of options you can use. Click on the option to find out more about it. If one is not documented, please e-mail me using the address you can find above.


Configuration file Options

Here is a table of the various options, and some comments on them. Any option which overrides the global option will override a command line setting as well.

Option-name Module -> Global Behavior Notes
apply-qt-patches Overrides global This option is only useful for qt-copy. If it is set to a non-zero value, then the apply-patches script in qt-copy will be run prior to building, in order to apply the non-official patches to the qt-copy. Since these patches are normally the reason for using qt-copy instead of a stock Qt, it shouldn't do any harm to enable it.
binpath Can't be overridden

Set this option to set the environment variable PATH while building. You can't override this setting in a module option. The default value is empty, which is likely not what you want. This environment variable should include the colon-separated paths of your development toolchain. The paths $KDEDIR/bin and $QTDIR/bin are automatically added. You may use the tilde (~) for any paths you add using this option.

On my system, the setting

    binpath /bin:/usr/bin:/usr/X11R6/bin
is the minimally sufficient setting.

build-dir Overrides global Use this option to change the directory to contain the built sources. There are three different ways to use it:
  • Relative to the KDE CVS source directory ($KDECVS). This is the default, and the way the script worked up to version v0.61. This mode is selected if you type a directory name that doesn't start with a tilde (~) or a slash (/).

    The default value is build.

  • Absolute path. If you specify a path that begins with a /, then that path is used directory. For example, /tmp/kde-obj-dir/.
  • Relative to your home directory. If you specify a path that begins with a ~, then the path is used relative to your home directory, analogous to the shell's tilde-expansion. For example, ~/builddir would set the build directory to /home/mpyne/builddir on my system.
Perhaps surprisingly, this option can be changed per module.
build-system-only Overrides global Set this option to only create the build system for this module. What that means is that the make -f Makefile.cvs command will be run, and the configure script will be created (but not run), and make will not be run. This option is exactly equivalent to the --build-system-only command line option. This command is useful for checking what configure-flags each module supports so you can change your ~/.kdecvs-buildrc.
checkout-only Overrides global Set this option to checkout CVS sources piece by piece. The value for this option should be a space separated list of directories to checkout. If you don't include the admin directory, it will automatically be prepended, as it is required by the KDE build system. When checking out piece by piece, the admin directory will be pulled in from kde-common, which is where it exists on the CVS server. Although this option overrides the global option, be aware that setting this as a global option makes no sense.
configure-flags Appends to global option
(except for qt-copy)
Use this option to specify what flags to pass to ./configure when creating the build system for the module. When this is used as a global-option, it is applied to all modules that this script builds. qt-copy uses a much different set of configure options than the rest of KDE, so this option overrides the global settings when applied to qt-copy.
cvs-root Can't be overridden This option is used to set the directory on your computer to store the KDE CVS sources at. If you don't specify this value, the default is ~/kdecvs. If you do specify this value, use an absolute path name. Note that this setting has nothing to do with the CVSROOT environment variable. For that, see cvs-server.
cvs-server Can't be overridden This option is used to set the server used to check out from CVS. As an example, you could try :pserver:anonymous@bluemchen.kde.org:/home/kde
Please see http://developer.kde.org/source/anoncvs.html for a list of CVS mirrors. It also has links to other CVS build scripts that you can try.
cxxflags Appends to global option Use this option to specify what flags to pass to ./configure as the CXXFLAGS when creating the build system for the module. This option is specified here instead of with configure-flags because this option will also set the environment variable CXXFLAGS during the build process.
debug Can't be overridden This option enables the script's debug mode. At this point, all this switch does is disable logging to files, instead dumping all output to stdout.
disable-build-list Can't be overridden Normally kdecvs-build will write out the list of modules that were successfully built to a file under the KDE CVS source directory called 'successfully-built'. If you set this option to 0, kdecvs-build will skip writing out the file.
do-not-compile Overrides global

Use this option to set the DO_NOT_COMPILE environment variable prior to running the configure script. According to the KDE Developer FAQ, this should cause any toplevel directory you pass to not be built. The directories should be space-separated.

Note that the sources to the programs will still be downloaded. You can use the checkout-only directive to choose directories that you want to check out.

inst-apps Overrides global

This is the opposite of the do-not-compile option. This option makes it so that only the given toplevel directories are built. The directories should be space-separated.

Any changes don't take effect until the next time make -f Makefile.cvs is run, either automatically by the script, or manually by the --refresh-build or --recreate-configure options.

Note that the sources to the programs will still be downloaded. You can use the checkout-only directive to choose directories that you want to check out.

install-after-build Overrides global This option is used to install the package after it successfully builds. This option is enabled by default. If you want to disable this, you need to set this option to 0 in the configuration file. You can also use the --no-install command line flag.
kdedir Can't be overridden Set this option to set the environment variable KDEDIR while building. This is useful for one-user installations of KDE. See http://developer.kde.org/build/build2ver.html. You can't override this setting in a module option. If you don't specify this option, it defaults to absolutely nothing, which will mess up the configure script. You may use a tilde (~) to represent your home directory.
libpath Can't be overridden Set this option to set the environment variable LD_LIBRARY_PATH while building. You can't override this setting in a module option. The default value is blank, but the paths $KDEDIR/lib and $QTDIR/lib are automatically added. You may use the tilde (~) for any paths you add using this option.
lockfile Can't be overridden

The path of a file to use for script locking, to prevent parallel execution. If you don't specify this value, the default is ~/.kdecvs-lock

If the script is unable to create this file, it will abort.

log-dir Overrides global Use this option to change the directory used to hold the log files generated by the script. This setting can be set on a per-module basis as of version 0.64.
make-install-prefix Overrides global Set this variable to a space-separated list, which is interpreted as a command and its options to precede the make install command used to install modules. This is useful for installing packages with sudo for example, but please be careful while dealing with root privileges.
make-options Overrides global Set this variable in order to pass command line options to the make command. This is useful for programs such as distcc. distcc allows you to share your compilation work among more than one computer. To use it, you must use the -j option to make. Now you can. According to the docs, 2 * number_of_network_cpus is recommended. I have 2 CPUs total, so it would be -j4 in my case.
make-output-file Overrides global DEPRECATED. As of version 0.6, this option is no longer used. Now all commands are logged, including the make process. You can use the log-dir option to change the logging directory, however.
manual-build Overrides global Set the option value to 'true' to keep the build process from attempting to build this module. It will still be kept up-to-date when updating from CVS. This option is exactly equivalent to the --no-build command line option.
manual-update Overrides global Set the option value to 'true' to keep the build process from attempting to update (and by extension, build or install) this module. If you set this option for a module, then you have pretty much commented it out.
no-cvs Overrides global Set this option value to 'true' to prevent CVS updates for the module. This option is exactly equivalent to the --no-cvs command line option.
no-rebuild-on-fail Overrides global Set this option value to 'true' to always prevent kdecvs-build from trying to rebuild this module if it should fail an incremental build. Normally kdecvs-build will try to rebuild the module from scratch to counteract the effect of a stray CVS update messing up the build system.
pretend Can't be overridden Set the option value to 'true' in order to "fake" the update/build or install process. This setting results in verbose output, and is exactly equivalent to the --pretend command line option.
qtdir Can't be overridden Set this option to set the environment variable QTDIR while building. You can't override this setting in a module option. If you don't specify this option, it defaults to absolutely nothing, which will mess up the configure script. You may use a tilde (~) to represent your home directory.
recreate-configure Overrides global Use this option to re-run make -f Makefile.cvs and then reconfigure the module before building. Note that setting this option in the configuration file isn't a great idea, use --recreate-configure on the command line instead.
release-tag Overrides global Use this option to force checkout from a specific KDE CVS branch. For example, setting this to KDE_3_2_BRANCH allows you to keep up-to-date with the current stable KDE release, including bugfixes. You can use KDE's WebCVS page to find out what branches exist for each CVS module.
reconfigure Overrides global Use this option to reconfigure the module before building. Note that setting this option in the configuration file isn't a great idea, use --reconfigure on the command line instead.
refresh-build Overrides global Set this option value to 'true' to cause the build system for this module to start from scratch every time the script is run. This option is exactly equivalent to the --refresh-build command line option.
set-env Overrides global

This option accepts a space-separated set of values, where the first value is the environment variable to set, and the rest of the values is what you want the variable set to. For example, to set the variable RONALD to McDonald, you would put in the appropriate section this command:

set-env RONALD McDonald

This option is special in that it can be repeated without overriding earlier set-env settings in the same section of the configuration file. This way you can set more than one environment variable per module (or globally).

stop-on-failure Overrides global Set this option value to 'true' to cause the script to stop execution after an error occurs during the build or install process. This option is off by default.
use-qt-builddir-hack Overrides global Although this option overrides the global option, it only makes sense for qt-copy. Set this option to 'true' to enable the script's experimental srcdir != builddir mode. When enabled, kdecvs-build will copy the qt-copy CVS module to the build directory, and perform builds from there. That means your QTDIR environment variable should be set to $(qt-copy-build-dir)/qt-copy/lib instead. You should also change your qtdir option accordingly.

Incremental make should still work in this mode, as the timestamps will be preserved after the copy. If you use the apply-qt-patches option, the patches will be applied in the build directory, not the source directory.
use-unsermake Overrides global Set this option to a non-zero value in order to use the experimental unsermake program instead of automake when running the configure script. This can lead to some serious decreases in build time, especially for distributed building systems.

Command-line options

The script accepts the following command-line options:


Environment Variables

The script no longer uses any environment variables. Please try to set at least binpath, qtdir, and kdedir in your .kdecvs-buildrc. See the .kdecvs-buildrc options.
CVSup is a registered trademark of John D. Polstra.
Last modified: Sun Aug 29 00:46:53 2004