Commit Graph

4618 Commits

Author SHA1 Message Date
Jussi Pakkanen b3dfb80c15 Tests can be run with an external Meson command. 2017-11-20 23:08:17 +02:00
Jussi Pakkanen 9d67e5030b Changed code to use detected executables rather than hardcoding sys.executable. 2017-11-20 23:08:17 +02:00
Jussi Pakkanen a437cd1955 Add command to run Python scripts with the current interpreter. 2017-11-20 23:08:17 +02:00
Joergen Ibsen d5a6ab31bf Fix AppVeyor script 2017-11-20 23:07:07 +02:00
Jussi Pakkanen eba6972306 Renamed test dir to avoid number duplicates. 2017-11-20 20:28:04 +02:00
Christoph Behle 05ee756ba0 Check keyword arguments for dependency
Check if the keyword arguments given to dependency are permitted, as is
done with other functions already.
The list of permitted keyword arguments is taken from the documentation.
2017-11-19 18:27:27 +02:00
Zbigniew Jędrzejewski-Szmek fadce7f9b4 Silence failed restorecon calls when $DESTDIR is set
This avoids hundres of warnings like:
Warning no default label for /var/tmp/instroot.hUbtYJ/path/to/some/binary

$DESTDIR is usually set to a temporary path, in which case the path is
unknown to selinux. For that case we could just skip the restorecon
calls.  But sometimes it is used with a path to container. In that
case, most of the time, selinux has no context for that path. But we
can't rule that out somebody added custom context rules for the
container. So let's still call restorecon, but silence the warning.
2017-11-19 18:26:46 +02:00
Jussi Pakkanen 5cd8a7bbcc More defensive process killing. Closes #2629. 2017-11-19 18:20:41 +02:00
Iñigo Martínez 638077181a pkgconfig: Handle prefix in library path
The install_dir parameter of the libraries can also contain the
prefix path, which creates wrong library paths in the .pc file.

This patch detects if prefix is contained in the library path
and creates a relative path.

Fixes #2469
2017-11-19 18:20:21 +02:00
Jon Turney 34d1d45094 docs: Add 'cygwin' to reference table for .system()
This aligns this table with the set of values tested for by test case
common/140
2017-11-19 18:18:29 +02:00
Christoph Behle c653936700 Documentation: Add note about SCAN_BUILD
When running ninja scan-build you can use the environment variable
SCAN_BUILD to choose the right executable.
2017-11-19 18:17:31 +02:00
Jussi Pakkanen 708cdea861 Appveyor example now validates. Closes #2641. 2017-11-19 18:17:02 +02:00
Lucas Werkmeister 5d9c72630a Fix literal backslash syntax
In CommonMark, there are no backslash escapes in code spans, so only two backslashes in the source document are necessary to produce two backslashes in the output document.
2017-11-19 18:16:35 +02:00
Jussi Pakkanen e51da1a34d
Merge pull request #2611 from mesonbuild/nirbheek/pkgconfig-msvc-static
Several fixes to pkg-config dependencies and the pkg-config module (try 3)
2017-11-15 22:51:34 +02:00
Joergen Ibsen b9ef15a719 Allow cmd script extension on Windows 2017-11-15 21:03:30 +02:00
Nirbheek Chauhan da654dd2b9 appveyor.yml: Only download pkg-config for MSVC 2017-11-15 18:23:48 +05:30
rkfg 87bf152e6e Fix #2620 2017-11-14 22:35:06 +02:00
Jussi Pakkanen c63b3d253d
Merge pull request #2509 from madebr/boost_dependency_pkg_config
Enable get_pkgconfig_variable for python3 dependencies (if pkg-config is used)
2017-11-14 22:33:00 +02:00
Anonymous Maarten 5cfb378442 Enable get_pkgconfig_variable for python3 dependencies
fixes mesonbuild/meson#2508
2017-11-13 23:08:01 +01:00
Anonymous Maarten b715276cc7 tests: test getting python module using pkg-config 2017-11-13 23:07:48 +01:00
Jon Turney c4069a95c2 unit tests: Teach detect_prebuild_env about Cygwin
This is enough to fix things.

Note that build_shared_lib doesn't use the implib name for mingw or cygwin
gcc, only msvc, so I'm not quite sure how this is working, I guess we are
using the gcc facility to link directly with a dll...
2017-11-14 02:56:59 +05:30
Joergen Ibsen 6d85e10df9 docs: fix description of default_options
For dependency() and subproject(), the default_options argument can
override the defaults in the subproject's meson_options.txt, not in
its project() invocation.

Resolves #2612
2017-11-13 22:55:45 +02:00
Jussi Pakkanen 49eb33ff55
Merge pull request #2000 from t-chaik/tchaik/wip/get-unquoted
config data: add .get_unquoted() convenience method to get quoted string unquoted
2017-11-13 22:54:39 +02:00
Jussi Pakkanen 897fd0bd16
Merge pull request #2579 from thillux/master
Qt5-Module: add `name` option to rcc
2017-11-13 21:17:41 +02:00
Jussi Pakkanen 69bd87a716
Merge pull request #2511 from jon-turney/prefix-dependent-defaults
Make sysconfdir, localstatedir and sharedstatedir defaults depend on prefix
2017-11-13 21:14:59 +02:00
Jussi Pakkanen c6781744cf
Merge pull request #2604 from QuLogic/coalesce-restorecon
Coalesce restorecon calls into one.
2017-11-13 21:09:30 +02:00
Jan Niklas Hasse 46736fc16c Use mlog.warning for invalid boost module
Instead of mlog.debug. This make the warning visible to the user.
2017-11-13 21:07:00 +02:00
Jan Niklas Hasse c3d143298b Log instead of raise if Boost module invalid
BOOST_LIBS could become outdated in future versions, which would result
in dependency('boost', modules : [ 'foo' ], required : false) to fail,
although required was set to false. Therefore turn the exception into
log_fail(). If required was set to true, this will still be caught since
is_found remains False.

