aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/shell-completions/zsh/_meson213
-rw-r--r--data/syntax-highlighting/emacs/meson.el (renamed from data/meson.el)0
-rw-r--r--data/syntax-highlighting/vim/README (renamed from syntax-highlighting/vim/README)0
-rw-r--r--data/syntax-highlighting/vim/ftdetect/meson.vim (renamed from syntax-highlighting/vim/ftdetect/meson.vim)0
-rw-r--r--data/syntax-highlighting/vim/indent/meson.vim (renamed from syntax-highlighting/vim/indent/meson.vim)0
-rw-r--r--data/syntax-highlighting/vim/syntax/meson.vim (renamed from syntax-highlighting/vim/syntax/meson.vim)0
-rw-r--r--docs/markdown/Syntax.md91
-rw-r--r--docs/markdown/i18n-module.md4
-rw-r--r--mesonbuild/dependencies/dev.py24
-rw-r--r--mesonbuild/dependencies/misc.py7
-rw-r--r--mesonbuild/interpreter.py3
-rw-r--r--mesonbuild/modules/gnome.py2
12 files changed, 302 insertions, 42 deletions
diff --git a/data/shell-completions/zsh/_meson b/data/shell-completions/zsh/_meson
new file mode 100644
index 0000000..877d700
--- /dev/null
+++ b/data/shell-completions/zsh/_meson
@@ -0,0 +1,213 @@
+#compdef meson mesonconf=meson-configure mesontest=meson-test mesonintrospect=meson-introspect
+
+# vim:ts=2 sw=2
+
+# Copyright (c) 2017 Arseny Maslennikov
+# All rights reserved. Individual authors, whether or not
+# specifically named, retain copyright in all changes; in what follows, they
+# are referred to as `the Meson development team'. This is for convenience
+# only and this body has no legal status. This file is distributed under
+# the following licence.
+#
+# Permission is hereby granted, without written agreement and without
+# licence or royalty fees, to use, copy, modify, and distribute this
+# software and to distribute modified versions of this software for any
+# purpose, provided that the above copyright notice and the following
+# two paragraphs appear in all copies of this software.
+#
+# In no event shall the Meson development team be liable to any party for
+# direct, indirect, special, incidental, or consequential damages arising out
+# of the use of this software and its documentation, even if the Meson
+# development team have been advised of the possibility of such damage.
+#
+# The Meson development team specifically disclaim any warranties, including,
+# but not limited to, the implied warranties of merchantability and fitness
+# for a particular purpose. The software provided hereunder is on an "as is"
+# basis, and the Meson development team have no obligation to provide
+# maintenance, support, updates, enhancements, or modifications.
+
+local curcontext="$curcontext" state line
+local -i ret
+
+local __meson_backends="(ninja xcode ${(j. .)${:-vs{,2010,2015,2017}}})"
+local __meson_build_types="(plain debug debugoptimized minsize release)"
+local __meson_wrap_modes="(WrapMode.{default,nofallback,nodownload})"
+
+local -a meson_commands=(
+'setup:set up a build directory'
+'configure:configure a project'
+'test:run tests'
+'introspect:query project properties'
+'wrap:manage source dependencies'
+)
+
+(( $+functions[__meson_is_build_dir] )) || __meson_is_build_dir() {
+ local mpd="${1:-$PWD}/meson-private"
+ [[ -f "$mpd/build.dat" && -f "$mpd/coredata.dat" ]]
+ return $?
+}
+
+# TODO: implement build option completion
+(( $+functions[__meson_build_options] )) || __meson_build_options() {}
+# TODO: implement target name completion
+(( $+functions[__meson_targets] )) || __meson_targets() {}
+# `meson introspect` currently can provide that information in JSON.
+# We can:
+# 1) pipe its output to python3 -m json.tool | grep "$alovelyregex" | cut <...>
+# 2) teach mintro.py to use a different output format
+# (or perhaps just to select the fields printed)
+
+(( $+functions[__meson_test_names] )) || __meson_test_names() {
+ local rtests
+ if rtests="$(_call_program meson meson test ${opt_args[-C]:+-C "$opt_args[-C]"} --list)";
+ then
+ local -a tests=(${(@f)rtests})
+ _describe -t "tests" "Meson tests" tests
+ else
+ _message -r "current working directory is not a build directory"
+ _message -r 'use -C $build_dir or cd $build_dir'
+ fi
+}
+
+(( $+functions[_meson_commands] )) || _meson_commands() {
+ _describe -t commands "Meson subcommands" meson_commands
+}
+
+(( $+functions[_meson-setup] )) || _meson-setup() {
+ local firstd secondd
+ if [[ -f "meson.build" ]]; then
+ # if there's no second argument on the command line
+ # cwd will implicitly be substituted:
+ # - as the source directory if it has a file with the name "meson.build";
+ # - as the build directory otherwise
+ # more info in mesonbuild/mesonmain.py
+ firstd="build"
+ secondd="source"
+ else
+ firstd="source"
+ secondd="build"
+ fi
+
+ _arguments \
+ '*-D-[set the value of a build option]:build option:__meson_build_options' \
+ '--prefix=[installation prefix]: :_directories' \
+ '--libdir=[library directory]: :_directories' \
+ '--libexecdir=[library executable directory]: :_directories' \
+ '--bindir=[executable directory]: :_directories' \
+ '--sbindir=[system executable directory]: :_directories' \
+ '--includedir=[header file directory]: :_directories' \
+ '--datadir=[data file directory]: :_directories' \
+ '--mandir=[manual page directory]: :_directories' \
+ '--infodir=[info page directory]: :_directories' \
+ '--localedir=[locale data directory]: :_directories' \
+ '--sysconfdir=[system configuration directory]: :_directories' \
+ '--localstatedir=[local state data directory]: :_directories' \
+ '--sharedstatedir=[arch-independent data directory]: :_directories' \
+ '--backend=[backend to use]:Meson backend:'"$__meson_backends" \
+ '--buildtype=[build type to use]:Meson build type:'"$__meson_build_types" \
+ '--strip[strip targets on install]' \
+ '--unity=[unity builds on/off]:whether to do unity builds:(on off subprojects)' \
+ '--werror[treat warnings as errors]' \
+ '--layout=[build directory layout]:build directory layout:(flat mirror)' \
+ '--default-library=[default library type]:default library type:(shared static)' \
+ '--warnlevel=[compiler warning level]:compiler warning level:warning level:(1 2 3)' \
+ '--stdsplit=[split stdout and stderr in test logs]' \
+ '--errorlogs=[prints the logs from failing tests]' \
+ '--cross-file=[cross-compilation environment description]:cross file:_files' \
+ '--wrap-mode=[special wrap mode]:wrap mode:'"$__meson_wrap_modes" \
+ ":$firstd directory:_directories" \
+ "::$secondd directory:_directories" \
+ #
+}
+
+(( $+functions[_meson-configure] )) || _meson-configure() {
+ local curcontext="$curcontext"
+ # TODO: implement 'mesonconf @file'
+ local -a specs=(
+ '--clearcache[clear cached state]'
+ '*-D-[set the value of a build option]:build option:__meson_build_options'
+ '::build directory:_directories'
+ )
+
+ _arguments \
+ '(: -)'{'--help','-h'}'[show a help message and quit]' \
+ "${(@)specs}"
+}
+
+(( $+functions[_meson-test] )) || _meson-test() {
+ local curcontext="$curcontext"
+
+ # TODO: complete test suites
+ local -a specs=(
+ '(--quiet -q)'{'--quiet','-q'}'[produce less output to the terminal]'
+ '(--verbose -v)'{'--verbose','-v'}'[do not redirect stdout and stderr]'
+ '(--timeout-multiplier -t)'{'--timeout-multiplier','-t'}'[a multiplier for test timeouts]:Python floating-point number: '
+ '-C[directory to cd into]: :_directories'
+ '--repeat[number of times to run the tests]:number of times to repeat: '
+ '--no-rebuild[do not rebuild before running tests]'
+ '--gdb[run tests under gdb]'
+ '--list[list available tests]'
+ '(--wrapper --wrap)'{'--wrapper=','--wrap='}'[wrapper to run tests with]:wrapper program:_path_commands'
+ '(--no-suite)--suite[only run tests from this suite]:test suite: '
+ '(--suite)--no-suite[do not run tests from this suite]:test suite: '
+ '--no-stdsplit[do not split stderr and stdout in logs]'
+ '--print-errorlogs[print logs for failing tests]'
+ '--benchmark[run benchmarks instead of tests]'
+ '--logbase[base name for log file]:filename: '
+ '--num-processes[how many threads to use]:number of processes: '
+ '--setup[which test setup to use]:test setup: '
+ '--test-args[arguments to pass to the tests]: : '
+ '*:Meson tests:__meson_test_names'
+ )
+
+ _arguments \
+ '(: -)'{'--help','-h'}'[show a help message and quit]' \
+ "${(@)specs}"
+}
+
+(( $+functions[_meson-introspect] )) || _meson-introspect() {
+ local curcontext="$curcontext"
+ local -a specs=(
+ '--targets[list top level targets]'
+ '--installed[list all installed files and directories]'
+ '--target-files[list source files for a given target]:target:__meson_targets'
+ '--buildsystem-files[list files that belong to the build system]'
+ '--buildoptions[list all build options]'
+ '--tests[list all unit tests]'
+ '--benchmarks[list all benchmarks]'
+ '--dependencies[list external dependencies]'
+ '--projectinfo[show project information]'
+ '::build directory:_directories'
+ )
+_arguments \
+ '(: -)'{'--help','-h'}'[show a help message and quit]' \
+ "${(@)specs}"
+}
+
+(( $+functions[_meson-wrap] )) || _meson-wrap() {
+ # TODO
+}
+
+if [[ $service != meson ]]; then
+ _call_function ret _$service
+ return ret
+fi
+
+_arguments -C -R \
+ '(: -)'{'--help','-h'}'[show a help message and quit]' \
+ '(: -)'{'--version','-v'}'[show version information and quit]' \
+ '(-): :_meson_commands' \
+ '*:: :->post-command' \
+#
+ret=$?
+
+[[ $ret = 300 ]] && case "$state" in
+ post-command)
+ service="meson-$words[1]"
+ curcontext=${curcontext%:*:*}:$service:
+ _call_function ret _$service
+ ;;
+esac
+
+return ret
+
diff --git a/data/meson.el b/data/syntax-highlighting/emacs/meson.el
index 36f7eb9..36f7eb9 100644
--- a/data/meson.el
+++ b/data/syntax-highlighting/emacs/meson.el
diff --git a/syntax-highlighting/vim/README b/data/syntax-highlighting/vim/README
index 1afa243..1afa243 100644
--- a/syntax-highlighting/vim/README
+++ b/data/syntax-highlighting/vim/README
diff --git a/syntax-highlighting/vim/ftdetect/meson.vim b/data/syntax-highlighting/vim/ftdetect/meson.vim
index 84db70c..84db70c 100644
--- a/syntax-highlighting/vim/ftdetect/meson.vim
+++ b/data/syntax-highlighting/vim/ftdetect/meson.vim
diff --git a/syntax-highlighting/vim/indent/meson.vim b/data/syntax-highlighting/vim/indent/meson.vim
index 8553ec0..8553ec0 100644
--- a/syntax-highlighting/vim/indent/meson.vim
+++ b/data/syntax-highlighting/vim/indent/meson.vim
diff --git a/syntax-highlighting/vim/syntax/meson.vim b/data/syntax-highlighting/vim/syntax/meson.vim
index 49921c1..49921c1 100644
--- a/syntax-highlighting/vim/syntax/meson.vim
+++ b/data/syntax-highlighting/vim/syntax/meson.vim
diff --git a/docs/markdown/Syntax.md b/docs/markdown/Syntax.md
index eaf24cf..88b9bbb 100644
--- a/docs/markdown/Syntax.md
+++ b/docs/markdown/Syntax.md
@@ -4,23 +4,39 @@ short-description: Syntax and structure of Meson files
# Syntax
-The syntax of Meson's specification language has been kept as simple as possible. It is *strongly typed* so no object is ever converted to another under the covers. Variables have no visible type which makes Meson *dynamically typed* (also known as *duck typed*).
-
-The main building blocks of the language are *variables*, *numbers*, *booleans*, *strings*, *arrays*, *function calls*, *method calls*, *if statements* and *includes*.
-
-Usually one Meson statement takes just one line. There is no way to have multiple statements on one line as in e.g. *C*. Function and method calls' argument lists can be split over multiple lines. Meson will autodetect this case and do the right thing. In other cases you can get multi-line statements by ending the line with a `\`. Apart from line ending whitespace has no syntactic meaning.
+The syntax of Meson's specification language has been kept as simple
+as possible. It is *strongly typed* so no object is ever converted to
+another under the covers. Variables have no visible type which makes
+Meson *dynamically typed* (also known as *duck typed*).
+
+The main building blocks of the language are *variables*, *numbers*,
+*booleans*, *strings*, *arrays*, *function calls*, *method calls*, *if
+statements* and *includes*.
+
+Usually one Meson statement takes just one line. There is no way to
+have multiple statements on one line as in e.g. *C*. Function and
+method calls' argument lists can be split over multiple lines. Meson
+will autodetect this case and do the right thing. In other cases you
+can get multi-line statements by ending the line with a `\`. Apart
+from line ending whitespace has no syntactic meaning.
Variables
--
-Variables in Meson work just like in other high level programming languages. A variable can contain a value of any type, such as an integer or a string. Variables don't need to be predeclared, you can just assign to them and they appear. Here's how you would assign values to two different variables.
+Variables in Meson work just like in other high level programming
+languages. A variable can contain a value of any type, such as an
+integer or a string. Variables don't need to be predeclared, you can
+just assign to them and they appear. Here's how you would assign
+values to two different variables.
```meson
var1 = 'hello'
var2 = 102
```
-One important difference in how variables work in Meson is that all variables are immutable. This is different from, for example, how Python works.
+One important difference in how variables work in Meson is that all
+objects are immutable. This is different from, for example, how Python
+works.
```meson
var1 = [1, 2, 3]
@@ -33,7 +49,8 @@ var2 += [4]
Numbers
--
-Meson supports only integer numbers. They are declared simply by writing them out. Basic arithmetic operations are supported.
+Meson supports only integer numbers. They are declared simply by
+writing them out. Basic arithmetic operations are supported.
```meson
x = 1 + 2
@@ -60,13 +77,15 @@ truth = true
Strings
--
-Strings in Meson are declared with single quotes. To enter a literal single quote do it like this:
+Strings in Meson are declared with single quotes. To enter a literal
+single quote do it like this:
```meson
single quote = 'contains a \' character'
```
-Similarly `\n` gets converted to a newline and `\\\\` to a single backslash.
+Similarly `\n` gets converted to a newline and `\\\\` to a single
+backslash.
#### String concatenation
@@ -80,7 +99,8 @@ combined = str1 + '_' + str2 # combined is now abc_xyz
#### Strings running over multiple lines
-Strings running over multiple lines can be declared with three single quotes, like this:
+Strings running over multiple lines can be declared with three single
+quotes, like this:
```meson
multiline_string = '''#include <foo.h>
@@ -89,7 +109,8 @@ int main (int argc, char ** argv) {
}'''
```
-This can also be combined with the string formatting functionality described below.
+This can also be combined with the string formatting functionality
+described below.
#### String formatting
@@ -101,11 +122,13 @@ res = template.format('text', 1, true)
# res now has value 'string: text, number: 1, bool: true'
```
-As can be seen, the formatting works by replacing placeholders of type `@number@` with the corresponding argument.
+As can be seen, the formatting works by replacing placeholders of type
+`@number@` with the corresponding argument.
#### String methods
-Strings also support a number of other methods that return transformed copies.
+Strings also support a number of other methods that return transformed
+copies.
**.strip()**
@@ -226,7 +249,9 @@ my_array += ['something']
my_array += 'else'
```
-Note appending to an array will always create a new array object and assign it to `my_array` instead of modifying the original since all objects in Meson are immutable.
+Note appending to an array will always create a new array object and
+assign it to `my_array` instead of modifying the original since all
+objects in Meson are immutable.
#### Array methods
@@ -239,7 +264,8 @@ The following methods are defined for all arrays:
Function calls
--
-Meson provides a set of usable functions. The most common use case is creating build objects.
+Meson provides a set of usable functions. The most common use case is
+creating build objects.
```meson
executable('progname', 'prog.c')
@@ -248,7 +274,8 @@ executable('progname', 'prog.c')
Method calls
--
-Objects can have methods, which are called with the dot operator. The exact methods it provides depends on the object.
+Objects can have methods, which are called with the dot operator. The
+exact methods it provides depends on the object.
```meson
myobj = some_function()
@@ -279,7 +306,9 @@ endif
## Foreach statements
-To do an operation on all elements of an array, use the `foreach` command. As an example, here's how you would define two executables with corresponding tests.
+To do an operation on all elements of an array, use the `foreach`
+command. As an example, here's how you would define two executables
+with corresponding tests.
```meson
progs = [['prog1', ['prog1.c', 'foo.c']],
@@ -291,7 +320,9 @@ foreach p : progs
endforeach
```
-Note that Meson variables are immutable. Trying to assign a new value to `progs` inside a foreach loop will not affect foreach's control flow.
+Note that Meson variables are immutable. Trying to assign a new value
+to `progs` inside a foreach loop will not affect foreach's control
+flow.
Logical operations
--
@@ -334,12 +365,20 @@ The ternary operator works just like in other languages.
x = condition ? true_value : false_value
```
-The only exception is that nested ternary operators are forbidden to improve legibility. If your branching needs are more complex than this you need to write an `if/else` construct.
+The only exception is that nested ternary operators are forbidden to
+improve legibility. If your branching needs are more complex than this
+you need to write an `if/else` construct.
Includes
--
-Most source trees have multiple subdirectories to process. These can be handled by Meson's `subdir` command. It changes to the given subdirectory and executes the contents of `meson.build` in that subdirectory. All state (variables etc) are passed to and from the subdirectory. The effect is roughly the same as if the contents of the subdirectory's Meson file would have been written where the include command is.
+Most source trees have multiple subdirectories to process. These can
+be handled by Meson's `subdir` command. It changes to the given
+subdirectory and executes the contents of `meson.build` in that
+subdirectory. All state (variables etc) are passed to and from the
+subdirectory. The effect is roughly the same as if the contents of the
+subdirectory's Meson file would have been written where the include
+command is.
```meson
test_data_dir = 'data'
@@ -349,4 +388,12 @@ subdir('tests')
User-defined functions and methods
--
-Meson does not currently support user-defined functions or methods. The addition of user-defined functions would make Meson Turing-complete which would make it harder to reason about and more difficult to integrate with tools like IDEs. More details about this are [in the FAQ](FAQ.md#why-is-meson-not-just-a-python-module-so-i-could-code-my-build-setup-in-python). If because of this limitation you find yourself copying and pasting code a lot you may be able to use a [`foreach` loop instead](#foreach-statements).
+Meson does not currently support user-defined functions or
+methods. The addition of user-defined functions would make Meson
+Turing-complete which would make it harder to reason about and more
+difficult to integrate with tools like IDEs. More details about this
+are [in the
+FAQ](FAQ.md#why-is-meson-not-just-a-python-module-so-i-could-code-my-build-setup-in-python). If
+because of this limitation you find yourself copying and pasting code
+a lot you may be able to use a [`foreach` loop
+instead](#foreach-statements).
diff --git a/docs/markdown/i18n-module.md b/docs/markdown/i18n-module.md
index 1144e29..8fb650a 100644
--- a/docs/markdown/i18n-module.md
+++ b/docs/markdown/i18n-module.md
@@ -17,21 +17,17 @@ argument which is the name of the gettext module.
* `args`: list of extra arguments to pass to `xgettext` when
generating the pot file
-
* `data_dirs`: (*Added 0.36.0*) list of directories to be set for
`GETTEXTDATADIRS` env var (Requires gettext 0.19.8+), used for local
its files
-
* `languages`: list of languages that are to be generated. As of
0.37.0 this is optional and the
[LINGUAS](https://www.gnu.org/software/gettext/manual/html_node/po_002fLINGUAS.html)
file is read.
-
* `preset`: (*Added 0.37.0*) name of a preset list of arguments,
current option is `'glib'`, see
[source](https://github.com/mesonbuild/meson/blob/master/mesonbuild/modules/i18n.py)
for for their value
-
* `install`: (*Added 0.43.0*) if false, do not install the built translations.
This function also defines targets for maintainers to use:
diff --git a/mesonbuild/dependencies/dev.py b/mesonbuild/dependencies/dev.py
index 92d4504..257bf7a 100644
--- a/mesonbuild/dependencies/dev.py
+++ b/mesonbuild/dependencies/dev.py
@@ -173,9 +173,9 @@ class LLVMDependency(ExternalDependency):
# for users who want the patch version.
self.version = out.strip().rstrip('svn')
- p, out = Popen_safe([self.llvmconfig, '--components'])[:2]
+ p, out, err = Popen_safe([self.llvmconfig, '--components'])
if p.returncode != 0:
- raise DependencyException('Could not generate modules for LLVM.')
+ raise DependencyException('Could not generate modules for LLVM:\n' + err)
self.provided_modules = shlex.split(out)
modules = stringlistify(extract_as_list(kwargs, 'modules'))
@@ -183,9 +183,9 @@ class LLVMDependency(ExternalDependency):
opt_modules = stringlistify(extract_as_list(kwargs, 'optional_modules'))
self.check_components(opt_modules, required=False)
- p, out = Popen_safe([self.llvmconfig, '--cppflags'])[:2]
+ p, out, err = Popen_safe([self.llvmconfig, '--cppflags'])
if p.returncode != 0:
- raise DependencyException('Could not generate includedir for LLVM.')
+ raise DependencyException('Could not generate includedir for LLVM:\n' + err)
cargs = mesonlib.OrderedSet(shlex.split(out))
self.compile_args = list(cargs.difference(self.__cpp_blacklist))
@@ -198,10 +198,10 @@ class LLVMDependency(ExternalDependency):
def _set_new_link_args(self):
"""How to set linker args for LLVM versions >= 3.9"""
link_args = ['--link-static', '--system-libs'] if self.static else ['--link-shared']
- p, out = Popen_safe(
- [self.llvmconfig, '--libs', '--ldflags'] + link_args + list(self.required_modules))[:2]
+ p, out, err = Popen_safe(
+ [self.llvmconfig, '--libs', '--ldflags'] + link_args + list(self.required_modules))
if p.returncode != 0:
- raise DependencyException('Could not generate libs for LLVM.')
+ raise DependencyException('Could not generate libs for LLVM:\n' + err)
self.link_args = shlex.split(out)
def _set_old_link_args(self):
@@ -213,19 +213,19 @@ class LLVMDependency(ExternalDependency):
of course we do.
"""
if self.static:
- p, out = Popen_safe(
- [self.llvmconfig, '--libs', '--ldflags', '--system-libs'] + list(self.required_modules))[:2]
+ p, out, err = Popen_safe(
+ [self.llvmconfig, '--libs', '--ldflags', '--system-libs'] + list(self.required_modules))
if p.returncode != 0:
- raise DependencyException('Could not generate libs for LLVM.')
+ raise DependencyException('Could not generate libs for LLVM:\n' + err)
self.link_args = shlex.split(out)
else:
# llvm-config will provide arguments for static linking, so we get
# to figure out for ourselves what to link with. We'll do that by
# checking in the directory provided by --libdir for a library
# called libLLVM-<ver>.(so|dylib|dll)
- p, out = Popen_safe([self.llvmconfig, '--libdir'])[:2]
+ p, out, err = Popen_safe([self.llvmconfig, '--libdir'])
if p.returncode != 0:
- raise DependencyException('Could not generate libs for LLVM.')
+ raise DependencyException('Could not generate libs for LLVM:\n' + err)
libdir = out.strip()
expected_name = 'libLLVM-{}'.format(self.version)
diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py
index e65675b..c807926 100644
--- a/mesonbuild/dependencies/misc.py
+++ b/mesonbuild/dependencies/misc.py
@@ -66,6 +66,11 @@ class BoostDependency(ExternalDependency):
self.is_multithreading = threading == "multi"
self.requested_modules = self.get_requested(kwargs)
+ invalid_modules = [c for c in self.requested_modules if 'boost_' + c not in BOOST_LIBS]
+ if invalid_modules:
+ mlog.warning('Invalid Boost modules: ' + ', '.join(invalid_modules))
+ self.log_fail()
+ return
self.boost_root = None
self.boost_roots = []
@@ -198,8 +203,6 @@ class BoostDependency(ExternalDependency):
for c in candidates:
if not isinstance(c, str):
raise DependencyException('Boost module argument is not a string.')
- if 'boost_' + c not in BOOST_LIBS:
- raise DependencyException('Dependency {} not found. It is not a valid boost library.'.format(c))
return candidates
def validate_requested(self):
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index b90a88c..c7a0fb7 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -1391,6 +1391,8 @@ class Interpreter(InterpreterBase):
self.subproject_stack = []
self.default_project_options = default_project_options[:] # Passed from the outside, only used in subprojects.
self.build_func_dict()
+ # build_def_files needs to be defined before parse_project is called
+ self.build_def_files = [os.path.join(self.subdir, environment.build_filename)]
self.parse_project()
self.builtin['build_machine'] = BuildMachine(self.coredata.compilers)
if not self.build.environment.is_cross_build():
@@ -1406,7 +1408,6 @@ class Interpreter(InterpreterBase):
self.builtin['target_machine'] = CrossMachineInfo(cross_info.config['target_machine'])
else:
self.builtin['target_machine'] = self.builtin['host_machine']
- self.build_def_files = [os.path.join(self.subdir, environment.build_filename)]
def build_func_dict(self):
self.funcs.update({'add_global_arguments': self.func_add_global_arguments,
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index 4d20cc1..7e61242 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -723,7 +723,7 @@ This will become a hard error in the future.''')
@permittedKwargs({'main_xml', 'main_sgml', 'src_dir', 'dependencies', 'install',
'install_dir', 'scan_args', 'scanobjs_args', 'gobject_typesfile',
'fixxref_args', 'html_args', 'html_assets', 'content_files',
- 'mkdb_args', 'ignore_headers'})
+ 'mkdb_args', 'ignore_headers', 'include_directories'})
def gtkdoc(self, state, args, kwargs):
if len(args) != 1:
raise MesonException('Gtkdoc must have one positional argument.')