docs: replace 'meson build' with 'meson builddir'

Clarifies that this is really just a directory, not a command.

https://github.com/mesonbuild/meson/issues/1560
pull/1725/head
Peter Hutterer 8 years ago
parent 7ec6e6df20
commit 276d342eba
  1. 16
      docs/markdown/Continuous-Integration.md
  2. 4
      docs/markdown/IDE-integration.md
  3. 2
      docs/markdown/IndepthTutorial.md
  4. 10
      docs/markdown/Quick-guide.md
  5. 4
      docs/markdown/Running-Meson.md
  6. 8
      docs/markdown/Tutorial.md
  7. 4
      docs/markdown/Using-multiple-build-directories.md
  8. 4
      docs/markdown/Using-with-Visual-Studio.md

@ -33,8 +33,8 @@ script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo FROM YOUR/REPO:yakkety > Dockerfile; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo FROM YOUR/REPO:yakkety > Dockerfile; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo ADD . /root >> Dockerfile; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo ADD . /root >> Dockerfile; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker build -t withgit .; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker build -t withgit .; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run withgit /bin/sh -c "cd /root && TRAVIS=true CC=$CC CXX=$CXX meson build && ninja -C build test"; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run withgit /bin/sh -c "cd /root && TRAVIS=true CC=$CC CXX=$CXX meson builddir && ninja -C builddir test"; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then SDKROOT=$(xcodebuild -version -sdk macosx Path) meson build && ninja -C build test; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then SDKROOT=$(xcodebuild -version -sdk macosx Path) meson builddir && ninja -C builddir test; fi
``` ```
## AppVeyor for Windows ## AppVeyor for Windows
@ -67,11 +67,11 @@ install:
build_script: build_script:
- cmd: echo Building on %arch% with %compiler% - cmd: echo Building on %arch% with %compiler%
- cmd: PATH=%cd%;%MESON_PYTHON_PATH%;%PATH%; && python meson.py --backend=ninja build - cmd: PATH=%cd%;%MESON_PYTHON_PATH%;%PATH%; && python meson.py --backend=ninja builddir
- cmd: PATH=%cd%;%MESON_PYTHON_PATH%;%PATH%; && ninja -C build - cmd: PATH=%cd%;%MESON_PYTHON_PATH%;%PATH%; && ninja -C builddir
test_script: test_script:
- cmd: PATH=%cd%;%MESON_PYTHON_PATH%;%PATH%; && ninja -C build test - cmd: PATH=%cd%;%MESON_PYTHON_PATH%;%PATH%; && ninja -C builddir test
``` ```
## Travis without Docker ## Travis without Docker
@ -96,7 +96,7 @@ install:
- pip3 install meson - pip3 install meson
script: script:
- meson build - meson builddir
- ninja -C build - ninja -C builddir
- ninja -C build test - ninja -C builddir test
``` ```

@ -10,7 +10,7 @@ The basic tool for this is a script called `mesonintrospect.py`. Some distro pac
The first thing to do when setting up a Meson project in an IDE is to select the source and build directories. For this example we assume that the source resides in an Eclipse-like directory called `workspace/project` and the build tree is nested inside it as `workspace/project/build`. First we initialise Meson by running the following command in the source directory. The first thing to do when setting up a Meson project in an IDE is to select the source and build directories. For this example we assume that the source resides in an Eclipse-like directory called `workspace/project` and the build tree is nested inside it as `workspace/project/build`. First we initialise Meson by running the following command in the source directory.
meson build meson builddir
For the remainder of the document we assume that all commands are executed inside the build directory unless otherwise specified. For the remainder of the document we assume that all commands are executed inside the build directory unless otherwise specified.
@ -36,7 +36,7 @@ The next thing to display is the list of options that can be set. These include
To set the options, use the `mesonconf.py` binary. To set the options, use the `mesonconf.py` binary.
Compilation and unit tests are done as usual by running the `ninja` and `ninja test` commands. A JSON formatted result log can be found in `workspace/project/build/meson-logs/testlog.json`. Compilation and unit tests are done as usual by running the `ninja` and `ninja test` commands. A JSON formatted result log can be found in `workspace/project/builddir/meson-logs/testlog.json`.
When these tests fail, the user probably wants to run the failing test in a debugger. To make this as integrated as possible, extract the test test setups with this command. When these tests fail, the user probably wants to run the failing test in a debugger. To make this as integrated as possible, extract the test test setups with this command.

@ -78,7 +78,7 @@ At this point we can return to the pkg-config generator line. All shared librari
With these four files we are done. To configure, build and run the test suite, we just need to execute the following commands (starting at source tree root directory). With these four files we are done. To configure, build and run the test suite, we just need to execute the following commands (starting at source tree root directory).
```console ```console
$ meson build && cd build $ meson builddir && cd builddir
$ ninja $ ninja
$ ninja test $ ninja test
``` ```

