Commit Graph

291 Commits

Author SHA1 Message Date
Alberto García Hierro ffa9459eed commandrunner: Forward KeyboardInterrupt to command
Some commands, notably gdb, use ctrl+c themselves to perform actions
without exiting. Instead of making meson exit and thus, kill the
subprocess, ignore the KeyboardInterrupt and continue waiting for
the child.
2019-11-17 13:54:38 +02:00
Binh Nguyen f6758f2434 Prevent install_name_tool to run on EXE when cross compile on OSX 2019-11-12 20:39:23 +02:00
Marc-André Lureau 1ed70e22b9 Add source tags targets 2019-10-22 20:48:24 +03:00
Jussi Pakkanen cce172432b Use run-clang-tidy when available. 2019-10-21 20:34:41 +03:00
Daniel Mensinger 80ec5e9d28 Fix all flake8 warnings 2019-10-20 17:44:43 +03:00
Jussi Pakkanen d3b389f349 Add clang-tidy target. Closes #2383. 2019-10-01 22:02:51 +03:00
Ting-Wei Lan 0390b673f1 Find clang-format with alternative names
This is similar to what we currently do for scan-build except there is
no environment variable to choose a specific clang-format to run. If an
environment variable is needed for better control, we can add it later.
2019-09-29 00:11:15 +08:00
Gabriel Ganne e7197895b2 uniform scan-build detection process
Detect scan-build the same way when trying to launch it and when
generating the target.
The detection method is:
  1. look within SCANBUILD env variable
  2. shutil.which('scan-build')
  3. *on non-linux platforms only*: go through all the possible
     name candidates and test them individually.

The third step is added following this comment
https://github.com/mesonbuild/meson/pull/5857#issuecomment-528305788
However, going through a list of all the possible candidates is neither
easily maintainable nor performant, and is therefore skipped on
platforms that should not require such a step (currently, only Linux
platforms).

This is a follow-up to the issue raised by @lantw44 during PR:
https://github.com/mesonbuild/meson/pull/5857
2019-09-14 05:51:36 +03:00
Aleksey Gurtovoy 75daed27bc mesonlib.split_args/quote_arg/join_args 2019-09-05 23:42:47 +03:00
Thibault Saunier 42c5e4fe2b wine: Try to get the short paths when generating WINEPATH
The size of WINEPATH is limited (1024 [until recently]), we
can very easily reach that limit, and even the new one (2048) so
try to keep path as small as possible by using the shortPath
version of paths.

Also assert that we do not reach the new hard limit.

And avoid having duplicates in the list of path.

[until recently]: https://bugs.winehq.org/show_bug.cgi?id=45810
2019-08-24 06:43:47 -04:00
Xavier Claessens 44ac680e55 gtkdoc: Use find_program() to get gtkdoc tools
This will allow using gtk-doc as a subproject instead of having to
install it on the system. It also has the side effect of failing at
configuration time with a proper message if gtkdoc is not installed,
instead of failing at build time with a python backtrace.
2019-08-04 21:40:55 +03:00
Jussi Pakkanen 2e6df380f1
Merge pull request #5644 from bonzini/meson-exe-cmdline
Show command line in `ninja -v` for `capture: true` custom targets and generators
2019-08-03 01:28:27 +03:00
Michael Hirsch, Ph.D 7aecfb1540 remove unreachable code 2019-08-02 14:31:22 +03:00
Jussi Pakkanen 7ce2a24f42 Made dist a top level command. 2019-07-23 23:26:46 +03:00
Paolo Bonzini d34e532020 backends: do not split command and arguments in ExecutableSerialisation
This is not needed anymore, just make a single field with the whole
command line.
2019-07-19 00:17:29 +02:00
Paolo Bonzini b4d313b058 backends: remove unnecessary fields from ExecutableSerialisation
"exe.is_cross and exe.needs_exe_wrapper" is the same condition under which
meson chooses whether to include the exe_wrapper.  meson_exe has an assertion
for that, but now that meson_exe does not need anymore exe.is_cross,
we can simplify the code if we just "trust" meson to do the right thing.

