summaryrefslogtreecommitdiff
path: root/mesonbuild/mesonmain.py
Commit message (Collapse)AuthorAgeFilesLines
...
* mesonlib: handle meson exe wrappersMartin Kelly2018-05-301-0/+8
| | | | | | | | | | | | | | | | | | | | There are cases when it is useful to wrap the main meson executable with a script that sets up environment variables, passes --cross-file, etc. For example, in a Yocto SDK, we need to point to the right meson.cross so that everything "just works", and we need to alter CC, CXX, etc. In such cases, it can happen that the "meson" found in the path is actually a wrapper script that invokes the real meson, which may be in another location (e.g. "meson.real" or similar). Currently, in such a situation, meson gets confused because it tries to invoke itself using the "meson" executable (which points to the wrapper script) instead of the actual meson (which may be called "meson.real" or similar). In fact, the wrapper script is not necessarily even Python, so the whole thing fails. Fix this by using Python imports to directly find mesonmain.py instead of trying to detect it heuristically. In addition to fixing the wrapper issue, this should make the detection logic much more robust.
* depfixer: We no longer run this as a scriptNirbheek Chauhan2018-05-241-3/+0
|
* Write coredata transactionally. Closes #3511.Jussi Pakkanen2018-05-211-1/+5
|
* Merge pull request #3485 from xclaesse/warnlevelJussi Pakkanen2018-04-291-6/+5
|\ | | | | --warnlevel got renamed to --warning-level
| * Fix --warnlevel being renamed to --warning-level in latest releaseXavier Claessens2018-04-271-4/+5
| |
| * Remove duplicated definition of -D cmdline argXavier Claessens2018-04-261-2/+0
| |
* | New argument: --profile-self for profiling performanceNirbheek Chauhan2018-04-271-3/+16
|/ | | | | | Outputs two profile logs: one for the interpreter run and another for the backend-specific build file generation. Both are stored in meson-private in the build directory.
* Move builtin_argument_registration to coredataDylan Baker2018-04-171-21/+1
| | | | | | We're going to want to use these functions in meson configure as well to make the command line options the same between `meson` and `meson configure`.
* Accept builtin options with -D when making initial meson callDylan Baker2018-04-171-0/+20
| | | | | | | | | | | | | | | | | | | | Currently meson only accepts `-Dopt=value` for builtin options when calling `meson configure` and `--opt=value` for builtin options when calling `meson` initially. This is a confusing behavior, and users only get a small warning at the top of a potentially long configuration summary to catch this. This has confused end users and developers alike, there are at least 5 duplicates of the bug this fixes, and I have personally been asked about this more times than I can count. The help documentation doesn't make it clear that -D cannot be used to set options like prefix and bindir. This adds support for -D options to the initial meson call, but not -- options to the meson configure call. I think it's better to have one way to do things, and -- options are kinda one off while -D is used everywhere else, so lets stick with that. Related #969
* mesonmain: be DRYDylan Baker2018-04-171-24/+4
| | | | | | We have all the information needed to calculate the builtin arguments in the coredata module already, don't duplicate that in the mesonmain module as well.
* coredata: encapsulate destination nameDylan Baker2018-04-171-2/+2
| | | | | This means that there are no special args passed ot builtin args anymore.
* coredata: Add helper for setting actionDylan Baker2018-04-171-5/+7
| | | | | | | Currently we manually pass the argparse action, this isn't very DRY, since the builtin_types already has all the data necessary to find that. This adds a new function to determine the action based on the default type.
* Convert Gnome module to use find_program from interpreter.Jussi Pakkanen2018-04-151-1/+2
|
* Grab a file lock on the build dir during modifications.Jussi Pakkanen2018-03-201-1/+2
|
* Refactor: Add log.error and log.exception to reduce code duplication.Jukka Laurila2018-03-101-10/+4
|
* Make "meson help" and "meson help <subcommand>" do the expected thing.Jukka Laurila2018-03-061-0/+7
|
* Harmonize data pickling.Hemmo Nieminen2018-03-011-6/+4
| | | | | Try to be more consistent on using save() and load() methods to pickle data.
* Verify that failing tests are failing with an error, not a python exceptionJon Turney2018-02-151-1/+2
| | | | | | | | | | | | | | | PR #2527 suggests "making failing tests more strict about failing gracefully". To achive this, make meson exit with distinct exit statuses for meson errors and python exceptions, and check the exit status is as expected for failing tests. I can't see how to write a test for this, within the current framework. You can test this change by reverting the fix (but not the test) from commit 1a159db8 and verifying that 'test cases/failing/66 string as link target' fails.
* Ensure any generation error appears in the logfile and thus in CI outputJon Turney2018-02-141-4/+5
| | | | | | | | | | | | | | | Since c2a5ac39, MesonApp.generate() closes the logfile before returning, which means that when invoked by mesonmain.run(), any MesonException is not logged there. MesonApp.generate() does not appear to have any other users I can find. This somewhat reduces the diagnostic value of the logfile. This also interacts badly with running project tests in CI, as _run_tests chooses to report the logfile contents, rather than stdout, for the configure step, and it thus doesn't report any configure error which caused a test failure.
* Report warning/error locations in a format IDEs may already know how to parseJon Turney2018-01-301-2/+3
| | | | | | | | | | | | | | | Examples: meson.build:2:0: ERROR: Dependency is both required and not-found meson.build:4: WARNING: Keyword argument "link_with" defined multiple times. These are already matched by the default compilation-error-regexp-alist in emacs. Also: Don't start 'red' markup until after the \n before an error Unabsorb full-stop at end of warning with location from mlog.warning() Update warning_location test
* Removed duplicate if branch.Jussi Pakkanen2018-01-181-2/+0
|
* Bump minimum supported Python from 3.4 to 3.5.Jussi Pakkanen2018-01-041-2/+2
|
* Added init command that creates a sample exe project.Jussi Pakkanen2017-12-311-1/+3
|
* Remember which Visual Studio backend was auto-detectedGabrĂ­el ArthĂșr PĂ©tursson2017-12-301-0/+1
| | | | | | | This fixes the REGEN build target since VSINSTALLDIR does not get set by Visual Studio when building targets. Fixes #2848.
* mesonmain: Remove useless ternaryDylan Baker2017-12-191-1/+1
| | | | This ternary checks the value of a bool, and returns the same value.
* Don't print traceback when options are invalidDylan Baker2017-11-281-1/+5
| | | | | | | | Currently passing a bad combo or array option, providing a non-boolean to a bool arg, or a host of other things can cause an traceback from a MesonException, don't do that. Fixes #2683
* Make the full test suite runnable with an external command.Jussi Pakkanen2017-11-201-42/+44
|
* Replaced sys.executable use with the mesonlib equivalent.Jussi Pakkanen2017-11-201-1/+1
|
* Add command to run Python scripts with the current interpreter.Jussi Pakkanen2017-11-201-0/+6
|
* Merge pull request #2511 from jon-turney/prefix-dependent-defaultsJussi Pakkanen2017-11-131-1/+6
|\ | | | | Make sysconfdir, localstatedir and sharedstatedir defaults depend on prefix
| * Make sysconfdir, localstatedir and sharedstatedir defaults depend on prefixJon Turney2017-10-281-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | Rather than requiring a bit of boilerplate in every meson.build, which is only documented in a comment in mesoncore.py, use sensible defaults for sysconfdir, localstatedir and sharedstatedir depending on the prefix. Fixes #1637 v2: For clarity, give get_builtin_option_default() a noneIfSuppress argument, rather than overloading prefix '' and None with special meanings.
* | Print correct command in help messageEric Engestrom2017-11-091-1/+1
| | | | | | | | | | | | | | | | | | | | Taking mconf for instance: before: $ meson configure --help usage: meson [-h] [-D SETS] [--clearcache] [directory [directory ...]] after: $ meson configure --help usage: meson configure [-h] [-D SETS] [--clearcache] [directory [directory ...]]
* | Dump coredata earlier.Elliott Sales de Andrade2017-11-061-16/+12
|/ | | | | | | | | Unfortunately, `time.time` and file timestamps are not guaranteed to be in sync and due to various kernel caches may be different enough to cause rebuilds to fail [1]. This was masked by older ninja versions that could not read sub-second timestamps. [1] https://travis-ci.org/mesonbuild/meson/jobs/296797872
* flake8: Perform suggested whitespace/formatting changesLuke Shumaker2017-09-211-5/+5
| | | | | This only touches newlines, spaces, and (occaisionally) commas. Anything else is left for another commit.
* logging: Print location of log file on errorNirbheek Chauhan2017-09-141-1/+5
| | | | | | Similar to configure Closes https://github.com/mesonbuild/meson/issues/2316
* Update message for already configured builddirChet Gurevitch2017-09-121-7/+6
|
* wrap-mode: Make the error output more usefulNirbheek Chauhan2017-09-071-1/+9
| | | | | | Now it errors out while displaying the possible options See: https://bugs.python.org/issue25061 for native support
* Merge pull request #2163 from chetgurevitch/masterJussi Pakkanen2017-08-201-4/+5
|\ | | | | Don't error if build directory is already configured and update instructions
| * Tell users about ninja rebuild and meson configureChet Gurevitch2017-08-181-2/+3
| |
| * Don't error if build directory is already configuredChet Gurevitch2017-08-181-3/+3
| |
* | Ensure log file gets closed.Jussi Pakkanen2017-08-181-0/+6
|/
* Print deprecation warnings on old style commands.Jussi Pakkanen2017-08-021-3/+6
|
* Add command multiplexer to main Meson invoker.Jussi Pakkanen2017-08-021-2/+24
|
* Run postconf scripts after dumping coredata.Elliott Sales de Andrade2017-07-151-5/+11
| | | | | | | MESONINTROSPECT is set when running postconf scripts, which implies that introspection is possible. But it isn't really possible because coredata hasn't been written yet. We also still need to make sure to delete coredata if any postconf scripts fail.
* Add an env var to force meson to print a backtraceNirbheek Chauhan2017-06-091-0/+4
| | | | | | | This is really useful when debugging test failures. Without a stack trace, you have to grep the source code for the error message. Also set this in run_tests.py.
* Whitespace tweaks to reduce Flake8 warningsAlistair Thomas2017-05-291-1/+1
|
* Clarify multiple uses of -D. Closes #1836.Jussi Pakkanen2017-05-261-2/+2
|
* Moved coverage commands to a standalone script.Jussi Pakkanen2017-05-131-0/+3
|
* Created a dist target. Closes #877.Jussi Pakkanen2017-05-111-0/+3
|
* Merge pull request #1587 from mesonbuild/tingping/msgfmt-datadirJussi Pakkanen2017-05-031-0/+3
|\ | | | | i18n: Improve data_dirs support