@ -40,7 +40,7 @@ The most common use case of Meson is compiling code on a code base you are worki
```console ```console
$ cd /path/to/source/root $ cd /path/to/source/root
$ meson build && cd build $ meson builddir && cd builddir
$ ninja $ ninja
$ ninja test $ ninja test
``` ```
@ -58,10 +58,10 @@ Distro packagers usually want total control on the build flags used. Meson suppo
```console ```console
$ cd /path/to/source/root $ cd /path/to/source/root
$ CFLAGS=... CXXFLAGS=... LDFLAGS=.. meson --prefix /usr --buildtype=plain build $ CFLAGS=... CXXFLAGS=... LDFLAGS=.. meson --prefix /usr --buildtype=plain builddir
$ ninja -v -C build $ ninja -v -C builddir
$ ninja -C build test $ ninja -C builddir test
$ DESTDIR=/path/to/staging/root ninja -C build install $ DESTDIR=/path/to/staging/root ninja -C builddir install
```` ````
The command line switch `--buildtype=plain` tells Meson not to add its own flags to the command line. This gives the packager total control on used flags. The command line switch `--buildtype=plain` tells Meson not to add its own flags to the command line. This gives the packager total control on used flags.

@ -15,8 +15,8 @@ Let us assume that we have a source tree that has a Meson build system. This mea
cd /path/to/source/root cd /path/to/source/root
mkdir build mkdir builddir
cd build cd builddir
meson .. meson ..
First we create a directory to hold all files generated during the build. Then we go into it and invoke Meson, giving it the location of the source root. First we create a directory to hold all files generated during the build. Then we go into it and invoke Meson, giving it the location of the source root.

@ -30,7 +30,7 @@ executable('demo', 'main.c')
That is all. We are now ready to build our application. First we need to initialise the build by going into the source directory and issuing the following commands. That is all. We are now ready to build our application. First we need to initialise the build by going into the source directory and issuing the following commands.
```console ```console
$ meson build $ meson builddir
``` ```
We create a separate build directory to hold all of the compiler output. Meson is different from some other build systems in that it does not permit in-source builds. You must always create a separate build directory. Common convention is to put the default build directory in a subdirectory of your toplevel source directory. We create a separate build directory to hold all of the compiler output. Meson is different from some other build systems in that it does not permit in-source builds. You must always create a separate build directory. Common convention is to put the default build directory in a subdirectory of your toplevel source directory.
@ -40,7 +40,7 @@ When Meson is run it prints the following output.
The Meson build system The Meson build system
version: 0.13.0-research version: 0.13.0-research
Source dir: /home/jpakkane/mesontutorial Source dir: /home/jpakkane/mesontutorial
Build dir: /home/jpakkane/mesontutorial/build Build dir: /home/jpakkane/mesontutorial/builddir
Build type: native build Build type: native build
Project name is "tutorial". Project name is "tutorial".
Using native c compiler "ccache cc". (gcc 4.8.2) Using native c compiler "ccache cc". (gcc 4.8.2)
@ -49,7 +49,7 @@ When Meson is run it prints the following output.
Now we are ready to build our code. Now we are ready to build our code.
``` ```
$ cd build $ cd builddir
$ ninja $ ninja
``` ```
@ -102,7 +102,7 @@ Once you have set up your build directory the first time, you don't ever need to
The Meson build system The Meson build system
version: 0.13.0-research version: 0.13.0-research
Source dir: /home/jpakkane/mesontutorial Source dir: /home/jpakkane/mesontutorial
Build dir: /home/jpakkane/mesontutorial/build Build dir: /home/jpakkane/mesontutorial/builddir
Build type: native build Build type: native build
Project name is "tutorial". Project name is "tutorial".
Using native c compiler "ccache cc". (gcc 4.8.2) Using native c compiler "ccache cc". (gcc 4.8.2)

@ -14,8 +14,8 @@ Since a build directory is fully self contained and treats the source tree as a
The first thing to do is to set up the default build, that is, the one we are going to use over 90% of the time. In this we use the system compiler and build with debug enabled and no optimizations so it builds as fast as possible. This is the default project type for Meson, so setting it up is simple. The first thing to do is to set up the default build, that is, the one we are going to use over 90% of the time. In this we use the system compiler and build with debug enabled and no optimizations so it builds as fast as possible. This is the default project type for Meson, so setting it up is simple.
mkdir build mkdir builddir
meson build meson builddir
Another common setup is to build with debug and optimizations to, for example, run performance tests. Setting this up is just as simple. Another common setup is to build with debug and optimizations to, for example, run performance tests. Setting this up is just as simple.

@ -8,8 +8,8 @@ In order to generate Visual Studio projects, Meson needs to know the settings of
1. Click on start menu and select "Visual Studio 2015 Command Prompt" 1. Click on start menu and select "Visual Studio 2015 Command Prompt"
1. cd into your source directory 1. cd into your source directory
1. mkdir build 1. mkdir builddir
1. python3 path/to/meson.py build --backend vs2015 1. python3 path/to/meson.py builddir --backend vs2015
If you wish to use the Ninja backend instead of vs2015, pass `--backend ninja`. At the time of writing the Ninja backend is more mature than the VS backend so you might want to use it for serious work. If you wish to use the Ninja backend instead of vs2015, pass `--backend ninja`. At the time of writing the Ninja backend is more mature than the VS backend so you might want to use it for serious work.

Loading…
Cancel
Save