summaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #1505 from centricular/dont-use-c++-for-assemblyJussi Pakkanen2017-04-021-3/+3
|\ | | | | Try harder to use the C compiler for compiling asm
| * Try even harder to use the C compiler for assemblyNirbheek Chauhan2017-03-271-13/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now as long as you have a C compiler available in the project, it will be used to compile assembly even if the target contains a C++ compiler and even if the target contains only assembly and C++ sources. Earlier, the order in which sources appeared in a target would decide which compiler would be used. However, if the project only provides a C++ compiler, that will be used for compiling assembly sources. If this breaks your use-case, please tell us. Includes a test that ensures that all of the above is adhered to.
| * Don't require a language/compiler for configuringNirbheek Chauhan2017-03-271-2/+2
| | | | | | | | | | | | Not really needed for projects that don't compile anything. Closes https://github.com/mesonbuild/meson/issues/1208
| * Try harder to use the C compiler for compiling asmNirbheek Chauhan2017-03-271-1/+13
| | | | | | | | | | | | | | | | | | | | | | Use an ordered dict for the compiler dictionary and sort it according to a priority order: fortran, c, c++, etc. This also ensures that builds are reproducible because it would be a toss-up whether a C or a C++ compiler would be used based on the order in which compilers.items() would return items. Closes https://github.com/mesonbuild/meson/issues/1370
* | configure_file: make input arg optional if command is usedTim-Philipp Müller2017-03-291-3/+7
| | | | | | | | Fixes #1476
* | Allow not-required not-found dependencies in subprojectsNirbheek Chauhan2017-03-271-2/+8
| | | | | | | | Closes https://github.com/mesonbuild/meson/issues/1474
* | Fix typo in dependency invalid arguments errorNirbheek Chauhan2017-03-271-2/+2
|/
* declare_dependency: flatten dependencies kwargs allowing [] as no-op depTim-Philipp Müller2017-03-251-1/+1
| | | | | | | | | | An empty / no-op dependency can be expressed as []. This works with the dependencies kwarg in executable targets such as shared_library, but now with declare_dependency, where it would error out with "error: Dependencies must be external deps" because the deps are not flattened in this case. This patch fixes that. Fixes #1500
* wrap: Implement special wrap modes for use by packagersNirbheek Chauhan2017-03-251-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Special wrap modes: nofallback: Don't download wraps for dependency() fallbacks nodownload: Don't download wraps for all subproject() calls Subprojects are used for two purposes: 1. To download and build dependencies by using .wrap files if they are not provided by the system. This is usually expressed via dependency(..., fallback: ...). 2. To download and build 'copylibs' which are meant to be used by copying into your project. This is always done with an explicit subproject() call. --wrap-mode=nofallback will never do (1) --wrap-mode=nodownload will do neither (1) nor (2) If you are building from a release tarball, you should be able to safely use 'nodownload' since upstream is expected to ship all required sources with the tarball. If you are building from a git repository, you will want to use 'nofallback' so that any 'copylib' wraps will be download as subprojects. Note that these options do not affect subprojects that are git submodules since those are only usable in git repositories, and you almost always want to download them.
* wrap: Initialize subprojects that are git submodulesNirbheek Chauhan2017-03-251-5/+7
| | | | | | | | | | This will benefit projects such as GNOME Recipes that prefer using submodules over wraps because it's easier to maintain since git is aware of it, and because it integrates with their existing workflow. Without this, these projects have to manually initialize the submodules which is completely unnecessary. Closes https://github.com/mesonbuild/meson/issues/1449
* Merge pull request #1456 from ieei/compute_intJussi Pakkanen2017-03-231-1/+29
|\ | | | | Add compute_int, fixes #435
| * compiler: Ensure prefix and dependencies are used for alignment.Haakon Sporsheim2017-03-101-1/+5
| | | | | | | | | | This is now similar to how prefix and dependencies are used in all the other similar checks performed by the compiler.
| * compiler: Fix compute_int and sizeof for cross compilation.Haakon Sporsheim2017-03-101-3/+12
| | | | | | | | sizeof now uses compute_int which again binary searches for correct value.
| * compiler: Add compute_int functionality.Haakon Sporsheim2017-03-091-0/+15
| | | | | | | | Fixes #435
* | interpretter: Use a namedtuple for the ModuleStateThibault Saunier2017-03-201-19/+24
|/
* Merge pull request #1402 from centricular/test-setup-fixesJussi Pakkanen2017-02-201-1/+5
|\ | | | | Various fixes to how mesontest handles test setups.
| * add_test_setup: Treat no env as empty envNirbheek Chauhan2017-02-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise env is {} and we get a traceback trying to use the setup: $ /home/cassidy/dev/meson/mesontest.py -C build --setup valgrind ninja: Entering directory `/home/cassidy/dev/gst/master/gst-build/build' ninja: no work to do. Traceback (most recent call last): File "/home/cassidy/dev/meson/mesontest.py", line 579, in <module> sys.exit(run(sys.argv[1:])) File "/home/cassidy/dev/meson/mesontest.py", line 575, in run return th.doit() File "/home/cassidy/dev/meson/mesontest.py", line 337, in doit self.run_tests(tests) File "/home/cassidy/dev/meson/mesontest.py", line 485, in run_tests self.drain_futures(futures, logfile, jsonlogfile) File "/home/cassidy/dev/meson/mesontest.py", line 504, in drain_futures self.print_stats(numlen, tests, name, result.result(), i, logfile, jsonlogfile) File "/usr/lib64/python3.5/concurrent/futures/_base.py", line 398, in result return self.__get_result() File "/usr/lib64/python3.5/concurrent/futures/_base.py", line 357, in __get_result raise self._exception File "/usr/lib64/python3.5/concurrent/futures/thread.py", line 55, in run result = self.fn(*self.args, **self.kwargs) File "/home/cassidy/dev/meson/mesontest.py", line 216, in run_single_test child_env.update(self.options.global_env.get_env(child_env)) AttributeError: 'dict' object has no attribute 'get_env' There is no harm in doing this, and this is the simplest fix for this. Closes https://github.com/mesonbuild/meson/issues/1371
| * Add repr() for EnvironmentVariables{,Holder}Nirbheek Chauhan2017-02-191-0/+4
| | | | | | | | Makes it easier to debug issues with it
* | Merge pull request #1403 from centricular/compile_resourcesJussi Pakkanen2017-02-201-8/+29
|\ \ | |/ |/| Make configure_file() great again
| * configure_file: Substitute @INPUT@/@OUTPUT@/etc in commandNirbheek Chauhan2017-02-201-8/+25
| | | | | | | | | | | | | | | | | | | | | | The same substitutions and rules as custom_target(). Also generally fix it to actually work when run in a subdir and with anything other than absolute paths for input and output files. We now also log a message when configuring files. Includes tests for all this.
| * configure_file: Don't allow both command and configuration kwargsNirbheek Chauhan2017-02-201-1/+5
| |
* | run_command: Fix error message on incorrect argumentNirbheek Chauhan2017-02-191-1/+2
| | | | | | | | Be more descriptive so people know what they can do.
* | rpm: We no longer provide the full path to a libraryNirbheek Chauhan2017-02-191-3/+0
| | | | | | | | | | | | Ever since we changed how we do library searching, the full path to the library has not been available under `.fullpath`. This has been broken for at least a year...
* | find_program: Fix implementation of .path()Nirbheek Chauhan2017-02-191-3/+3
| | | | | | | | | | | | | | | | And actually test that prog.path() works. The earlier test was just running the command without checking if it succeeded. Also make everything use prog.get_command() or get_path() instead of accessing the internal member prog.fullpath directly.
* | find_program: Support passing mesonlib.File objectsNirbheek Chauhan2017-02-191-2/+14
|/ | | | | This means you can pass files() and the return value of configure_file() to find_program() now.
* Prohibit absolute paths in subdir().Jussi Pakkanen2017-02-171-0/+2
|
* Prohibit manually built paths that point in srcdir in include_directories ↵Jussi Pakkanen2017-02-171-1/+20
| | | | and give information on what to use instead.
* Merge pull request #1368 from dimkr/subproject_defaultsJussi Pakkanen2017-02-091-2/+3
|\ | | | | Bug fix - KeyError on subproject without default options
| * Bug fix - KeyError on subproject without default optionsDima Krasner2017-02-071-2/+3
| |
* | dependencies: Distinguish native/cross while cachingNirbheek Chauhan2017-02-071-0/+12
|/ | | | Closes https://github.com/mesonbuild/meson/issues/1366
* Support file perms for install_data and install_subdirNirbheek Chauhan2017-01-241-6/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | With the 'install_mode' kwarg, you can now specify the file and directory permissions and the owner and the group to be used while installing. You can pass either: * A single string specifying just the permissions * A list of strings with: - The first argument a string of permissions - The second argument a string specifying the owner or an int specifying the uid - The third argument a string specifying the group or an int specifying the gid Specifying `false` as any of the arguments skips setting that one. The format of the permissions kwarg is the same as the symbolic notation used by ls -l with the first character that specifies 'd', '-', 'c', etc for the file type omitted since that is always obvious from the context. Includes unit tests for the same. Sadly these only run on Linux right now, but we want them to run on all platforms. We do set the mode in the integration tests for all platforms but we don't check if they were actually set correctly.
* cleanup: Remove redundant parenthesesMike Sinkovsky2017-01-181-3/+3
|
* cleanup: Unused local variablesMike Sinkovsky2017-01-181-8/+5
|
* Can use targets directly in test arguments.Jussi Pakkanen2017-01-151-4/+8
|
* mesontest: Improve test suite selection.Hemmo Nieminen2017-01-121-8/+8
| | | | | Suite option can now be given to specify in more detail which tests should be run.
* style: [E1**] IndentationMike Sinkovsky2017-01-111-2/+2
|
* style: [E303] too many blank lines (2)Mike Sinkovsky2017-01-111-1/+0
|
* style: [E711] comparison to None should be 'if cond is None:'Mike Sinkovsky2017-01-111-1/+1
|
* style: [E502] the backslash is redundant between bracketsMike Sinkovsky2017-01-111-5/+5
|
* Add .find_python() method. Supersedes #777.Jussi Pakkanen2017-01-091-3/+8
|
* There are two different kinds of extensions: modules that create newJussi Pakkanen2017-01-091-14/+16
| | | | objects directly and snippets that just call into interpreter methods.
* Created a Python 3 module for simpler building of Python extension modules.Jussi Pakkanen2017-01-091-20/+34
|
* Merge pull request #1278 from mesonbuild/newmodulesJussi Pakkanen2017-01-091-29/+47
|\ | | | | Bring some order to modules
| * Fix Gnome module.Jussi Pakkanen2017-01-091-27/+17
| |
| * Fix a few more modules.Jussi Pakkanen2017-01-061-7/+28
| |
| * Create a module return value object.Jussi Pakkanen2017-01-041-2/+9
| |
* | Can get values in ConfigurationData objects.Jussi Pakkanen2017-01-061-1/+12
|/
* Merge pull request #1260 from mesonbuild/subproj_defaultsJussi Pakkanen2017-01-031-11/+48
|\ | | | | Can set subproject option defaults from command line and master project
| * Support default_options in dependency() fallbacks.Jussi Pakkanen2017-01-021-1/+6
| |
| * Can override project option default values in subproject().Jussi Pakkanen2016-12-291-3/+28
| |