Commit Graph

75 Commits

Author SHA1 Message Date
Jon Turney 3194ab9420 Add myself to authors.txt 2017-04-06 22:48:02 +01:00
Aaron Plattner c80ca384b2 Don't crash if a meson.build file is empty (#1570)
* Don't crash if a meson.build file is empty

Commit 9adef3a8e8 caused an empty meson.build file to generate a traceback:

 Traceback (most recent call last):
   File "/usr/lib/python3.6/site-packages/mesonbuild/mparser.py", line 415, in getsym
     self.current = next(self.stream)
 StopIteration

 During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
   File "/usr/lib/python3.6/site-packages/mesonbuild/mesonmain.py", line 298, in run
     app.generate()
   File "/usr/lib/python3.6/site-packages/mesonbuild/mesonmain.py", line 180, in generate
     intr.run()
   File "/usr/lib/python3.6/site-packages/mesonbuild/interpreter.py", line 2529, in run
     super().run()
   File "/usr/lib/python3.6/site-packages/mesonbuild/interpreterbase.py", line 125, in run
     self.evaluate_codeblock(self.ast, start=1)
   File "/usr/lib/python3.6/site-packages/mesonbuild/interpreterbase.py", line 146, in evaluate_codeblock
     raise e
   File "/usr/lib/python3.6/site-packages/mesonbuild/interpreterbase.py", line 140, in evaluate_codeblock
     self.evaluate_statement(cur)
   File "/usr/lib/python3.6/site-packages/mesonbuild/interpreterbase.py", line 151, in evaluate_statement
     return self.function_call(cur)
   File "/usr/lib/python3.6/site-packages/mesonbuild/interpreterbase.py", line 372, in function_call
     return self.funcs[func_name](node, self.flatten(posargs), kwargs)
   File "/usr/lib/python3.6/site-packages/mesonbuild/interpreterbase.py", line 47, in wrapped
     return f(self, node, args, kwargs)
   File "/usr/lib/python3.6/site-packages/mesonbuild/interpreter.py", line 2237, in func_subdir
     self.evaluate_codeblock(codeblock)
   File "/usr/lib/python3.6/site-packages/mesonbuild/interpreterbase.py", line 146, in evaluate_codeblock
     raise e
   File "/usr/lib/python3.6/site-packages/mesonbuild/interpreterbase.py", line 140, in evaluate_codeblock
     self.evaluate_statement(cur)
   File "/usr/lib/python3.6/site-packages/mesonbuild/interpreterbase.py", line 151, in evaluate_statement
     return self.function_call(cur)
   File "/usr/lib/python3.6/site-packages/mesonbuild/interpreterbase.py", line 372, in function_call
     return self.funcs[func_name](node, self.flatten(posargs), kwargs)
   File "/usr/lib/python3.6/site-packages/mesonbuild/interpreterbase.py", line 47, in wrapped
     return f(self, node, args, kwargs)
   File "/usr/lib/python3.6/site-packages/mesonbuild/interpreter.py", line 2233, in func_subdir
     codeblock = mparser.Parser(code, self.subdir).parse()
   File "/usr/lib/python3.6/site-packages/mesonbuild/mparser.py", line 410, in __init__
     self.getsym()
   File "/usr/lib/python3.6/site-packages/mesonbuild/mparser.py", line 417, in getsym
     self.current = Token('eof', '', self.current.line_start, self.current.lineno, self.current.colno + self.current.bytespan[1] - self.current.bytespan[0], (0, 0), None)
 AttributeError: 'Parser' object has no attribute 'current'
