[kde-doc-english] [kdesrc-build] /: Execute install/fast on CMake, and add --install-only

Àlex Fiestas afiestas at kde.org
Wed Mar 5 14:13:31 UTC 2014


Git commit 45bd13fd792b96a2ebf2c6887da263f0ebc2c02a by Àlex Fiestas.
Committed on 05/03/2014 at 14:08.
Pushed by afiestas into branch 'master'.

Execute install/fast on CMake, and add --install-only

This patch does three things:
1-Adds --install-only for the sake of consistency
2-Adds --install into the usage
3-Makes the CMake (KDE4) build system use make install/fast.

make install/fast only performs the installation of the files
thus avoiding a double compilation.

REVIEW: 116589

M  +7    -0    doc/index.docbook
M  +10   -1    modules/ksb/Application.pm
M  +1    -1    modules/ksb/BuildSystem.pm
M  +17   -0    modules/ksb/BuildSystem/KDE4.pm

http://commits.kde.org/kdesrc-build/45bd13fd792b96a2ebf2c6887da263f0ebc2c02a

diff --git a/doc/index.docbook b/doc/index.docbook
index ad8a512..2808bf2 100644
--- a/doc/index.docbook
+++ b/doc/index.docbook
@@ -2822,6 +2822,13 @@ Only perform the build process.
 </para></listitem>
 </varlistentry>
 
+<varlistentry id="cmdline-install-only">
+<term><parameter>--install-only</parameter></term>
+<listitem><para>
+Only perform the install process.
+</para></listitem>
+</varlistentry>
+
 <varlistentry id="cmdline-ignore-modules">
 <term><parameter>--ignore-modules</parameter></term>
 <listitem><para>
diff --git a/modules/ksb/Application.pm b/modules/ksb/Application.pm
index e14b3e1..6046ed6 100644
--- a/modules/ksb/Application.pm
+++ b/modules/ksb/Application.pm
@@ -191,6 +191,10 @@ DONE
         'build-only' => sub {
             $phases->phases('build');
         },
+        'install-only' => sub {
+            $self->{run_mode} = 'install';
+            $phases->phases('install');
+        },
         prefix => sub {
             my ($optName, $arg) = @_;
             $auxOptions{prefix} = $arg;
@@ -258,7 +262,7 @@ DONE
         'no-tests', 'build-when-unchanged|force-build',
         'verbose|v', 'quiet|quite|q', 'really-quiet', 'debug',
         'reconfigure', 'colorful-output|color!', 'async!',
-        'src-only|svn-only', 'build-only', 'build-system-only',
+        'src-only|svn-only', 'build-only', 'install-only', 'build-system-only',
         'rc-file=s', 'prefix=s', 'niceness|nice:10', 'ignore-modules=s{,}',
         'print-modules', 'pretend|dry-run|p', 'refresh-build',
         'start-program|run=s{,}',
@@ -2717,6 +2721,11 @@ Options:
                          at this point).
     --build-only         Build only, don't perform updates or install.
 
+    --install-only       Only install the already compiled code, this is equivalent
+    --install            to make install/fast in CMake. Useful for example when we
+                         want to clean the install directory but we do not want to
+                         re-compile everything.
+
     --rc-file=<filename> Read configuration from filename instead of default.
 
     --resume-from=<pkg>  Skips modules until just before the given package,
diff --git a/modules/ksb/BuildSystem.pm b/modules/ksb/BuildSystem.pm
index 6c5f030..91e8967 100644
--- a/modules/ksb/BuildSystem.pm
+++ b/modules/ksb/BuildSystem.pm
@@ -338,7 +338,7 @@ sub safe_make (@)
         # them.
         next unless $self->isSubdirBuildable($subdir);
 
-        my $logname = $optsRef->{logbase} // $optsRef->{target};
+        my $logname = $optsRef->{logbase} // $optsRef->{logfile} // $optsRef->{target};
 
         if ($subdir ne '')
         {
diff --git a/modules/ksb/BuildSystem/KDE4.pm b/modules/ksb/BuildSystem/KDE4.pm
index 7f67f8c..2b8ebc1 100644
--- a/modules/ksb/BuildSystem/KDE4.pm
+++ b/modules/ksb/BuildSystem/KDE4.pm
@@ -97,6 +97,23 @@ sub runTestsuite
     return 1;
 }
 
+# Re-implementing the one in BuildSystem since in CMake we want to call
+# make install/fast, so it only installs rather than building + installing
+sub installInternal
+{
+    my $self = shift;
+    my $module = $self->module();
+    my @cmdPrefix = @_;
+
+    return $self->safe_make ({
+            target => 'install/fast',
+            logfile => 'install',
+            message => "Installing g[$module]",
+            'prefix-options' => [@cmdPrefix],
+            subdirs => [ split(' ', $module->getOption("checkout-only")) ],
+           }) == 0;
+}
+
 sub configureInternal
 {
     my $self = assert_isa(shift, 'ksb::BuildSystem::KDE4');


More information about the kde-doc-english mailing list