This also improves logging by printing all invalid module names instead
of only the first one.
2017-11-13 21:07:00 +02:00
Nirbheek Chauhan 18b42c5370 llvm: Output stderr when generating libs/flags/etc fails
f.ex when you don't have the llvm-static package installed, the error
message when generating libs is cryptic and uninformative since we
discard stderr.
2017-11-13 21:02:43 +02:00
TingPing 9b36e2d509
docs: Remove extra whitespace from i18n 2017-11-13 13:00:49 -05:00
Jussi Pakkanen 6e98e0c611
Merge pull request #2071 from porrided/master
Add zsh completion function for Meson
2017-11-11 20:17:03 +02:00
Jussi Pakkanen d2aa2f569b Cleanupping. 2017-11-11 20:12:43 +02:00
Nirbheek Chauhan 9da031c04c dependencies: Force pkg-config to output -L args
Sometimes pkg-config can decide that the libdir is a system library dir
and must not be included in the output because that would mess up the
library search order for pkg-config libraries that must be sourced from
a non-system prefix.

However, when we're doing manual searching, we always want to see the
library directory even if it's the system path, otherwise we can't do
manual searching at all.
2017-11-11 23:06:49 +05:30
Nirbheek Chauhan d32c672990 unit tests: Attempt to fix failure on Cygwin
This was always broken, but was missed because we ran MSVC on Cygwin
instead.
2017-11-11 23:06:49 +05:30
Nirbheek Chauhan e0b56942a0 unit tests: Properly skip if pkg-config wasn't found 2017-11-11 23:06:49 +05:30
Nirbheek Chauhan a63d81bafe appveyor: Install pkg-config for MSVC builds 2017-11-11 23:06:49 +05:30
Nirbheek Chauhan 4fb978e1f7 pkgconfig module: Escape all paths while generating
Without this, we produce unusable pkg-config files when
prefix/libdir/etc contain spaces, which is very common on Windows.
2017-11-11 23:06:49 +05:30
Nirbheek Chauhan 65edbf35ef dependencies: Use shlex to parse pkg-config cflags and libs
Escaping spaces with '\ ' is the only way that works with both
pkg-config and pkgconf, so quote that way and unquote inside Meson.
This should work on all platforms.

Also fix the unit test to do the same.

https://github.com/pkgconf/pkgconf/issues/153
2017-11-11 23:06:49 +05:30
Nirbheek Chauhan 22f459a7dd dependencies: Improve pkg-config library detection
When `static: true` is passed to dependency(), we parse the pkg-config
output and manually search for `-lfoo`, etc in the library paths
gathered from `-Lbar` arguments in the output.

If there are no `-L` arguments in the output, the behaviour is the
same as before. If there are `-L` arguments and we can't find a static
library, we will error out.
2017-11-11 23:06:48 +05:30
Nirbheek Chauhan d2a250412c compilers: Improve manual library searching
We can now specify the library type we want to search for, and whether
we want to prefer static libraries over shared ones or the other way
around. This functionality is not exposed to build files yet.
2017-11-11 23:06:48 +05:30
Arseny Maslennikov 8e04ab7cf2 _meson: Explicitly specify license to match the Z Shell
The zsh completion script is explicitly licensed to eliminate
any legal obstacles for its co-distribution with Z Shell itself.
2017-11-11 20:11:38 +03:00
Nirbheek Chauhan 4405a1297b dependencies: Add a test for static libs with pkg-config
Demonstrates that pkg-config does not prefer static libs over shared
libs even if we use the `static: true` kwarg.
2017-11-11 22:39:58 +05:30
Arseny Maslennikov abbf2f4fab Move shell completions and text editor helpers to data/ 2017-11-11 19:03:22 +03:00
Arseny Maslennikov 604f2b9a68 Add zsh completion function for Meson
Deprecated Meson syntax is not supported.
There are features not yet implemented, like completing
build targets and build options; more on this in the comments.
2017-11-11 19:01:30 +03:00
Elliott Sales de Andrade f91c4805b1 Pass restorecon file list through stdin.
This should avoid any issues with command-line argument limits.
2017-11-11 03:10:29 -05:00
Xavier Claessens 9e2d078948 gnome: Add include_directories parameter to gtkdoc() 2017-11-10 18:23:47 +02:00
Dylan Baker 5331073188 Interpreter: ensure build_def_files defined before parse_project()
Mesa has 4 build systems currently, set our version in a file called
VERSION, and read that in to each build system to simplify the release
process. For meson this is accomplished by using run_command within the
project() function declaration itself, and with meson <= 0.43.0 this
works fine. Commit 1b0048a702 makes
scripts that are run through run_command a rebuild dependency, but the
attribute used to store that information is set after the project()
command is processed. This breaks mesa.

The solution is to set that list before calling parse_project.

Fixes #2597
2017-11-10 18:23:33 +02:00
Elliott Sales de Andrade 5f8b37d0e7 Coalesce restorecon calls into one.
Fixes #2596.
2017-11-09 19:45:28 -05:00
Jussi Pakkanen 34d928a830 Better check for when address sanitizer is enabled. Closes #2590. 2017-11-09 21:14:42 +02:00
Eric Engestrom 5f7f5cdb05 Print correct command in help message
Taking mconf for instance:
before:
  $ meson configure --help
  usage: meson [-h] [-D SETS] [--clearcache] [directory [directory ...]]
after:
  $ meson configure --help
  usage: meson configure [-h] [-D SETS] [--clearcache] [directory [directory ...]]
2017-11-09 21:12:34 +02:00