2017-04-07 00:10:48 +03:00
Jussi Pakkanen 655757bc00 Merged Valgrind dependency branch. 2017-04-04 22:26:55 +03:00
Philipp Ittershagen 734b1973e5 update authors.txt 2017-04-03 21:11:30 +02:00
melak47 d2548e6e83 strip trailing backslash from WindowsSDKVersion (#1538) 2017-03-30 14:29:34 +03:00
Dylan Baker 7aa28456df Add dependency type for Valgrind
Valgrind is a bit of a strange beast, in general use one isn't supposed
to link against valgrinds libs, they're non-PIC static libs, instead,
including the headers does magic to make valgrind work.

This patch implements a simple ValgrindDependency class subclassed from
PkgConfigDependency, that overwrites (effectively) only the
get_link_args method to always return an empty list. This solution may
seem strange, but I think that it follows the principle of least
surprise, and simplifies the most common use case for valgrind.

Essentially without this every valgrind consumer would be forced to
implement the following code to have a usable valgrind dependency
object:

_dep = dependency('valgrind', required : false)
if _dep.found()
  valgrind_dep = declare_dependency(
    compile_args : _dep.get_pkgconfig_variable('Cflags')
  )
else
  valgrind_dep = []
endif

While the above is workable, it's surprising behavior and the above code
snippet becomes boilerplate that everyone needs to copy into their meson
files.

Fixes #826
2017-03-29 13:56:29 -07:00
kalmiya fa10703124 fix "Meson encountered an error in file meson.build, line 19, column … (#1536)
fix "Meson encountered an error in file meson.build, line 19, column 8: Unknown method "set_install_script" in object."
2017-03-29 23:37:51 +03:00
Peter Harris 65377ff16a Fix warning making static libs on msvc/ninja
The MSVC static library tool, lib.exe, does not understand the same set
of arguments as the linker. Avoid a warning by not adding /DEBUG or /PDB
to the command line when invoking lib.exe
2017-03-28 23:01:48 +03:00
Joe Baldino 1f63044f6e compilers: fix swift sanity check
The "1 + 2" swift sanity check produces a swiftc compiler warning
(result unused). For this sanity check, compile a print statement as is
done with fortran.

My first patch, so update authors.txt as well.
2017-03-26 23:12:40 +03:00
Aaron Small 9adef3a8e8 EmptyNode needs a line/column number too. There are times its line
and column are printed out by other parser code.

Add a print of the line with the error, and where on the line the error
occurred.

Add a print of where the block scope started, if the error is due to
missing the block scope end token.
2017-03-25 19:08:35 +02:00
Michal Sojka 1713aef364 Do not colorize output on dumb terminals
Dumb terminal is provided e.g. by Emacs for programs run within it.
2017-03-08 06:37:42 -05:00
Marc Becker 92d18b9256 Fix directory context for git wrap check 2017-02-27 13:04:20 -05:00
Hase Bastian ff34e6c0b2 Update authors.txt 2017-02-21 01:36:08 +05:30
Jussi Pakkanen c8042b5574 Merged clang color. 2017-02-20 21:15:59 +02:00
Rodrigo Lourenço 73e36c5b2b Add myself as an author. 2017-02-20 19:11:30 +00:00
Fabio Porcedda 9de7ed82ee authors: add myself 2017-02-17 17:11:19 +01:00
Dima Krasner 795fc62b62 Added myself to authors.txt 2017-02-08 20:22:09 +02:00
Jussi Pakkanen 4dae59dfea Update contributor list. 2017-02-06 20:15:47 +02:00
Jussi Pakkanen 5ff97b0f35 Update author list. 2017-01-03 22:56:31 +02:00
Kseniia Vasilchuk 7dc6ba3518 Add myself to authors.txt 2016-12-22 02:04:36 +02:00
Matthieu Gautier 9d1e426bcc Fix installation of statically linked executable for ELF binary.
At installation, if the executable is a ELF file, we try to fix the
dependencies in the binary section.
If a executable has been compiled with the --static flag, there is
no .dynamic section in the ELF binary and so we need to handle this case.
2016-12-21 22:03:18 +02:00
Marc-Antoine Perennou e43dda1363 add myself to authors.txt
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2016-12-05 10:57:33 +01:00
Daniel Stone 1cb9d2bc0d Support skipped tests
Knowing whether a test failed to run as its prerequisites were not
available, or whether those prerequisites were available and produced
unexpected/incorrect results, is a useful differentiation.

Add support for skipped tests by testing for exit code 77, used through
autotools/piglit/etc to denote a test which detected this and decided to
skip.
2016-11-29 13:13:29 -05:00
Olexa Bilaniuk 05e217caa5 Fixed SyntaxError in itstool invocation in yelphelper.py during
installation.

During a `python3.4 setup.py install`, the yelphelper.py script errors
out with: "SyntaxError: can use starred expression only as assignment
target". Fix this problem.
2016-11-12 13:06:16 -05:00
alvarez86 87f07cdf3d Minor adjusts (#1001)
* contributing: Use should instead of thould

* interpreter: Use exist_ok parameter in subdir function

We explicitly depend on python 3.4 or newer, which means the exist_ok
parameter is available. Use it instead of a try with a pass on except.

* authors: Add my name at the end of authors file
2016-11-07 11:26:46 -08:00
Mark Schulte cb53da3cc1 Adding my name to authors.txt as requested
contributing.txt requests I had my name to authors.txt.
2016-10-27 14:42:52 -07:00
Aurelien Jarno caa1ef6318 Fix depfixer on MIPS. 2016-10-24 12:14:42 -07:00
Jouni Kosonen 3a385ba393 Added myself to author list as suggested in PR 940 2016-10-23 00:37:28 +03:00
AlexandreFoley 263cb6a5f0 add support of mercurial repo for wrap,… (#937)
* add support for wrap of mercurial repo, and a test with a clone of the sample subproject used for the git test into a mercuriel repo.

* Added myself to author list, and switched the URL of the sample subproject in the wrap file to one under the control of the project's maintainers.
2016-10-20 00:10:00 +03:00
Gautier Pelloux-Prayer 7bd06d88d5 cmake2meson.py: Fix missing quote around options type/name 2016-10-18 22:52:43 +03:00
Scott D Phillips 08aeac22a9 Don't raise exception when a fallback dependency is not found
If a fallback dependency is not found just return None.  The
caller can then raise the exception it already has if
required=True, or just continue on if required=False.
2016-10-17 19:32:09 +03:00
Guillaume Poirier-Morency d9da74e075 Add myself to 'author.txt' 2016-10-16 11:06:17 -04:00
Emanuele Aina 6c50253645 Use argv[0] to internally relaunch meson.py
When installing Meson, distutils may choose to put shim scripts in the
`PATH` that only set up the egg requirements before launching the real
`meson.py` contained in the egg.

This means that `__file__` points to the real `meson.py` file, but
launching it directly is doomed to fail as it's missing the metadata
contained in the shim to set up the path egg, resulting in errors when
trying to import the `mesonbuild` module.

A similar issue affects Meson when installed as a zipapp, with the
current code going great lengths to figure out how to relaunch itself.

Using `argv[0]` avoids these issues as it gives us the way the current
executable has been launched, so we are pretty much guaranteed that
using it will create another instance of the same executable. We only
need to resolve relative paths as the current working directory may
get changed before re-launching the script, and using `realpath()` for
that saves us the trouble of manually resolving links and getting caught
in endless loops.

This also mean that `meson_script_file` no longer necessarily point to a
absolute file, so rename it to `_launcher` which hopefully would be less
prone to inducing false assumptions.
2016-10-08 15:41:31 +02:00
Franz Zapata ac41a45669 Support running Meson as a Python zip application 2016-09-28 12:40:54 -04:00
grindhold 167deda665 module pkgconfig: added install_dir attribute (#776)
the pkgconfig module automatically specified to install the
pkgconfig file to {libdir}/pkgconfig. Default settings in meson
already include multiarch-directories like x86_64-gnu-linux into
the libdir. pkgconfig usually does not check inside multiarch-dirs
for any pkgconfig-files.
to make this a bit more flexible, this commit introduces the
install_dir attribute for pkgconfig.generate. if it is set, the
default install path will be overridden by the users input
2016-09-11 00:20:49 +03:00
Jussi Pakkanen 1ae45e3eb2 Updated authors. 2016-09-04 20:11:44 +03:00
TingPing 0e79664155 Minor pkgconfig module cleanups (#748)
* pkgconfig: Remove unused function

Leftover copy from modtest

* Add self to authors.txt
2016-09-02 23:11:54 +03:00
Elliott Sales de Andrade acdcc3ccf2 Add myself to authors.txt. 2016-08-26 20:46:42 -04:00
Matthias Klumpp 56823272ab Implement D support
This patch adds support for the D programming language[1] to Meson.

The following compilers are supported:
* LDC
* GDC
* DMD

[1]: http://dlang.org/
2016-08-19 03:02:51 +02:00
Jussi Pakkanen c6ca8a59be Add missing name. 2016-08-14 20:43:32 +02:00
Zhe Wang bc347aed0b GnuCPPCompiler: allow usage of GNU extensions (#619)
* GnuCPPCompiler: allow usage of GNU extensions

* Add myself to authors.txt
2016-06-27 19:31:07 +03:00
ippytraxx f64c978695 Add myself to authors.txt 2016-06-18 15:23:42 +02:00
Noam Meltzer 981211e1f2 add myself to authors file 2016-06-16 20:52:19 +03:00
Sam Thursfield c76837a3d7 Add myself to authors.txt 2016-06-15 15:16:11 +01:00
Martin Hostettler 48f990aa85 Add myself to the authors file. 2016-06-14 21:34:09 +02:00
Emmanuele Bassi 245d6b0904 Add myself to the authors file 2016-05-25 15:59:23 +01:00
Tim-Philipp Müller 02e84df010 Add more string functions: contains(), to_upper() and to_lower() 2016-03-12 14:15:31 +00:00
Jussi Pakkanen 97c22fadbe Merged XCode fix. 2016-02-26 22:05:47 +02:00
Jussi Pakkanen 6422069c8a Authors.txt updating. 2016-02-26 21:59:56 +02:00
Rogiel Sulzbach f98dc48a8d Fix Xcode backend
This makes the following changes:
 * Explicitly closes the file for force flushing (this fixes an issue on which the last 2 or 3 lines weren't being written to disk)
 * Adds another check on the PBXBuildFile stage to get the file name if the returned source type is a File instead of a string

Fixes issue #337
2016-02-25 18:32:26 -03:00