Commit Graph

89 Commits

Author SHA1 Message Date
Wolfgang Stöggl f037e7ef45 Fix typos found by codespell
- Typos were found by codespell v1.16.0
2019-11-06 09:55:30 -05:00
Xavier Claessens c6b512e64d mconf: Fix printing options when there is no compiler/project options
Closes: #6087
2019-10-22 22:32:34 +03:00
Xavier Claessens 88e77e69bc mconf: Group all options per subproject and align all groups
Also hide value of yielding subproject options to make it clear the
value must be set on the main project.
2019-10-18 00:49:27 +03:00
Daniel Mensinger 47bdea5040 mconf: Fix meson configure crash (fixes #5909) 2019-09-13 15:44:02 +03:00
Jussi Pakkanen 8a4aceef43 Do not print build and host settings when compiling natively. 2019-08-06 21:34:15 +03:00
John Ericson af2d7af998 Per machine do 'build.' and '' option prefixes
See the docs/ changes for details.
2019-06-05 23:05:34 -04:00
Dylan Baker 146e97e974 Use dependency cache 2019-05-20 10:05:36 -07:00
Dylan Baker d941ca1b19 mconf: Don't change the type of coredata.deps
Which is an OrderedDict, but mconf changes to a plain dict. This will
work fine with Python 3.7+, but not with 3.5 and 3.6
2019-05-16 11:12:17 -07:00
Daniel Mensinger cacc585b44 ast: fix #5376 2019-05-13 02:48:35 +03:00
Daniel Mensinger ea1ad718aa mconf: Limit the line length of the choices column 2019-02-17 20:19:34 +02:00
Jussi Pakkanen 82e4cb7731
Merge pull request #4743 from dcbaker/native-file-extended
Extend native files to store install path information
2019-02-12 20:04:23 +02:00
Jussi Pakkanen a32f31fdfa
Merge pull request #4826 from mensinda/confDefOpts
mconf: Use introspection to print the project default options (fixes #2543)
2019-02-12 20:00:34 +02:00
Dylan Baker 5b896ed70b allow setting directory locations in a native file
This allows the person running configure (either a developer, user, or
distro maintainer) to keep a configuration of where various kinds of
files should end up.
2019-02-11 12:50:32 -08:00
Daniel Mensinger 71d174bcbe
Fixed some code issues 2019-02-05 11:18:57 +01:00
John Ericson 19f81d3e33 Never access environment.properties downstream
Instead use coredata.compiler_options.<machine>. This brings the cross
and native code paths closer together, since both now use that.

Command line options are interpreted just as before, for backwards
compatibility. This does introduce some funny conditionals. In the
future, I'd like to change the interpretation of command line options so

 - The logic is cross-agnostic, i.e. there are no conditions affected by
   `is_cross_build()`.

 - Compiler args for both the build and host machines can always be
   controlled by the command line.

 - Compiler args for both machines can always be controlled separately.
2019-02-02 13:59:14 -05:00
Daniel Mensinger 90bc125d29
mconf: Use introspection to print the project default options (fixes #2543) 2019-01-25 12:21:32 +01:00
Jussi Pakkanen 3bf2ca483e
Merge pull request #4732 from mensinda/introMesonInfo2
mintro: Added `meson-info.json` introspection information about the latest meson run
2019-01-07 23:10:22 +02:00
Nicolas Schneider 3232f780d8 use same code for printing options in mconf and msetup
Also, options are now responsible for providing a suitable printable
representation of their value instead of handling this at the caller.
2019-01-06 19:41:24 -05:00
Daniel Mensinger ab32f1fe00 Added meson-info.json 2019-01-06 22:03:29 +01:00
Jussi Pakkanen a34ac74cf9
Merge pull request #4547 from mensinda/introIncDirs
mintro: Save introspection to disk and --targets modifications
2019-01-06 22:47:25 +02:00
Nicolas Schneider 735e138382 fix meson configure exception when install_umask is not an int 2019-01-06 22:35:04 +02:00
Daniel Mensinger d4ac832bf6
Split the monolithic introspection file into chunks 2019-01-06 12:19:29 +01:00
Daniel Mensinger b91c5aad85
Update intro dump on meson configure 2019-01-06 12:19:29 +01:00
Daniel Mensinger 1759fc8f45
Sorted arrays alphabetically 2018-11-24 10:57:22 +01:00
Xavier Claessens 43101489cd Recover when coredata cannot be loaded
Write command line options into a separate file to be able to
reconfigure from scatch in the case coredata cannot be loaded. The most
common case is when we are reconfiguring with a newer meson version.

This means that we should try as much as possible to maintain backward
compatibility for the cmd_line.txt file format.

The main difference with a normal reconfigure is it will use new
default options values and will read again environment variables like
CFLAGS, etc.
2018-11-06 16:37:13 -05:00
Xavier Claessens 37067a53c4 Use a single ArgumentParser for all subcommands
This has the adventage that "meson --help" shows a list of all commands,
making them discoverable. This also reduce the manual parsing of
arguments to the strict minimum needed for backward compatibility.
2018-10-04 09:40:21 -04:00
Xavier Claessens 1e6d72eb5a Remove useless __main__ in files that cannot be executed 2018-08-22 15:15:54 -04:00
Xavier Claessens 9350b9aa7b mconf: Take only one optional builddir arg that defaults to '.' 2018-06-06 20:02:37 +00:00
Xavier Claessens 75e501ceb8 coredata: Stop setting default option values as argparse attribute
All options are now the projectoptions list, regardless of how they got
defined in the command line.

This also delays setting builtin option values until the main project()
default options are parsed to simplify the code. This is possible
because we already delayed setting the backend after parsing main
project() in a previous commit.
2018-06-06 20:02:37 +00:00
Xavier Claessens 8afbfe227b mconf: Special case UserUmaskOption to print value in octal notation 2018-06-06 20:02:37 +00:00
Xavier Claessens 75cce9e157 mconf: Reduce code duplication and avoid missing builtin options
This ensure all option groups are printed the same way. Also ensure that
we cannot miss some builtin options by taking the list of all builtin
options and excluding only directories/testing options.
2018-06-06 20:02:37 +00:00
Xavier Claessens 04c5c53e3c mconf: Fix print when choices is a string instead of list 2018-06-06 20:02:37 +00:00
Xavier Claessens da29e48d13 mconf: Set prefix first because other options depends on it 2018-06-06 20:02:37 +00:00
Xavier Claessens 8fb72510c3 Move to coredata some methods handling options
Those methods only use coredata object, so better just move them as a
coredata method.
2018-06-06 20:02:37 +00:00
Xavier Claessens 3e6dc8fb71 mconf: Small tweaks when printing configuration 2018-06-06 20:02:37 +00:00
Xavier Claessens aa879b7f0c Fix issues found by flake8 2018-06-06 20:02:37 +00:00
Xavier Claessens b7d442150d Move <lang>_args to coredata.compiler_options 2018-06-06 20:02:37 +00:00
Xavier Claessens 24f1b96dde Fix setting c_args and friends from command line
When passing more than one -Dc_args it should override the value
instead of appending. This is how all other options works.

Value should be split on spaces using shlex just like it does with
CFLAGS environment variable.

Fixes #3473.
2018-05-01 12:09:45 +00:00
Xavier Claessens 570c108635 Fix --warnlevel being renamed to --warning-level in latest release 2018-04-27 11:09:14 -04:00
Xavier Claessens cb5ad2f211 Remove duplicated definition of -D cmdline arg 2018-04-26 22:46:40 -04:00
Filipe Brandenburger 170776d626 Add install_umask to list of options of `meson configure`
Tested:

  $ ./meson.py configure --help
  [...]
    --install-umask INSTALL_UMASK
                          Default umask to apply on permissions of installed
                          files (default: 022).
2018-04-25 14:11:06 -07:00
Dylan Baker 1c48cc08e0 mconf: accept -- options like `meson` does
I'm not really happy about this to be honest, I don't like having both
-- and -D options, I think it's stupid to have two ways to do exactly
the same thing, especially since we then have to validate that someone
hasn't passed the argument both ways.

However, other people want this, so here it is.

Fixes #969
2018-04-17 11:32:26 -07:00
Jussi Pakkanen 9b2e533d87 Always build parser objects anew to avoid leaking old data. 2018-03-27 00:39:45 +03:00
Jukka Laurila 52c50da6c7 Refactor: Add log.error and log.exception to reduce code duplication. 2018-03-10 18:04:52 +02:00
Sander Sweers 3a0ab6a2bc mconf: Make it pep8 compliant 2018-03-04 19:56:53 +01:00
Sander Sweers 9bafde953a mconf: make print_aligned static 2018-03-04 19:54:50 +01:00
Sander Sweers 9d31c751b6 mconf: Do not store dict keys for no reason
If a dict is empty it will evaluate to False
2018-03-04 19:54:50 +01:00
Sander Sweers 84d382f963 mconf: User newline instead of printing empty string 2018-03-04 19:54:50 +01:00
Sander Sweers f805f8e109 mconf: Replace usage of keys() on dicts with direct call by sorted
Calling sorted or list on a dictionary will return the keys.
2018-03-04 19:54:50 +01:00
Sander Sweers 41b5983823 Re-implement function print_aligned
It is now more readable, more pythonic and fixes #3149
2018-03-04 19:54:50 +01:00