aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-02-06Create new xdg moduletingping/xdg-modulePatrick Griffis5-0/+127
Still a work in progress
2017-02-06Update contributor list.Jussi Pakkanen1-0/+1
2017-02-06Merge pull request #1360 from centricular/fix-arch-pythonJussi Pakkanen4-2/+2
test cases\common\135 generated assembly: rename copy.py
2017-02-06Fix absolute prefix/xxxdir subdir check on WindowsNirbheek Chauhan2-2/+10
os.path.commonpath (and our implementation of it) both always return the path using the native operating system path separator, so we can't just directly compare it since the prefix could be specified in '/', and commonpath would use '\' on Windows. Also add a unit test for this.
2017-02-06Do not strip jar targets. Closes #1343.Jussi Pakkanen3-1/+7
2017-02-05tests/common/134: Rename copy.py to copyfile.pyNirbheek Chauhan2-1/+1
On some distros, running this causes Python to find the file itself as the implementation of the `copy` module: $ python3 copy.py Traceback (most recent call last): File "copy.py", line 4, in <module> import shutil File "/usr/lib/python3.4/shutil.py", line 14, in <module> import tarfile File "/usr/lib/python3.4/tarfile.py", line 48, in <module> import copy File "/c/Users/nirbheek/projects/meson.git/test cases/common/134 generated llvm ir/copy.py", line 6, in <module> shutil.copyfile(sys.argv[1], sys.argv[2]) AttributeError: 'module' object has no attribute 'copyfile'
2017-02-04test cases\common\135 generated assembly: rename copy.pyMike Sinkovsky2-1/+1
because down the import dependency chain of copy.py the 'tarfile' module was trying to import the 'copy' standard library module but was finding the copy.py file first because it was in the current directory. Closes https://github.com/mesonbuild/meson/issues/1359
2017-02-02Merge pull request #1342 from centricular/commonpath-py34Jussi Pakkanen4-4/+49
Add our own implementation of os.path.commonpath
2017-02-02ninja: Don't scan generated fortran files for mod depsNirbheek Chauhan1-1/+6
See: https://github.com/mesonbuild/meson/issues/1348
2017-02-02compilers: Don't use CompilerArgs() for sanity checksNirbheek Chauhan1-2/+2
It's only useful to use those when you have to override include dirs or library paths by appending them from various sources according to the priority order, or if the compiler args need to be converted from Unix/GCC-style to native (MSVC, for instance) style. Sanity checks match neither of these. Closes https://github.com/mesonbuild/meson/issues/1351
2017-02-02Fix an uninitialized variable access error.Hemmo Nieminen1-0/+2
To reproduce, one could write: foo = files('foo.c') foo[0].path() and get: Traceback (most recent call last): [snip] File "/home/trhd/Projects/meson/mesonbuild/interpreterbase.py", line 398, in method_call raise InvalidArguments('Variable "%s" is not callable.' % object_name) UnboundLocalError: local variable 'object_name' referenced before assignment Fix this by handling file objects separately.
2017-02-02coredata: Fix setting of prefix inside default_optionsNirbheek Chauhan1-1/+1
Closes https://github.com/mesonbuild/meson/issues/1349
2017-01-30Run some unit tests on all platformsNirbheek Chauhan1-1/+3
InternalTests can be run on all platforms since they have nothing Linux-specific.
2017-01-30coredata: Use our own implementation of commonpathNirbheek Chauhan3-2/+45
os.path.commonpath was added in Python 3.5, so just write our own for now. pathlib was added in Python 3.4, so this should be ok. We need to use that instead of doing str.split() etc because Windows path handling has a lot of exceptions and pathlib handles all that for us. Also adds a unit test for this.
2017-01-29Increment version number for new development.Jussi Pakkanen1-1/+1
2017-01-29Bump version number for release.0.38.0Jussi Pakkanen5-6/+6
2017-01-29Cope with files created with a different umask.Jussi Pakkanen1-2/+4
2017-01-28Check cross-pkg-config's viability with ExternalProgram. Closes #1329.Jussi Pakkanen1-3/+8
2017-01-28Merge pull request #1335 from tp-m/test-custom-target-used-in-test-cmdJussi Pakkanen16-71/+199
tests: check custom target output is created before being used in a t…
2017-01-28Merge pull request #1321 from centricular/compiler-args-classJussi Pakkanen21-271/+730
Improve compiler argument handling with a new class CompilerArgs derived from list()
2017-01-28[mesontest] Implement a quiet option.Hemmo Nieminen1-1/+8
Implement a quiet option that can be used to hide OK messages for successful tests to better highlight the failing ones.
2017-01-28vs: Add support for the 'werror' builtin optionNirbheek Chauhan1-4/+5
2017-01-28vs: Use CompilerArgs() for compile and link argsNirbheek Chauhan2-62/+120
At the same time also fix the order in which they are added. They now match the order used in the Ninja backend.
2017-01-28Disable E266 in flake8Nirbheek Chauhan1-1/+3
Don't tell me how to format my comments!
2017-01-28Use CompilerArgs for generation of link commandsNirbheek Chauhan2-55/+81
Also, now the linker options are added from various sources in the same order as compiler arguments for compile commands. As a result, all libraries and library paths from external and internal sources are added after all the linker options have been added. As a result option_link_args() are added when libraries are added to the list since currently the only thing they add are the libraries specific in cpp_winlibs/c_winlibs. This fixes an issue where compilation with the MinGW toolchain (which uses static libraries for winlibs) would result in undefined symbol errors because the static libraries would be added in the very beginning and hence would not be scanned for symbols. Detailed comments have been added that explain where each option is coming from and why it's been added at that specific point. More improvements are necessary here because we currently still unnecessarily repeat libraries from dependencies over and over, which is a major problem in gst-build because inter-subproject dependencies cause linker command-lines to almost exceed the argument list length limit imposed by the kernel. It is also causing us to unnecessarily add static libraries which have already been linked into a shared library. See: self.build_target_link_arguments()
2017-01-28Add get_no_stdinc_args() for C++ tooNirbheek Chauhan1-0/+3
2017-01-28Add __repr__ for IncludeDirsNirbheek Chauhan1-0/+4
Helps debug issues with include directory handling.
2017-01-28Use CompilerArgs for generation of compile commandsNirbheek Chauhan18-65/+238
At the same time, also fix the order in which compile arguments are added. Detailed comments have been added concerning the priority and order of the arguments. Also adds a unit test and an integration test for the same.
2017-01-28find_program: Translate 'python3' to sys.executable on WindowsNirbheek Chauhan1-3/+9
While reading shebangs, when we detect an attempt to run 'python3', use sys.executable instead. For example: #!/usr/bin/python3 #!python3 #!/usr/bin/env python3
2017-01-28tests/common/117: Check that capturing wrote to a fileNirbheek Chauhan1-3/+12
Without this, the test isn't testing for anything at all. This revealed that custom target output capturing was actually broken on the VS backends.
2017-01-28vs: Fix running of tests to use mesontest.pyNirbheek Chauhan3-17/+54
Back in November when this broke, we didn't notice because our tests are run in-process, so we don't check that `msbuild RUN_TESTS.vcxproj` and `ninja test` actually work. Now we do.
2017-01-28backends: Add support for build_by_default to vs2010 backendNirbheek Chauhan3-51/+67
Always generate the vcxproj file, but only add it to the build configuration if it's either supposed to be built by default, or is a dependency of another target that is built by default.
2017-01-28tests: Move build-by-default unit test to common testsNirbheek Chauhan6-14/+25
Also add a test() that can be run on all platforms. Currently unit tests are only run on Linux, so this was only testing the Ninja backend. This change reveals that build-by-default was broken with the Visual Studio backend.
2017-01-28ninja: Fix build_by_default=false targets in testsNirbheek Chauhan1-3/+20
Previously, build_by_default=false targets would not be built at all even if they were used in a test (as the exe or as a command-line argument) which would lead to a test failure. Now we look into all the defined tests and add all CustomTargets and BuildTargets used in them to the list of build_by_default targets.
2017-01-28tests: build_by_default : false targets used in tests should be builtTim-Philipp Müller3-0/+32
The next commit fixes this.
2017-01-27compilers: New class CompilerArgs derived from list()Nirbheek Chauhan5-89/+281
The purpose of this class is to make it possible to sanely generate compiler command-lines by ensuring that new arguments appended or added to a list of arguments properly override previous arguments. For instance: >>> a = CompilerArgs(['-Lfoo', '-DBAR']) >>> a += ['-Lgah', '-DTAZ'] >>> print(a) ['-Lgah', '-Lfoo', '-DBAR', '-DTAZ'] Arguments will be de-duped if it is safe to do so. Currently, this is only done for -I and -L arguments (previous occurances are removed when a new one is added) and arguments that once added cannot be overriden such as -pipe are removed completely.
2017-01-26interpreter: Implement array.get(index, fallback)Nirbheek Chauhan2-4/+20
If the index is out of range, the fallback value is used. Includes a test. Closes #1337
2017-01-26Merge pull request #1328 from centricular/has-function-prefixJussi Pakkanen2-151/+195
Add prefix before including limits.h in has_function checks
2017-01-26Fix mesonintrospect --installedThibault Saunier1-1/+1
The prefix has been recently added to the install data
2017-01-26Add build_by_default to list of kwargs know by CustomTarget.Jussi Pakkanen1-0/+1
2017-01-26mesontest: Don't add '.' at the end of some printsNirbheek Chauhan1-2/+2
Makes it difficult to copy the filename/datetime by double-clicking since that includes the '.' at the end.
2017-01-26mesontest: Don't overwrite test status on timeoutNirbheek Chauhan1-1/+2
Earlier it would mark tests as "FAIL" even if it skipped.
2017-01-26compilers: Don't run built-in checks on MSVCNirbheek Chauhan2-0/+9
MSVC does not have built-ins, so this is totally useless. Instead, add a test for intrinsics to ensure that we do find them.
2017-01-26compilers: Fix has_function check for builtinsNirbheek Chauhan2-30/+48
Use a single check for both cases when we have includes and when we don't. This way we ensure three things: 1. Built-in checks are 100% reliable with clang and on macOS since clang implements __has_builtin 2. When the #include is present, this ensures that __builtin_func is not checked for (because of MSYS, and because it is faster) 3. We fallback to checking __builtin_func when all else fails
2017-01-26compilers: Add prefix before limits.h in has_function checksNirbheek Chauhan1-5/+7
prefix might define _GNU_SOURCE, which *must* be defined before your first include of limits.h, so we must define it first. There's not really any downsides to including limits.h after the prefix.
2017-01-26compilers: Pass -fpermissive on all C++ compilers except MSVCNirbheek Chauhan1-14/+11
2017-01-26compilers: Use named placeholders for string formattingNirbheek Chauhan1-123/+120
This makes it much clearer what each placeholder will be formatted to.
2017-01-26compilers: Fix builtin checks with clang on LinuxNirbheek Chauhan2-2/+15
Our "43 has function" test should also work with clang and icc on Linux, so enable them. Also detect builtins with __has_builtin if available, which is much faster on clang. There is a feature request for the same with GCC too: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66970
2017-01-25Use Python3 explicitly on this test because shutil.which does not exist on ↵Jussi Pakkanen1-2/+3
Python 2.
2017-01-23Added man page for mesontest.Jussi Pakkanen2-0/+58