Remove both fields from ExecutableSerialisation and just test the presence
of the wrapper, and also remove the executable basename which is only
used to "beautify" an assertion failure.
2019-07-19 00:17:29 +02:00
Paolo Bonzini ed348b7da8 backends: discover java/mono wrapper at generation time
Move the magic to execute jar and .exe files from "meson --internal exe"
to the backend, so that "ninja -v" shows more clearly what is happening.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-07-19 00:17:29 +02:00
Paolo Bonzini 8239d71025 backends: create ExecutableSerialisation in meson_exe if possible
If meson_exe is only being used to capture the output of the command,
we can skip going through a pickled ExecutableSerialization object.
This makes "ninja -v" output more useful.
2019-07-19 00:17:29 +02:00
Daniel Mensinger bc0f510ef1 fix all flake8 issues 2019-07-18 23:43:29 +03:00
Marc-André Lureau 451a32d1c8 meson: skip captured write if content didn't change
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2019-07-15 19:11:47 +00:00
Norbert Nemec 4b25253bfd Reference error code as hex value and improve comment 2019-07-10 01:03:01 +03:00
Norbert Nemec 62c975659f diagnostics for missing DLLs on Windows in meson_exe.py 2019-07-10 01:03:01 +03:00
Jussi Pakkanen ba6c0cab8f Use the same directory names for dist so that ccache works. Closes #5583. 2019-07-01 21:11:39 +03:00
Dylan Baker 6e4e0028a1 meson_exe: Don't assert that we need an exe_wrapper when we say we don't need one
Fixes cross compiling mesa from x86_64 -> x86 on an x86_64 system.

Fixes #5567
2019-06-27 21:06:41 +03:00
Christoph Reiter 27c5d9f16f gnome.yelp(): Fix media symlink fallback path
When the media file for a specific language doesn't exist we try to symlink
it to the C one. If symlinking fails we need to fall back to copying the C
one like in the non-symlink case.

The fallback code path didn't set the source so this always failed.

