From fb0f82b2fe402cc8e8cb811413ea5d3f87ed9802 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 9 Aug 2016 17:49:46 +0200 Subject: Merge README.cmake into README.md Gbp-Dch: ignore --- README.cmake | 27 --------------------------- README.md | 25 +++++++++++++++---------- 2 files changed, 15 insertions(+), 37 deletions(-) delete mode 100644 README.cmake diff --git a/README.cmake b/README.cmake deleted file mode 100644 index 06db22c96..000000000 --- a/README.cmake +++ /dev/null @@ -1,27 +0,0 @@ -The Make System -================ - -To compile this program using cmake you require cmake 3.3 or newer. - -Building --------- -The recommended way is to generate a build directory and build in it, e.g. - - mkdir build - cd build - cmake .. OR cmake -G Ninja .. - make -j4 OR ninja - -You can use either the make or the ninja generator; the ninja stuff is faster, -though. You can also build in-tree: - - cmake -G Ninja - ninja - -To build a subdirectory; for example, apt-pkg, use one of: - - ninja apt-pkg/all - make -C apt-pkg -j4 (or cd apt-pkg && make -j4) - -Ninja automatically parallelizes, make needs an explicit -j switch. The travis -system uses the make generator, the packaging as well. diff --git a/README.md b/README.md index 2f86d79a3..9020a3d6a 100644 --- a/README.md +++ b/README.md @@ -45,12 +45,21 @@ are encouraged to do as well. ### Coding -APT uses its own autoconf based build system, see [README.make](http://anonscm.debian.org/gitweb/?p=apt/apt.git;a=blob;f=README.make) -for the glory details, but to get started, just run: +APT uses cmake. To start building, you need to run - $ make + cmake -from a fresh git checkout. +from a build directory. For example, if you want to build in the source tree, +run: + + cmake . + +Then you can use make as you normally would (pass -j to perform +jobs in parallel). + +You can also use the Ninja generator of cmake, to do that pass + -G Ninja +to the cmake invocation, and then use ninja instead of make. The source code uses in most parts a relatively uncommon indent convention, namely 3 spaces with 8 space tab (see [doc/style.txt](http://anonscm.debian.org/gitweb/?p=apt/apt.git;a=blob;f=doc/style.txt) for more on this). @@ -86,12 +95,8 @@ Testing ### Manual execution -When you make changes and want to run them manually, make sure your -`$LD_LIBRARY_PATH` points to the libraries you have built, e.g. via: - - $ export LD_LIBRARY_PATH=$(pwd)/build/bin - $ ./build/bin/apt-get moo - +When you make changes and want to run them manually, you can just do so. CMake +automatically inserts an rpath so the binaries find the correct libraries. ### Integration tests -- cgit v1.2.3