Git commit cba7a7bb22e17ed6ba44302617e10e33167d28c3 by Michael Pyne. Committed on 28/03/2006 at 07:19. Pushed by ashark into branch 'docbook_historied_per_file'.
Add preliminary CMake support to kdesvn-build, and update the sample file to suit. This adds two new options: use-cmake (but this one will go away once CMake is the only option for KDE 4), and cmake-options (but I think I will find a way to make it so you never need to use this). Also added is a new command line option, --run (which runs the given command using the internal kdesvn-build environment). The documentation has also been updated. The check to see whether unsermake needs to be downloaded is also very slightly improved. Finally, kdesvn-build does not set KDEDIR, it sets KDEDIRS. Score one for removing deprecated interfaces... I think I've caught most of the places where the fact that we're using CMake is an issue (i.e. do-not-compile, inst-apps, trying to make apidox, cmake-options adding to global options like configure-flags does, etc.) If I haven't, please e-mail me or file a bug against kdesvn-build. Seeing as how this is the first release with support for CMake, it should come as a surprise that it may not work! So, please test now so I can make a real 1.1 release in the next week or so. svn path=/trunk/KDE/kdesdk/doc/scripts/kdesvn-build/; revision=523429 Original commit: 73a544c8 https://invent.kde.org/sdk/kdesrc-build/-/commit/73a544c8b79655959666850f2e1be0ecc71eae4d M +14 -0 doc/cmdline/index.docbook M +14 -2 doc/getting-started/before-building.docbook M +7 -2 doc/index.docbook A +5 -0 doc/kde-cmake/index.docbook A +32 -0 doc/kde-cmake/kde-cmake-intro.docbook M +60 -10 doc/kdesvn-buildrc/index.docbook https://invent.kde.org/sdk/kdesrc-build/-/commit/cba7a7bb22e17ed6ba44302617e10e33167d28c3 diff --git a/doc/cmdline/index.docbook b/doc/cmdline/index.docbook index 9efb0147..ba6aff10 100644 --- a/doc/cmdline/index.docbook +++ b/doc/cmdline/index.docbook @@ -192,6 +192,20 @@ value for this parameter is ~/.kdesvn-buildrc. </para></listitem> </varlistentry> +<varlistentry id="cmdline-run"> +<term><option>--run</option></term> +<listitem><para> +This option interprets the next item on the command line as a program to run, +and &kdesvn-build; will then finish reading the configuration file, update the +environment as normal, and then execute the given program.</para> + +<para>This will not work to start a shell with the kdesvn-build environment in +most cases however, since interactive shells typically reset at least part of +the environment variables (such as <envar>PATH</envar> and +<envar>KDEDIRS</envar>) in the startup sequence. +</para></listitem> +</varlistentry> + <varlistentry id="cmdline-prefix"> <term><option>--prefix=</path/to/kde></option></term> <listitem><para> diff --git a/doc/getting-started/before-building.docbook b/doc/getting-started/before-building.docbook index ead4b59e..8e189be7 100644 --- a/doc/getting-started/before-building.docbook +++ b/doc/getting-started/before-building.docbook @@ -34,19 +34,31 @@ Requirements</ulink> page. <para>Here is a list of some of the things you'll need:</para> <itemizedlist> -<listitem><para>Automake version 1.7, or higher.</para></listitem> -<listitem><para>Autoconf version 2.57, or higher.</para></listitem> + +<listitem><para>Automake version 1.7, or higher. (KDE 3 only)</para></listitem> + +<listitem><para>Autoconf version 2.57, or higher. (KDE 3 only)</para></listitem> + +<listitem><para><ulink +url="http://www.cmake.org/"><application>CMake</application></ulink> 2.4.0, or +higher. Some version 2.3 snapshots may compile KDE 4 as well, please see the +<ulink url="http://wiki.kde.org/tiki-index.php?page=KDECMakeIntro">CMake Introduction Wiki</ulink> page. (KDE 4 +only)</para></listitem> + <listitem><para>The &svn; client program, including support for Secure HTTP (https). To ensure needed support, you can run <userinput><command>svn <option>--version</option></command></userinput>. If the ra_dav module says that it handles the https scheme then you should be set to go.</para></listitem> + <listitem><para>The gcc compiler, with support for C++. Version 3.3 or 3.4 works the best at this point.</para></listitem> + <listitem><para>Be sure to check the <ulink url="http://www.kde.org/info/requirements/3.5.php">&kde; Compilation Requirements</ulink> page to make sure that any other needed libraries are included.</para></listitem> + </itemizedlist> <para>One exception is the &Qt; library. &kdesvn-build; will normally install a diff --git a/doc/index.docbook b/doc/index.docbook index a1916dfc..55c30164 100644 --- a/doc/index.docbook +++ b/doc/index.docbook @@ -11,6 +11,7 @@ <!ENTITY homepage '<ulink url="http://kdesvn-build.kde.org/">&kdesvn-build; home page</ulink>'> <!ENTITY unsermake '<ulink url="http://www.kde.me.uk/index.php&page=unsermake"><application>unsermake</application></ulink>'> <!ENTITY BSD '<acronym>BSD</acronym>'> + <!ENTITY cmake '<link linkend="kde-cmake"><application>CMake</application></link>'> <!-- These define shortcut entities for some of the configuration options. Just add them as necessary. @@ -70,6 +71,8 @@ <!ENTITY advanced-features SYSTEM "using-kdesvn-build/advanced-features.docbook"> <!ENTITY developer-features SYSTEM "using-kdesvn-build/developer-features.docbook"> <!ENTITY other-features SYSTEM "using-kdesvn-build/other-features.docbook"> + <!ENTITY kde-cmake SYSTEM "kde-cmake/index.docbook"> + <!ENTITY kde-cmake-intro SYSTEM "kde-cmake/kde-cmake-intro.docbook"> <!ENTITY credits-and-licenses SYSTEM "credits-and-licenses/index.docbook"> ]> @@ -106,8 +109,8 @@ <legalnotice>&FDLNotice;</legalnotice> -<date>2006-01-04</date> -<releaseinfo>1.0.0</releaseinfo> +<date>2006-03-28</date> +<releaseinfo>1.1</releaseinfo> <abstract> <para>&kdesvn-build; is a script which builds and installs &kde; directly from the sources found in the &kde; &svn; repository.</para> @@ -135,6 +138,8 @@ &using-kdesvn-build; +&kde-cmake; + &credits-and-licenses; </book> diff --git a/doc/kde-cmake/index.docbook b/doc/kde-cmake/index.docbook new file mode 100644 index 00000000..31b60284 --- /dev/null +++ b/doc/kde-cmake/index.docbook @@ -0,0 +1,5 @@ +<chapter id="kde-cmake"> +<title>CMake, the KDE 4 build system.</title> + +&kde-cmake-intro; +</chapter> diff --git a/doc/kde-cmake/kde-cmake-intro.docbook b/doc/kde-cmake/kde-cmake-intro.docbook new file mode 100644 index 00000000..6795eb58 --- /dev/null +++ b/doc/kde-cmake/kde-cmake-intro.docbook @@ -0,0 +1,32 @@ +<sect1 id="kde-cmake-intro"> +<title>Introduction to CMake</title> + +<para>In March 2006, the <ulink url="http://www.cmake.org/"><application>CMake</application></ulink> program +beat out several competitors and was selected to be the build system for &kde; 4, replacing the +autotools-based system that &kde; has used from the beginning.</para> + +<para>A introduction to CMake page is available on the <ulink +url="http://wiki.kde.org/tiki-index.php?page=KDECMakeIntro">KDE Wiki</ulink>. +Basically, instead of running make -f Makefile.cvs, then configure, then unsermake (or make), +we simply run cmake and then make. +</para> + +<para>&kdesvn-build; has initial support for CMake. A few features of &kdesvn-build; +were really features of the underlying buildsystem, including <link linkend="conf-inst-apps">inst-apps</link>, +<link linkend="conf-configure-flags">configure-flags</link>, +and <link linkend="conf-do-not-compile">do-not-compile</link>. When equivalent +features are available, they are provided. For instance, the equivalent to the +configure-flags option is <link linkend="conf-cmake-options">cmake-options</link>. +</para> + +<para>However, some options, like inst-apps or do-not-compile, have no direct +equivalent, and are disabled. Should I find a way to implement them with CMake +I will do so and re-enable the option. However, more or less everything works +the same.</para> + +<para>Not all of KDE has been ported to use CMake at this point. For example, +the <link linkend="conf-apidox">apidox</link> option is rather useless until the +equivalent infrastructure is ready. I've tried to warn about such things but +not all deficiencies may be caught by &kdesvn-build; for now.</para> + +</sect1> diff --git a/doc/kdesvn-buildrc/index.docbook b/doc/kdesvn-buildrc/index.docbook index cfd2a38a..496e1774 100644 --- a/doc/kdesvn-buildrc/index.docbook +++ b/doc/kdesvn-buildrc/index.docbook @@ -49,6 +49,7 @@ authors using the address you can find <link linkend="authors">above</link>. <listitem><para><link linkend="conf-branch">branch</link>, to checkout from a branch instead of /trunk.</para></listitem> <listitem><para><link linkend="conf-build-dir">build-dir</link>, to set the directory to build in.</para></listitem> <listitem><para><link linkend="conf-checkout-only">checkout-only</link>, to checkout only parts of a module.</para></listitem> +<listitem><para><link linkend="conf-cmake-options">cmake-options</link> to define what flags to configure a module with using cmake.</para></listitem> <listitem><para><link linkend="conf-colorful-output">colorful-output</link> to add color to the script output.</para></listitem> <listitem><para><link linkend="conf-configure-flags">configure-flags</link> to define what flags to configure a module with.</para></listitem> <listitem><para><link linkend="conf-cxxflags">cxxflags</link> to define the <envar>CXXFLAGS</envar> variable.</para></listitem> @@ -123,7 +124,7 @@ do any harm to enable it. The default is to enable the patches.</entry> <row id="conf-binpath"> <entry>binpath</entry> -<entry>Can't be overridden</entry> +<entry>Overrides global</entry> <entry><para>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 <filename class="directory">/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin</filename>. This environment @@ -190,14 +191,43 @@ a global option makes no sense. </entry> </row> +<row id="conf-cmake-options"> +<entry>cmake-options</entry> +<entry>Appends to global options (not applicable to qt-copy)</entry> +<entry><para>Use this option to specify what flags to pass to &cmake; 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. When used as a module option, +it is added to the end of the global options. This allows you to specify +common CMake options in the global section.</para> + +<para>This option replaces <link linkend="conf-configure-flags">configure-flags</link> +for all KDE 4 modules, since they use CMake to build.</para> + +<para>Since these options are passed directly to the CMake command line, they +should be given as they would be typed into CMake. For example:</para> + +<screen> cmake-options -DRPATH_STYLE=default +</screen> + +<para>Since this is a hassle, &kdesvn-build; takes pains to ensure that as long +as the rest of the options are set correctly, you should be able to leave this +option blank.</para></entry> +</row> + <row id="conf-configure-flags"> <entry>configure-flags</entry> -<entry>Appends to global option(except for qt-copy)</entry> -<entry>Use this option to specify what flags to pass to ./configure when creating +<entry>Appends to global options (except for qt-copy)</entry> +<entry><para>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 -<emphasis>overrides</emphasis> the global settings when applied to qt-copy.</entry> +<emphasis>overrides</emphasis> the global settings when applied to qt-copy. +</para> + +<para>This option applies to qt-copy and all KDE 3 modules. KDE 4 modules use +&cmake;, which is controlled using the <link linkend="conf-cmake-options">cmake-options</link> +option.</para> +</entry> </row> <row id="conf-colorful-output"> @@ -216,7 +246,8 @@ color codes to anything but a terminal (such as xterm, &konsole;, or the normal <entry>Use this option to specify what flags to pass to <command>./configure</command> as the <envar>CXXFLAGS</envar> when creating the build system for the module. This option is specified here instead of with <link -linkend="conf-configure-flags">configure-flags</link> because this option will also +linkend="conf-configure-flags">configure-flags</link> or <link +linkend="conf-cmake-options">cmake-options</link> because this option will also set the environment variable <envar>CXXFLAGS</envar> during the build process. </entry> </row> @@ -253,6 +284,9 @@ built. The directories should be space-separated.</para> <para>Note that the sources to the programs will still be downloaded. You can use the <link linkend="conf-checkout-only">checkout-only</link> directive to choose directories that you want to check out.</para> + +<important><para>This option does not yet work with modules built using +&cmake;</para></important> </entry> </row> @@ -303,6 +337,9 @@ linkend="cmdline-refresh-build"><option>--refresh-build</option></link> or <link linkend="cmdline-recreate-configure"><option>--recreate-configure</option></link> options. </para> +<important><para>This option does not yet work with modules built using +the &cmake; build system.</para></important> + <para>Note that the sources to the programs will still be downloaded. You can use the <link linkend="conf-checkout-only">checkout-only</link> directive to choose directories that you want to check out.</para> @@ -321,7 +358,7 @@ set this option to 0 in the &rcfile;. You can also use the <row id="conf-kdedir"> <entry>kdedir</entry> -<entry>Can't be overridden</entry> +<entry>Overrides global</entry> <entry>This option sets the directory that &kde; will be installed to after it is built. It defaults to <filename class="directory">~/kde</filename>. If you change this to a directory needing root access, you may want to read about the <link @@ -353,7 +390,7 @@ French language, however.</para> <row id="conf-libpath"> <entry>libpath</entry> -<entry>Can't be overridden</entry> +<entry>Overrides global</entry> <entry>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 <filename class="directory">$KDEDIR/lib</filename> and @@ -457,7 +494,7 @@ can't figure out what you mean using <link linkend="conf-branch">branch</link>. <row id="conf-qtdir"> <entry>qtdir</entry> -<entry>Can't be overridden</entry> +<entry>Overrides global</entry> <entry>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 @@ -506,7 +543,7 @@ globally).</para> <row id="conf-source-dir"> <entry>source-dir</entry> -<entry>Can't be overridden</entry> +<entry>Overrides global</entry> <entry>This option is used to set the directory on your computer to store the &kde; &svn; sources at. If you don't specify this value, the default is <filename class="directory">~/kdesvn</filename>. If @@ -516,7 +553,7 @@ you do specify this value, use an absolute path name. <row id="conf-svn-server"> <entry>svn-server</entry> -<entry>Can't be overridden</entry> +<entry>Overrides global</entry> <entry>This option is used to set the server used to check out from &svn;. The default is the anonymous &svn; repository, <emphasis>svn://anonsvn.kde.org/</emphasis></entry> </row> @@ -545,6 +582,19 @@ instead, which works from the release tarballs.</para> </entry> </row> +<row id="conf-use-cmake"> +<entry>use-cmake</entry> +<entry>Overrides global</entry> +<entry> +<para>This option allows you to force &kdesvn-build; to try (or not try) to use +CMake with a given module. Normally &kdesvn-build; will always try to use CMake +if it is present in the module, as this will be required to build KDE 4. This +option is available to ease the transition from unsermake to CMake. This option +will be removed once all KDE 4 modules require CMake. +</para> +</entry> +</row> + <row id="conf-use-qt-builddir-hack"> <entry>use-qt-builddir-hack</entry> <entry>Overrides global</entry>