Also check if the C fallback exists before trying to symlink/copy, otherwise
we crash if C isn't the first lang we try.
2019-06-06 19:15:04 +03:00
Daniel Mensinger 3581839f4c
Fix unused variables warnings 2019-04-29 12:22:50 +02:00
Daniel Mensinger bf98ffca9e
Fix blind exceptions 2019-04-29 12:16:06 +02:00
Dylan Baker 5678468c2c Don't use len() to test for container emptiness
I ran the numbers once before (it's in the meson history) but it's
*much* faster to *not* use len for testing if a container is empty or
not.
2019-04-25 12:28:51 -07:00
Richard Kjerstadius 48ee6a6148 Add gcovr 4.2 support
The out-of-source build syntax for gcovr 4.2 is different compared to
previous versions and therefore an update was needed. In researching the
most appropriate solution it was found that any gcovr version older than
3.3 always resulted in 0% coverage. Because of this, rather than adding
an additional layer of logic, some already existing logic was modified
to ensure correct syntax for the new version, while versions older than
3.3 are flagged as not supported.

Closes mesonbuild#5089.
2019-04-24 20:05:21 +02:00
Jussi Pakkanen 8b42dc9274 Update list of potential scan-build binaries. Closes #5287. 2019-04-22 21:44:03 +03:00
Konstantin 841995cddf i18n: add args keyword to merge_file
* i18n: add args keyword to merge_file

* i18n: add testcase to msgfmt args
2019-04-22 14:54:05 +03:00
Vladimír Čunát e4f3894582 dist: recurse into git submodules 2019-04-21 23:13:01 +03:00
Arkadiusz Hiler 690dd723f4 Add symbol sizes to .symbols files
If we change a symbol size (e.g. array) in a .c file that is a part of
.so, executables that use it are not re-linked resulting in a runtime
error:

"Symbol xyz has different size in shared object, consider re-linking"

Adding symbol sizes to .symbol files fixes this issue.
2019-04-04 22:10:40 +03:00
jonathan MERCIER ff299eb36b Read file as utf8 on python3 2019-04-03 21:42:15 +03:00
Jussi Pakkanen e3e83e2acd Also format headers with Clang-Format. Closes #5184. 2019-04-01 01:26:53 +03:00
Eli Schwartz 4f9ecbee09 gettext: prefer POTFILES.in if it exists
If POTFILES.in exists, then it will have come from autotools, in which
case it is explicitly the file passed to xgettext -f, and the POTFILES
file itself is generated by autotools as a proxy file which eventually
gets inlined into the final Makefile as a variable "POTFILES = ......"

In this case, attempting to use POTFILES as the input file will simply
result in syntax errors and the inability to find files with a literal
trailing " \" in the name. Usually POTFILES will not exist at all, and
we would fallback on POTFILES.in, but if the source tree happens to be
dirty, this would result in errors. Since it's never going to be right
to use it, we can just do the right thing from the start and carry on.
2019-03-28 23:22:23 +02:00
Dylan Baker e279775511 dist: Handle git worktrees, which have a .git file instead of dir
This is the second most straight forward stupid way of handling
this (with usiing os.path.exists) as the most stupid obvious way. The
only major advantage is that having .git as something other than a
file or directory still doesn't register.

Fixes: #3378
2019-01-30 23:20:49 +02:00
Jussi Pakkanen 1fca654055 Add a clang-format target. 2018-12-30 00:50:00 +02:00
William A. Kennington III 61d462706a coverage: Also remove source_root prefixes
The code our projects care about verifying coverage for mostly lives in
the source_root with the exception of the generated source files in
build_root. This change cleans up the output so we don't have prefixed
paths on our source files anymore.
2018-12-16 20:24:05 +02:00
Jussi Pakkanen c66d4c144a Better Python exe detector. Closes #4614. 2018-12-12 16:15:18 +02:00
Mohammed Sadiq 41a98d0fdd coverage: Print summary after gcovr html generation
summary from stdout is often used by Automated builds to show build details

The --print-summary option was added to gcovr in v3.2, since html output
was added only in 3.1, limitting support to 3.2 won’t be a big deal.

--print-summary is not enabled for text/xml report generation as it will
result in meson not supporting any gcovr version less than 3.2.
2018-12-02 19:47:42 +02:00
Marvin Scholz fc3e2f5ad0 depfixer: Do not try to fix rpaths of dlls 2018-10-25 19:30:02 +03:00
Jon Turney 93f7b83bf5 Fix flake8 'imported but unused' reports
$ flake8 | grep F401
./mesonbuild/minstall.py:15:1: F401 'gzip' imported but unused
./mesonbuild/backend/backends.py:26:1: F401 '..compilers.get_macos_dylib_install_name' imported but unused
./mesonbuild/backend/backends.py:29:1: F401 'functools.lru_cache' imported but unused
./mesonbuild/scripts/dist.py:27:1: F401 'mesonbuild.dependencies.ExternalProgram' imported but unused
2018-10-24 19:11:46 +03:00
David Seifert 3a8911a07f Do not try to remove duplicate RPATH entries on macOS 2018-10-14 23:50:52 +03:00
Mohammed Sadiq 25fef3d1fa coverage: fix lcov branch coverage generation
lcov branch coverage are disabled by default.  So branch
coverage has to be enabled for every stage to make them work.

Fixes https://github.com/mesonbuild/meson/issues/4319
2018-10-09 22:43:27 +03:00
Guido Günther 1e7aea65e6 scanbuild: Split SCANBUILD using shlex
This allows invocations like

    SCANBUILD="scan-build --status-bugs" ninja scan-build

Closes: #4334
2018-10-08 20:21:32 +03:00
Jan Tojnar c0c075c129 Make custom dist scripts accept arguments.
meson.add_dist_script, introduced in #3906, did not accept any arguments
other than script name. Since all other meson.add_*_script methods
do accept args, this makes the dist script accept them as well.
2018-10-04 21:20:57 +03:00
dx-mon 65cb7b0241 Fixed the lack of stdout being displayed when not in capture mode for meson_exe (meson --internal exe) 2018-10-04 00:17:35 +03:00
Jussi Pakkanen ca4c8de09f
Merge pull request #4261 from rossburton/cross
WIP RFC gnome.py cross improvements
2018-09-28 12:56:40 -07:00
Nirbheek Chauhan 4a8210e81c dist: Warn if there are uncommitted changes in the repository
Closes https://github.com/mesonbuild/meson/issues/1977
2018-09-28 12:55:59 -07:00