summaryrefslogtreecommitdiff
path: root/Debian/Debhelper/Buildsystem/cmake.pm
diff options
context:
space:
mode:
authorModestas Vainius <modestas@vainius.eu>2009-06-18 02:11:45 +0300
committerModestas Vainius <modestas@vainius.eu>2009-06-18 02:11:45 +0300
commit962a2e10c930e3504ea1c0327be2fdf70d53023e (patch)
tree26196a25203b03818d92dd5a8ec49d2e13111675 /Debian/Debhelper/Buildsystem/cmake.pm
parent91928482af09c4ca1092f124921d0f47613c17ba (diff)
Update dh_auto documentation.
* dh_auto.pod -> dh_auto.7 - contains general information about dh_auto, its features, build systems supported by default (the latter is injected by man/dh_auto_pod script from Debian/Debhelper/Buildsystem/*.pm PODs via placeholders (#PLACEHOLDER#)) * POD in Debian/Debhelper/Buildsystem/*.pm -> dh_auto_<buildsystem>.7 - build system specific information. * dh_auto_* -> dh_auto_*.1 - relatively shorty description of the specific dh_auto_* program and build system specific info for that step injected from Debian/Debhelper/Buildsystem/*.pm with man/dh_auto_pod script. * man/dh_auto_pod $step - generates full dh_auto_$step POD (replaces placeholders). * man/dh_auto_pod - generates full dh_auto.pod (replaces placeholders). Signed-off-by: Modestas Vainius <modestas@vainius.eu>
Diffstat (limited to 'Debian/Debhelper/Buildsystem/cmake.pm')
-rw-r--r--Debian/Debhelper/Buildsystem/cmake.pm125
1 files changed, 125 insertions, 0 deletions
diff --git a/Debian/Debhelper/Buildsystem/cmake.pm b/Debian/Debhelper/Buildsystem/cmake.pm
index 5662874..0275bfb 100644
--- a/Debian/Debhelper/Buildsystem/cmake.pm
+++ b/Debian/Debhelper/Buildsystem/cmake.pm
@@ -6,6 +6,36 @@
package Debian::Debhelper::Buildsystem::cmake;
+=head1 NAME
+
+B<cmake> - CMake (CMakeLists.txt)
+
+=head1 SYNOPSIS
+
+B<dh_auto_*> [B<--buildsystem>=I<cmake>] ...
+
+=head1 DESCRIPTION
+
+CMake is a family of tools designed to build, test and package software. CMake
+generates F<Makefile>s and other temporary files in the build directory from
+the directives present in the F<CMakeLists.txt> and a couple of other build
+system source files. Then a standard set of make targets needs to be executed
+in the build directory to complete source building process. CMake is available
+in the cmake package that is essential throughout the whole build process.
+
+=head1 DH_AUTO NOTES
+
+Out of source tree building is done by default if this debhelper build system
+is selected. This is due to the fact that there is no way to properly clean up
+build directory from temporary files unless it is removed completely.
+Therefore I<clean> step cannot be fully implemented if building is done in
+source. However, the user may still enable in source building by explicitly
+specifying a build directory path that is equal to the source directory path.
+
+=head1 BUILD PROCESS
+
+=cut
+
use strict;
use base 'Debian::Debhelper::Buildsystem::makefile';
@@ -29,6 +59,27 @@ sub new {
return $this;
}
+=head2 Configure step
+
+=over 4
+
+=item I<Behaviour>
+
+Execute C<cmake> in the build directory passing a path to the source directory
+and defining the following flags:
+
+ -DCMAKE_INSTALL_PREFIX=/usr
+ -DCMAKE_SKIP_RPATH=ON
+ -DCMAKE_VERBOSE_MAKEFILE=ON
+
+=item I<Auto-selection>
+
+If F<CMakeLists.txt> file exists but neither F<configure>, F<Makefile.PL>,
+F<setup.py> or F<Build.PL> exist in the source directory.
+
+=back
+
+=cut
sub configure {
my $this=shift;
my @flags;
@@ -42,4 +93,78 @@ sub configure {
$this->doit_in_builddir("cmake", $this->get_source_rel2builddir(), @flags);
}
+=head2 Build step
+
+=over 4
+
+=item I<Behaviour>
+
+Execute C<make> in the build directory. See I<makefile> build system documentation
+for more information.
+
+=item I<Auto-selection>
+
+It is normal for the I<makefile> build system to be auto-selected at this step.
+
+=back
+
+=head2 Test step
+
+=over 4
+
+=item I<Behaviour>
+
+Execute C<make test> in the build directory. See I<makefile> build system
+documentation for more information.
+
+=item I<Auto-selection>
+
+It is normal for the I<makefile> build system to be auto-selected at this step.
+
+=back
+
+=head2 Install step
+
+=over 4
+
+=item I<Behaviour>
+
+Execute C<make install DESTDIR=$destdir> in the build directory with $destdir
+set to the appropriate temporary installation directory. See I<makefile> build
+system documentation for more information.
+
+=item I<Auto-selection>
+
+It is normal for the I<makefile> build system to be auto-selected at this step.
+
+=back
+
+=head2 Clean step
+
+=over 4
+
+=item I<Behaviour>
+
+Remove the build directory if building out of source tree (complete clean up)
+or execute C<make clean> if building in source (incomplete clean up). See
+I<makefile> build system documentation for more information.
+
+=item I<Auto-selection>
+
+It is normal for the I<makefile> build system to be auto-selected at this step.
+
+=back
+
+=head1 SEE ALSO
+
+L<dh_auto_makefile(7)>
+
+L<dh_auto(7)>
+
+=head1 AUTHORS
+
+ Modestas Vainius <modestas@vainius.eu>
+
+=cut
+
1;