Commit Graph

478 Commits

Author SHA1 Message Date
Xavier Claessens 4d7ccd1399 Make werror per subproject option 2020-03-24 22:48:55 +02:00
Jussi Pakkanen 253fbc4470 Bump version number for rc1. 2020-03-24 10:53:02 +02:00
John Ericson 3a4388e51d Fix legacy env var support with cross
Fix #3969
2020-03-23 17:51:36 +02:00
Nirbheek Chauhan 69e9d32bca coredata: Warn on usage of both -Dbuildtype and -Doptimization/-Ddebug
It may not be obvious to users that these two ways to set build-types
override each other and specifying both is redundant, and conflicts
are resolved based on whichever is specified later.

Closes https://github.com/mesonbuild/meson/issues/6742
2020-03-11 07:11:59 -04:00
Nirbheek Chauhan bd953b6b29 coredata: Passing an option is supposed to set it, not flip the default
With the current logic passing `--debug` will actually be parsed as
`-Ddebug=false`, which is absolutely not what is expected.

There is no case in which the presence of a boolean option in `--foo`
form will mean 'I want feature foo disabled', regardless of the
*default* value of that option.

Also includes a test.

Closes https://github.com/mesonbuild/meson/issues/4686
2020-03-11 07:11:59 -04:00
Nirbheek Chauhan c7aa4c8861 coredata: Set default options as cmdline args that override each other
The previous code was assuming that options do not depend on each
other, and that you can set defaults using `dict.setdefault()`. This
is not true for `buildtype` + `optimization`/`debug`, so we add
defaults + overrides in the right order and use the options parsing
code later to compute the values.

Includes a test.

Closes https://github.com/mesonbuild/meson/issues/6752
2020-03-11 07:11:59 -04:00
Nirbheek Chauhan bc135f6c4d coredata: Convert all option parsing to OrderedDict()
This ensures that options are always parsed in the order in which they
were specified on the command-line, even with Python 3.5, and
non-CPython implementations compatible with CPython 3.5 and 3.6.

Closes https://github.com/mesonbuild/meson/issues/6742
2020-03-11 07:11:59 -04:00
Stéphane Cerveau cc4e9e79be coredata: init_builtins should always call libdir_cross_fixup
As the interpreter reinitialize the coredate builtins, need to call
again libdir_cross_fixup
2020-03-02 19:09:31 +05:30
Dylan Baker be9bff81a2 coredata: Fix search and replace mistake
A descriptive string had List replaced with T.List on accident.
2020-02-21 14:34:20 -05:00
Dylan Baker edb52e9003 coredata: Warn on reconfigure if PKG_CONFIG_PATH has changed
Fixes #6520
Fixes #5223
2020-02-21 14:34:20 -05:00
Xavier Claessens 76ae865864 coredata: Fix crash when cmd_line_options contains booleans
`meson setup --debug` puts a bool object in cmd_line_options dictionary
that we have to convert to string.

Fixes: #6646
2020-02-19 09:31:50 -05:00
Jussi Pakkanen 47759550e5 Add unity block size option. 2020-02-12 22:31:08 +02:00
Jussi Pakkanen 6b5c1a4fc3 Refactor UserIntegerOption to work with BuiltinOption. 2020-02-12 22:31:08 +02:00
Xavier Claessens 3ba0073df6 Make 'default_library' per-subproject builtin option
Currently it's just like if all builtin/base/compiler options are
yielding. This patch makes possible to have non-yielding builtin
options. The value in is overriden in this order:
 - Value from parent project
 - Value from subproject's default_options if set
 - Value from subproject() default_options if set
 - Value from command line if set
2020-02-06 14:11:24 -05:00
Jon Turney a3e2aa2d66
Fix prefix dependent option defaults (#6552)
* Extend test_prefix_dependent_defaults unit test to cover default case

Extend test_prefix_dependent_defaults unit test to cover the default
case, when the default prefix is '/usr/local'. (On Windows, the default
prefix is 'c:/')

* Restore adjusting option defaults depending on the default prefix

Restore adjusting option defaults, depending on the default prefix.
Droppped in d778a371
2020-02-04 23:27:59 +02:00
Daniel Mensinger 4104cbdaf9
typing: Fix Any --> T.Any 2020-01-31 09:48:21 +01:00
Michael Hirsch, Ph.D 00f5dadd5b
Bugfix: sanitize_dir: use pathlib to handle case-insensitive filesystems (#6398) 2020-01-30 23:07:44 +02:00
Jussi Pakkanen 7375eaa263 Always disable interpolation for ini parsers. 2020-01-27 22:22:12 +02:00
Xavier Claessens b6b4903129 mconf: Recommend using --reconfigure when setting unknown options
Fixes: #6477
2020-01-25 12:08:47 +02:00
Daniel Mensinger 09b53c534f types: import typing as T (fixes #6333) 2020-01-08 15:28:17 +01:00
Jussi Pakkanen 74d245a8c0 Bump version number for new development. 2020-01-07 22:57:44 +02:00
Jussi Pakkanen 8d576eba91 Prepare new release. 2020-01-07 22:12:25 +02:00
Dylan Baker 47dfe34c85 Consider compiler arguments in linker detection logic
If a user passes -fuse-ld=gold to gcc or clang, they expect that they'll
get ld.gold, not whatever the default is. Meson currently doesn't do
that, because it doesn't pass these arguments to the linker detection
logic. This patch fixes that. Another case that this is needed is with
clang's --target option

This is a bad solution, honestly, and it would be better to use $LD or a
cross/native file but this is needed for backwards compatability.

Fixes #6057
2019-12-12 10:57:27 -08:00
Dylan Baker 87766b3727 Allow setting <lang>_args before the compiler is detected
This is required to be able to pass compiler and linker arguments to the
methods that try to guess what linker to use.
2019-12-12 10:52:07 -08:00
Michael Hirsch, Ph.D 1031c96d31 catch malformed command line array option with helpful error
fixes #6291
2019-12-07 07:24:31 -05:00
Michael Hirsch, Ph.D 9cb600cbb8 type anno 2019-12-07 07:24:31 -05:00
Daniel Mensinger e4a0ee205d lgtm: Fix redundant code 2019-12-05 00:22:10 +02:00
Daniel Mensinger 286b9f0921 lgtm: Fix Module imported with `import` and `import from` 2019-12-05 00:22:10 +02:00
Paulo Neves 07389e23bc coredata: CmdLineFileParser no longer interpolates strings.
Previously if a user tried to pass a command line build
option that contained a '%' character the command line
parser assumed that there was string interpolation to be
done. As there is no sense in such a scenario no code
provides any input for the interpolation. This then leads to
a failure.

In this commit we specifically override the defaults in
ConfigParser and set interpolation to None, which disables
command line build option interpolation.

Fixes #6157
2019-11-13 22:04:15 +02:00
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
Jussi Pakkanen ba1367b588 Bump version number for new development. [skip ci] 2019-10-06 22:53:31 +03:00
Jussi Pakkanen 2779603c68 Updated version numbers for 0.52.0 release. 2019-10-06 20:05:19 +03:00
Jussi Pakkanen 0b4d1e8afd Cross build is defined by the existance of a cross file. 2019-10-06 17:46:16 +03:00
Olexa Bilaniuk e32b0f8fbb Deduplicate PKG_CONFIG_PATH entries when initializing the array option pkg_config_path.
This avoids a warning about duplicate entries in an array option,
and closes #5736.
2019-09-30 20:54:08 +03:00
Xavier Claessens 2e7f0ce557 Print user defined options in meson-log.txt
It can be useful to know what options have been passed to the command
line, excluding default values.

Closes: #5956
2019-09-25 22:50:48 +03:00
Aleksey Gurtovoy 75daed27bc mesonlib.split_args/quote_arg/join_args 2019-09-05 23:42:47 +03:00
Clinton Roy bba3ae5724 correct function call 2019-09-03 08:48:28 -07:00
Jussi Pakkanen 5fd4963766 Made build. options alias basic ones when native building. 2019-08-06 21:34:15 +03:00
Jussi Pakkanen 534c95cc3e Made set_option kwargs named-only. 2019-08-06 21:34:15 +03:00
Dylan Baker e33183a4cc coredata: Ignore directories when searching for machine files
Otherwise having an output directory matching the name of the cross file
in the current working directory will cause an error. This patch instead
collects any invalid names and prints them along with the error message
when no valid file can be found.

Fixes #5640
2019-07-31 22:36:59 +03:00
Dylan Baker 019f73dd7c coredata: Add a type for the options dict
This is used in a lot of places, having a single way to reference it is
convenient. It's placed under a typing.TYPE_CHECKING guard to mimimize
runtime impact
2019-07-23 09:58:24 +00:00
Michael Hirsch, Ph.D 85cc424712 expanduser for tilde 2019-07-07 23:10:14 +03:00
Dylan Baker 56f7e5c74f coredata: Correctly handle receiving a pipe for native/cross files
* coredata: Correctly handle receiving a pipe for native/cross files

In some cases a cross/native file may be a pipe, such as when using bash
process replacement `meson --native-file
<([binaries]llvm-config='/opt/bin/llvm-config')`, for example. In this
case we copy the contents of the pipe into a file in the meson-private
directory so we can create a proper ninja dependency, and be able to
reload the file on --wipe/--reconfigure. This requires some extra
negotiation to preserve these native/cross files.

Fixes #5505

* run_unitests: Add a unit test for native files that are pipes

Using mkfifo.
2019-06-23 17:53:17 +03:00
Jussi Pakkanen 8dfc24dbf1 Update version number for new development. 2019-06-16 23:51:31 +03:00
Jussi Pakkanen 5ecab57667 Update things for new release. 2019-06-16 22:03:29 +03:00
John Ericson 07777e15d4 Purge `is_cross` and friends without changing user interfaces
In most cases instead pass `for_machine`, the name of the relevant
machines (what compilers target, what targets run on, etc). This allows
us to use the cross code path in the native case, deduplicating the
code.

As one can see, environment got bigger as more information is kept
structured there, while ninjabackend got a smaller. Overall a few amount
of lines were added, but the hope is what's added is a lot simpler than
what's removed.
2019-06-09 13:13:25 -04: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 0714ba58c7 coredata: add cmake_prefix_path option 2019-05-27 01:24:08 +03:00
Dylan Baker 146e97e974 Use dependency cache 2019-05-20 10:05:36 -07:00
Dylan Baker 5df6823bd8 coredata: Introduce a class to act as the dependency cache
Handling the PKG_CONFIG_PATH variable in meson introduces a new problem
for caching dependencies. We want to encode the pkg_config_path (or
cross_pkg_config_path if we're cross compiling) to be part of the key,
but we don't want to put that into the key for non-pkg-config
dependencies to avoid spurious cache misses (since pkg_config_path isn't
relevant to cmake, for example). However, on a cache lookup we can't
know that a dependency is a pkg-config dependency until we've looked in
the cache.

My solution is a two layer cache, the first layer remains the same as
before, the second layer is a dict-like object that encapsulates the
dependency type information and uses pkg_config_path and
cross_pkg_config_path as a sub key (and could be extended easily for
other types). A new object type is introduced to encapsulate this so
that callers don't need to be aware of the implementation details.
2019-05-17 12:26:20 -07:00
Dylan Baker 0b66a106e3 coredata: fix bugs reading PKG_CONFIG_PATH
There are two distinct bugs here:
1) if PKG_CONFIG_PATH is unset then the variable will be set to [''],
   which causes it to have the wrong behavior in some truthiness tests
2) We read PKG_CONFIG_PATH on invocations after the first, which causes
   it to overwrite the value saved into the coredata.dat file. Putting
   the two bugs together it means that -Dpkg_config_path doesn't work
   with `meson configure`
2019-05-16 10:46:39 -07:00
John Ericson 957d8e051c Make `PerMachine` and `MachineChoice` have just `build` and `host`
Meson itself *almost* only cares about the build and host platforms. The
exception is it takes a `target_machine` in the cross file and exposes
it to the user; but it doesn't do anything else with it. It's therefore
overkill to put target in `PerMachine` and `MachineChoice`. Instead, we
make a `PerThreeMachine` only for the machine infos.

Additionally fix a few other things that were bugging me in the process:

 - Get rid of `MachineInfos` class. Since `envconfig.py` was created, it
   has no methods that couldn't just got on `PerMachine`

 - Make `default_missing` and `miss_defaulting` work functionally. That
   means we can just locally bind rather than bind as class vars the
   "unfrozen" configuration. This helps prevent bugs where one forgets
   to freeze a configuration.
2019-05-16 00:27:57 +03:00
John Ericson 4030e7cb7a UserOption no longer has a name field.
This avoids the duplication where the option is stored in a dict at its
name, and also contains its own name. In general, the maxim in
programming is things shouldn't know their own name, so removed the name
field just leaving the option's position in the dictionary as its name.
2019-05-15 14:21:47 +03:00
Dylan Baker c0aa89e57f
Merge pull request #4952 from mensinda/cacheCompiles
Cache compilers.compile() in coredata
2019-05-02 14:54:02 -07:00
John Ericson 4c2617a9c6 Add some type annotations and fix lints
Some things, like `method[...](...)` or `x: ... = ...` python 3.5
doesn't support, so I made a comment instead with the intention that it
can someday be made into a real annotation.
2019-05-02 10:58:23 -07:00
Daniel Mensinger c9bd84fd25
Cache compile results in coredata 2019-04-28 14:31:49 +02:00
Dylan Baker 3edc7f343b coredata: store cross/native files in the same form they will be used (#5224)
* coredata: store cross/native files in the same form they will be used

Currently they're forced to absolute paths when they're stored in the
coredata datastructure, then when they're loaded we de-absolute path
them to check if they're in the system wide directories. This doesn't
work at all, since the ninja backend will generat a dependency on a
file that is in the source directory unless the path was already given
as absolute. This results in builds being retriggereed forever due to
a non-existant file.

The right way to do this is to figure out whether the file is in the
build directory, is absolute, or is in one of the system paths at
creation time, and store that path as absolute. Then the code that
reads the file and the code that generates the dependencies in the
ninja backend just takes the computed list and there is no mismatch
between them.

Fixes #5257

* run_unittests: Add a test for correct native file storage

This tests the bug in #5257
2019-04-21 23:10:02 +03:00
TheQwertiest bf65660509 Updated meson --help output 2019-04-20 14:17:13 +03:00
Jussi Pakkanen 04710b087a Add support for VS2019. Closes #4640. 2019-04-10 23:13:47 +03:00
Dylan Baker 377b652b93 coredata: Add ability to mark options as having separate cross values
Currently this only marks the pkg_config_path flag, but it could be
used to mark any of these values as having separate values for cross
and native builds, assuming that the necessary plumbing is done.
2019-04-05 15:08:17 -07:00
Dylan Baker 569e646e1e dependencies: Add command line option for pkg_config_path
This creates a new command line option to store pkg_config_path into,
and store the environment variable into that option. Currently this
works like the environment variable, for both cross and native targets.
2019-04-05 15:08:17 -07:00
Dylan Baker 5ce0d9fbbb coredata: Don't log warnings about reserved prefixes 2019-04-05 09:26:42 -07:00
Dylan Baker 863de72599 coredata: Fold add_builtin_argument into BuiltinOption
It really is a method of the BuiltinOption class, not a standalone
function.
2019-04-04 15:02:20 -07:00
Dylan Baker 1d7eda5fc8 coredata: Merge get_builtin_option_cmdline_name into BuiltinOption 2019-04-04 15:02:20 -07:00
Dylan Baker c3cb966631 coredata: merge get_builtin_option_default in to BuiltinOption 2019-04-04 15:02:20 -07:00
Dylan Baker 5aa2219f50 coredata: pull get_builtin_option_choices into BuiltinOption
We can remove some guards here since we know the object will have
certain attributes.
2019-04-04 15:02:20 -07:00
Dylan Baker 1e5496d1ba coredata: Remove get_builtin_option_description
Since the attribute is always accessible from a BuiltinOptions
instance we don't need a special function for this.
2019-04-04 15:02:20 -07:00
Dylan Baker 6940848f0b coredata: Move argparse action getterin into BuiltinOption class 2019-04-04 15:02:20 -07:00
Dylan Baker f8fcc7174d coredata: Remove is_builtin_option
This is a silly abstraction at this point.
2019-04-04 15:02:20 -07:00
Dylan Baker c6060d795c coredata: remove get_builtin_options
This returns a list out of th keys of a dict. In both cases of use
remaining though it's used for checking membership, checking for list
membership, lists are O(n) lookup, while dicts are O(1), so removing
the abstraction reduces typing and improves performance.
2019-04-04 15:02:20 -07:00
Dylan Baker d778a371ac coredata: Add an object to abstract builtins
Currently the builtins are stored as lists, then there are a mess of
functions which take said lists, check what the type of the first
thing is, and then extract data from various points in the list based
on that.

This is stupid. This is what structs/classes are for.
2019-04-04 15:02:17 -07:00
Jussi Pakkanen 1a79fdd7e7 Reuse build setup for host when native compiling. Closes #5047. 2019-04-01 19:20:08 +00:00
John Ericson e677704d21 Don't collect preprocssor flags separately from compiler flags
I recall that @jpakkane never wanted this, but @nirbheek did, but then
@nirbheek changed his mind.

I am fine either way except for the cross inconsistency that exists
today: There is no `c_preproc_args` or similar one can put in the cross
file, so no way to replicate the effect of CPPFLAGS during cross
compilation.
2019-03-27 14:45:42 +00:00
Ross Burton 65e59c84a1 mesonbuild: allow multiple --cross-file options
Just like --native-file, allow multiple --cross-file options.  This is mostly
unifying the logic between cross_files and config_files.
2019-03-20 10:06:17 +00:00
Ross Burton d57dd1092e load_configs: generalise the search path
Instead of hard-coding the fact that load_configs() searches for files under
meson/native, pass in the subdirectory allowing the cross-file code to use the
same logic.
2019-03-19 19:16:30 +00:00
Jussi Pakkanen 35c3cf2822 Bump version number for new development. 2019-03-10 20:40:31 +02:00
Jussi Pakkanen 9f48f5fe94 Update everything for new release. 2019-03-10 19:25:09 +02:00
John Ericson 2d6d242aec Feed compiler Properties to get its options defaulted
Before, the logic initialization compiler options from environment
variables vs config files was strewn about. Now, it is consolidated. We
leverage the new `envconfig.py` module to expose the configuration data
to `compilers.py` without creating an import cycle.
2019-02-27 13:10:16 -08:00
jml1795 a9e63568fe Add warning level zero 2019-02-19 00:06:27 +02:00
John Ericson 9d7f38eccd Fix cross file initialization of CPPFLAGS
'c_arg' entries should become *both* compiler options and external
peprocessor options for C. (And likewise for a few other languages.)
Seems inconsistent to me, but this is the status quo.
2019-02-15 09:17:24 -08: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
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
Nirbheek Chauhan a683fc30ab Use ConfigParser instead of deprecated SafeConfigParser
Fixes this annoying warning while running the tests:

mesonbuild/coredata.py:237: DeprecationWarning: The SafeConfigParser
class has been renamed to ConfigParser in Python 3.2. This alias will be
removed in future versions. Use ConfigParser directly instead.
2019-01-31 20:12:21 +05:30
Nirbheek Chauhan d02ec7111e coredata: Only reject a load if major version differs
Our builddir ABI is stable across minor (stable) releases, so there is
no need to force a wipe. We already release pretty often, no need to
force people to wipe twice as often.
2019-01-23 19:50:50 +05:30
Dylan Baker dbe2a29637 coredata: Serialize native files into the cmd_line.txt file
Because we need to store those as well.
2019-01-17 13:21:00 -05:00
Dylan Baker 8668a4e2ec coredata: Handle EOFError like UnpicklingError
If the coredata file has been truncated, that's pretty much the same as
being corrupt, handle that via the same path.
2019-01-17 13:21:00 -05:00
Dylan Baker ed0ad91f1c coredata: Handle AttributeError in unpickling coredata
Which can happen due to internal refactorings, such as the removal of
the ConfData class between 0.49 and 0.50
2019-01-17 13:21:00 -05:00
Daniel Mensinger af38722f89 mintro: Introspection interpreter refactoring (#4733)
* Fixed spelling

* Merged the Buildoptions and Projectinfo interpreter

* Moved detect_compilers to Environment

* Added removed test case

* Split detect_compilers and moved even more code into Environment

* Moved set_default_options to coredata

* Small code simplification in mintro.run

* Move cmd_line_options back to `environment`

We don't actually wish to persist something this unstructured, so we
shouldn't make it a field on `coredata`. It would also be data
denormalization since the information we already store in coredata
depends on the CLI args.
2019-01-16 23:42:54 +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
Nicolas Schneider 735e138382 fix meson configure exception when install_umask is not an int 2019-01-06 22:35:04 +02:00
John Ericson e147054d6f Get rid of `ConfigData` 2019-01-02 16:22:47 -05:00
Daniel Mensinger 10ce5deb71
Introspection refactoring 2018-12-29 23:55:45 +01:00
Jussi Pakkanen da5da5977a Default libdir is "lib" when cross compiling. Closes #2535. 2018-12-30 00:51:19 +02:00
John Ericson 9b13fb3672 Factor out more option iterating 2018-12-20 23:01:36 +02:00
John Ericson 4ffd009fe9 Factor out iterator over options dictionaries
Otherwise it's easy to forget one. In fact we did forget one:
`backend_options` in `validate_option_value`.
2018-12-18 20:40:24 +02:00
Jussi Pakkanen 6124a97722 Bump version number for new development. 2018-12-10 00:33:03 +02:00
Jussi Pakkanen 51aaa15bda Update everything for release 0.49.0 2018-12-09 21:58:12 +02:00
John Ericson 0fd548e16f Combine `run_tests` import lines in `run_unittests` 2018-12-03 22:33:20 +02:00
Dylan Baker 3af4407a16 Get basic native config file loading working 2018-11-14 15:57:37 -08:00
Xavier Claessens 8aeb967773 coredata: Do not use ':' as key delimited in cmd_line.txt 2018-11-09 20:32:52 -05: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
Jussi Pakkanen 4d986563dc Expose wrap_mode as an option. Closes #4266. 2018-10-07 22:52:54 +03:00
Jussi Pakkanen 3c4822e183 Updated version number for new development. 2018-09-22 23:36:09 +03:00
Jussi Pakkanen d1f3f1d023 Bump version number for release. 2018-09-22 20:21:49 +03:00
Zbigniew Jędrzejewski-Szmek 06646fe772 Drop unnecessary periods from help strings
The ones for "Compiler options" have no dots, so this was inconsistent.
Also dropping the dots makes the text fit better on narrow terminals.
2018-09-18 21:49:34 +03:00
Jussi Pakkanen 3f51745b41 New numbering scheme for pre-release versions. [skip ci] 2018-09-13 22:20:48 +03:00
Xavier Claessens 05cab3dee5 Set wrap_mode to None by default to know if user passed a value 2018-08-22 15:15:54 -04:00
Xavier Claessens 576f3bb1bf UserArrayOption: Allow duplicates when used as <lang>_args option
Closes: #4021.
2018-08-20 16:16:38 -04:00
Jussi Pakkanen d83f77109a
Convert buildtype to optimization and debug options (#3489) 2018-08-18 20:39:47 +03:00
Jussi Pakkanen 7bb5f82736 Added install target to VS. Closes #3841. 2018-07-22 16:05:09 +03:00
Nirbheek Chauhan 4fb00ee1d8 Add new method: mlog.deprecation()
Instead of constructing it manually, use a helper.
2018-07-07 04:33:24 -07:00
Jon Turney b387ab1ee1 Fix flake8 issues (#3834)
* Fix flake8 whitespace reports

$ flake8 | grep -E '(E203|E221|E226|E303|W291|W293)'
./mesonbuild/coredata.py:337:5: E303 too many blank lines (2)

* Fix flake8 'variable assigned value but unused' reports

$ flake8 | grep -E F841
./mesonbuild/modules/gnome.py:922:9: F841 local variable 'target_name' is assigned to but never used

* Fix flake8 'imported but unused' reports

$ flake8 | grep F401
./mesonbuild/compilers/__init__.py:128:1: F401 '.c.ArmclangCCompiler' imported but unused
./mesonbuild/compilers/__init__.py:138:1: F401 '.cpp.ArmclangCPPCompiler' imported but unused
./mesonbuild/modules/__init__.py:4:1: F401 '..mlog' imported but unused

PR #3717 imports ARMCLANG compilers in __init__, but does not add them to
__all__, so they are not re-exported by the compilers package like
everything else.

* More details about flake8 in Contributing.md

Mention that Sider runs flake8
Suggest seting flake8 as a pre-commit hook
2018-07-05 18:08:04 +00:00
Jussi Pakkanen 36fbb48b43 Bump version number for new development. [skip ci] 2018-07-02 22:19:32 +03:00
Jussi Pakkanen 5d08219464 Update everything for new release. 2018-07-02 20:50:56 +03:00
Dylan Baker f3a8f9c34d Options: treat array option -Dopt= and -Dopt=[] as equivalent
Currently the former will be parsed as [''], while the latter is parsed
as [] in python. This makes for some obnoxious special handling
depending on what the user passes. This is even more obnoxious since for
string type arguments this doesn't require special handling.
2018-06-29 10:56:25 +00:00
Xavier Claessens 99dd5f34de Downgrade unknown option from exception to warning
It used to be non-fatal warnings but recent command line refactor made
it fatal. It looks like GNOME continuous would break with this change.
To avoid delaying upcoming 0.47.0 release adoption, let's downgrade this
back to warning for now and reconsider after the release.
2018-06-19 20:29:57 +00:00
Xavier Claessens e565945253 Add UserFeatureOption type
This is a special type of option to be passed to most 'required' keyword
arguments. It adds a 3rd state to the traditional boolean value to cause
those methods to always return not-found even if the dependency could be
found.

Since integrators doesn't want enabled features to be a surprise there
is a global option "auto_features" to enable or disable all
automatic features.
2018-06-18 04:57:32 +00:00
Niklas Claesson 14716ea90c Visual Studio: Implement startup project 2018-06-10 23:36:54 +03:00
Jon Turney 2e34024a05 Refine cross file checking to ignore directories
e.g. 'meson x86_64-w64-mingw32 --cross-file x86_64-w64-mingw32' currently
fails with an IsADirectoryError exception.

Cross files must be files, so when searching, only accept a candidate path
which is an existing file, not just an existing path.
2018-06-09 17:27:07 +03:00
Xavier Claessens 7c4736d27f Convert args.projectoptions into a dict
This simplifies a lot of code, and centralize "key=value" parsing in a
single place.

Unknown command line options becomes an hard error instead of
merely printing warning message. It has been warning it would become an
hard error for a while now. This has exceptions though, any
unknown option starting with "<lang>_" or "b_" are ignored because they
depend on which languages gets added and which compiler gets selected.
Also any option for unknown subproject are ignored because they depend
on which subproject actually gets built.

Also write more command line parsing tests. "19 bad command line
options" is removed because bad cmd line option became hard error and
it's covered with new tests in "30 command line".
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 af66656117 UserUmaskOption: Add 'preserve' in choices and use octal notation 2018-06-06 20:02:37 +00:00
Xavier Claessens 531722229b UserUmaskOption: Implement validate_value instead of set_value
set_value() is implemented by the base class, subclasses only need to
override validate_value().
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 d503b1423e mconf: Report all unknown cmd line options instead of aborting on first
This is also more consistent with the error message returned by
optinterpreter when it finds unknown command line options.
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 5af98d16b9 Delay backend creation until project() is parsed
The project() function could have a different value for the backend
option in its default_options kwargs.

Also set backend options, passing them in command line had no effect
previously.
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 58a9555ddf UserArrayOption: Small cleanup in value parsing
It is nicer to early raise exception if the value from meson_options.txt
is not a string in "[]" format than duplicating the parser code for both
cases.

Also it was checking for duplicated items only in the user_input case,
but we should also check for dups in the default value from
meson_options.txt.
2018-06-06 20:02:37 +00:00
Xavier Claessens 64bfc6cf7b UserArrayOption: Add support for splitting on space instead of coma 2018-06-06 20:02:37 +00:00
Jussi Pakkanen e3be7f7021 Write coredata transactionally. Closes #3511. 2018-05-21 00:48:25 +03: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
Jussi Pakkanen 9b0453d3e9
Merge pull request #3225 from filbranden/fixperms3
Introduce install_umask to determine permissions of files in install tree. Default it to 022
2018-04-26 23:14:00 +03:00
Jussi Pakkanen 9c073620aa
Merge pull request #3372 from NickeZ/vs-sol-folders
Use visual studio solution directories
2018-04-26 00:47:11 +03:00
Jussi Pakkanen d2f8f7e312 Bump version number for new development. [skip ci] 2018-04-23 23:11:34 +03:00
Jussi Pakkanen ade59f987f Updated version number for new release. 2018-04-23 03:24:26 +03:00
Filipe Brandenburger b0382733d8 Update default of install-umask to 022
And, with that, update the test cases that checked that preserving the
original permissions worked to set install_umask=preserve explicitly in
those projects' default_options.

Tested: ./run_tests.py
2018-04-18 11:44:54 -07:00
Filipe Brandenburger 8651d55c6a Add new builtin option --install-umask
This option controls the permissions of installed files (except for
those specified explicitly using install_mode option, e.g. in
install_data rules.)

An install-umask of 022 will install all binaries, directories and
executable files with mode rwxr-xr-x, while all data and non-executable
files will be installed with mode rw-r--r--.

Setting install-umask to the string 'preserve' will disable this
feature, keeping the permissions of installed files same as the files in
the build tree (or source tree for install_data and install_subdir.)
Note that, in this case, the umask used when building and that used when
checking out the source tree will leak into the install tree.

Keep the default as 'preserve', to show that no behavior is changed and
all tests keep passing unchanged.

Tested: ./run_tests.py
2018-04-18 11:44:54 -07:00
Niklas Claesson c6e03b9535 Use visual studio solution directories
This implements support for visual studio solution directories.
Projects will by default be put into directories that map their sub-directory
name in the source folder. No directories are created if `--layout=flat` is used.

Fixes: #2524
2018-04-17 23:41:03 +02:00
Dylan Baker 8120ff9cf7 Move builtin_argument_registration to coredata
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`.
2018-04-17 11:32:26 -07:00
Dylan Baker 1452eb73c1 coredata: encapsulate destination name
This means that there are no special args passed ot builtin args
anymore.
2018-04-17 11:32:26 -07:00
Dylan Baker bbf71d9aa3 coredata: Add helper for setting action
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.
2018-04-17 11:32:26 -07:00
Jussi Pakkanen bdb57cf62a Convert Gnome module to use find_program from interpreter. 2018-04-15 13:32:38 +05:30
Xavier Claessens 58f063978e coredata: UserOption subclasses only need to implement validate_value()
Implementing set_value() in the base class simplifies the code and
ensure validation is always consistent.

This fix UserIntegerOption.validate_value() not checking min/max value,
and UserArrayOption.validate_value() raising exception because it does
not pass a value for user_input argument of validate() method.
2018-04-12 00:51:06 +03:00
Xavier Claessens 68f9846b7c Add both_libraries() to build both shared and static libraries
Also support default_library='both' to make library() build both shared
and static libraries.

Closes #484
2018-04-03 15:38:01 -04:00
Aleksey Filippov e4faf396e6 Do not use bare except [flake8]
Use more specific exception types where appropriate.
This patch does not change bare except calls if exception is re-raised.
2018-03-11 23:36:04 +00:00
Jussi Pakkanen 80b101d5f3 Bumped version number for new development. 2018-03-04 21:14:03 +02:00
Jussi Pakkanen daaae647d7 Updated information for new release. 2018-03-04 20:27:34 +02:00
Hemmo Nieminen 7fb8e518b2 Harmonize data pickling.
Try to be more consistent on using save() and load() methods to pickle
data.
2018-03-01 01:06:51 +02:00
Jon Turney cf98f5e370 Enable searching system crossfile locations on more platforms
There's no reason not to also look in these places on Cygwin or OSX.  Don't
do this on Windows, as these paths aren't meaningful there.

Move test_cross_file_system_paths from LinuxlikeTests to AllPlatformTests.
2018-02-21 23:58:14 +02:00
Jussi Pakkanen 54d7817087 User options can "yield to" a user option of the same name in superproject. Closes ##2853. 2018-02-08 00:33:44 +02:00
Jussi Pakkanen 0204895143 Expose integer options to build option files. 2018-02-07 22:10:04 +02:00
Jussi Pakkanen 0538009d30 Bump minimum supported Python from 3.4 to 3.5. 2018-01-04 21:29:02 +02:00
Iñigo Martínez 1eab075c8e Deprecate duplicated values in array options
Duplicated options in array types have been removed by a previous
commit but someone could be using it.

The previous behaviour has been restored but the existence of
duplicates is now tested, and in that case a `DEPRECATION` message
is shown.
2017-12-19 21:31:27 +01:00
Iñigo Martínez 3a1f4ab34c Remove duplicated values in array options
Array options can receive duplicated values, which can produce
errors if case those duplicated values make processing some
elements twice when they are expected to be processed only once.
2017-12-18 10:23:26 +01:00
Jussi Pakkanen 19cd60205d Bump version number for new development. 2017-12-10 18:50:43 +02:00
Jussi Pakkanen e674434389 Updated version number for new release. 2017-12-10 17:56:27 +02:00
Jussi Pakkanen 4ae0cadb7f Renamed UserStringArrayOption to UserArrayOption for short. 2017-12-07 00:00:34 +02:00
Jussi Pakkanen bc83c58d37
Merge pull request #2731 from mesonbuild/disabler
Created disabler object type
2017-12-05 01:10:50 +02:00
Jussi Pakkanen 678daad6cc Created a new disabler type. 2017-12-04 23:53:23 +02:00
Jussi Pakkanen f8a419b27d String arguments can permit arbitrary string values
by leaving out the choices keyword.
2017-12-03 22:27:55 +02:00
Jussi Pakkanen 793fc002fa
Merge pull request #2390 from dcbaker/submit/options-list
Add an array type to user options
2017-12-02 19:54:27 +02:00
Dylan Baker 6f25e93b52 cross: Implement support for loading cross files from system paths
One thing that makes cross compiling with meson a pain is the need for
cross files. The problem is not with cross files themselves (they're
actually rather brilliant in that they allow for a much greater deal of
flexibility than autotools hardcoded paths approach) but that each user
needs to reimplement them themselves, when for most people what they
really want is a cross file that could be provided by their distro, all
they really want is the correct toolchain.

This patch is the first stop to making it easier for distros to ship
their own cross files (and for users to put their's somewhere safe so
they don't get `git clean`ed. It allows the cross files (on Linux and
*BSD) to be stored in home and system paths (~/.config/meson/cross,
/usr/share/meson/cross, and /usr/local/share/meson/cross), and to be
loaded by simply by specificying --cross-file.

With this patch meson will check the locations its always checked first,
(is cross file absolute, or is it relative to $PWD), then will check
~/.config/meson/cross, /usr/local/share/meson/cross,
/usr/share/meson/cross, (or $XDG_CONFIG_PATH and $XDG_DATA_DIRS) for the
files, raising an exception if it cannot find the specified cross file.

Fixes #2283
2017-11-30 22:34:27 +02:00
Dylan Baker c9351ce30c Add new array type option
This exposes the already existing UserStringArrayOption class through
the meson_options.txt. The intention is to provide a way for projects to
take list/array type arguments and validate that all of the elements in
that array are valid without using complex looping constructrs.
2017-11-29 14:14:41 -08:00
William Hubbs 325b2c25b6 Allow prefix to be the root directory 2017-11-23 21:58:08 +02:00
Jussi Pakkanen 69bd87a716
Merge pull request #2511 from jon-turney/prefix-dependent-defaults
Make sysconfdir, localstatedir and sharedstatedir defaults depend on prefix
2017-11-13 21:14:59 +02:00
Xavier Claessens b8187961b9 coredata: Remove parse_string() method
set_value() already does a better job at parsing strings, such as
accepting "True" for a boolean.

This fixes issue #2544
2017-11-06 20:55:05 +02:00
Jon Turney 24549dbed5 Make sysconfdir, localstatedir and sharedstatedir defaults depend on prefix
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.
2017-10-28 23:27:36 +01:00
Jussi Pakkanen 6f066af61f Updated version number for new development. 2017-10-08 23:46:50 +03:00
Jussi Pakkanen 5626df4645 Bump version number for release. 2017-10-08 22:36:06 +03:00
Jussi Pakkanen 244ef43651 Bumped version number for new development. 2017-08-15 01:54:07 +03:00
Jussi Pakkanen a629642f1e Bump numbers for new release. 2017-08-15 00:43:54 +03:00
Jussi Pakkanen a800c96f99 Add option to limit maximum number of concurrent link processes. 2017-08-05 00:24:59 +03:00
Jussi Pakkanen 797bca22a5 Bump version number for new development. 2017-06-20 00:14:40 +03:00
Jussi Pakkanen defcea7fb5 Update version number for bugfix release. 2017-06-19 23:47:28 +03:00
Jussi Pakkanen f75d394683 Update versions for new development. 2017-06-12 23:22:48 +03:00
Jussi Pakkanen 93681b0137 Updated version number for release. 2017-06-12 21:47:22 +03:00
Jussi Pakkanen 111e3df45d Moved coverage commands to a standalone script. 2017-05-13 22:54:08 +03:00
Jussi Pakkanen 255be79e22 Created a dist target. Closes #877. 2017-05-11 19:34:16 +03:00
Nirbheek Chauhan 8cf29bd288 Completely overhaul caching of external dependencies
The old caching was a mess of spaghetti code layered over pasta code.

The new code is well-commented, is clear about what it's trying to do,
and uses a blacklist of keyword arguments instead of a whitelist while
generating identifiers for dep caching which makes it much more robust
for future changes.

The only side-effect of forgetting about a new keyword argument would
be that the dependency would not be cached unless the values of that
keyword arguments were the same in the cached and new dependency.

There are also more tests which identify scenarios that were broken
earlier.
2017-05-09 14:24:48 +05:30
Jussi Pakkanen de43182205 Bumped version number for new development. 2017-04-28 21:38:25 +03:00
Jussi Pakkanen b25d3e4d3f Updated version numbers for point release. 2017-04-28 21:01:13 +03:00
Jussi Pakkanen 568de3a14a Bump version number for new development. 2017-04-27 18:36:36 +03:00
Jussi Pakkanen 7dc747ea54 Update version number for release. 2017-04-23 02:00:54 +03:00
Jussi Pakkanen b48daeda1a Make it possible to only do unity builds on subprojects. 2017-04-15 18:28:36 +03:00
Nirbheek Chauhan 6042e21e25 Use CPPFLAGS for pre-processor compiler checks
Also don't add CFLAGS twice for links() checks

Includes a test for this.
2017-04-04 23:38:36 +05:30
Jussi Pakkanen 8b73d80792 Merge pull request #1457 from mesonbuild/overrides
Add MVP implementation of overriding options.
2017-04-03 23:31:32 +03:00
Jussi Pakkanen 553ac89e02 Review fixes. 2017-04-02 00:07:23 +03:00
Jussi Pakkanen 319398f074 Proxy object for overriding options transparently. 2017-04-02 00:07:23 +03:00
Jussi Pakkanen e5a6283c4c Add MVP implementation of overriding options. 2017-04-02 00:04:45 +03:00
Nirbheek Chauhan 14d0f38158 Try harder to use the C compiler for compiling asm
Use an ordered dict for the compiler dictionary and sort it according
to a priority order: fortran, c, c++, etc.

This also ensures that builds are reproducible because it would be
a toss-up whether a C or a C++ compiler would be used based on the
order in which compilers.items() would return items.

Closes https://github.com/mesonbuild/meson/issues/1370
2017-03-27 11:25:22 +05:30
Jussi Pakkanen e4c224bdc1 Merge pull request #1516 from centricular/git-submodule-subprojects
Add support for using git submodules as subprojects
2017-03-25 18:24:38 +02:00
Nirbheek Chauhan d5975cc683 wrap: Implement special wrap modes for use by packagers
Special wrap modes:
  nofallback: Don't download wraps for dependency() fallbacks
  nodownload: Don't download wraps for all subproject() calls

Subprojects are used for two purposes:
1. To download and build dependencies by using .wrap files if they
   are not provided by the system. This is usually expressed via
   dependency(..., fallback: ...).
2. To download and build 'copylibs' which are meant to be used by
   copying into your project. This is always done with an explicit
   subproject() call.

--wrap-mode=nofallback will never do (1)
--wrap-mode=nodownload will do neither (1) nor (2)

If you are building from a release tarball, you should be able to
safely use 'nodownload' since upstream is expected to ship all
required sources with the tarball.

If you are building from a git repository, you will want to use
'nofallback' so that any 'copylib' wraps will be download as
subprojects.

Note that these options do not affect subprojects that are git
submodules since those are only usable in git repositories, and you
almost always want to download them.
2017-03-25 06:57:30 +05:30
Nicolas Schneider 92ed607290 add 'vs' backend that automatically chooses between the vs backends
For newer VS versions, we can simply rely on 'VisualStudioVersion' being
set in the environment.
For VS2010, we fall back to check 'VSINSTALLDIR' for the version string.
If the backend can not be auto detected, we raise an exception to make the
user choose an explicit backend.
We also print the detected backend to the meson log.
2017-03-23 10:34:32 +01:00
Nicolas Schneider 994696e0ad add vs2017 backend
VS2017 requires the 'WindowsTargetPlatformVersion' property to be set.
We gather the version to use from the environment variable
'WindowsSDKVersion' that will be set by the VS developer command prompt.
2017-03-22 11:05:28 +01:00
Jussi Pakkanen bf1b6b2d2e Update version number for new development. 2017-03-15 23:30:25 +02:00
Jussi Pakkanen 8ce7412b35 Set version number for bugfix release. 2017-03-15 22:57:53 +02:00
Jussi Pakkanen 48d371bd19 Bump version number for new development. 2017-03-05 23:46:21 +02:00
Jussi Pakkanen b63cdc8395 Increment version number for release. 2017-03-05 23:09:33 +02:00
Hemmo Nieminen cda24a641d Don't forbid "test:" as a target name anymore. 2017-02-17 15:40:29 -05:00
Jussi Pakkanen f3d106e786 Bump version number for new development. 2017-02-07 22:34:05 +02:00
Nirbheek Chauhan 97911c4384 Fix absolute prefix/xxxdir subdir check on Windows
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-06 19:10:03 +01:00
Jussi Pakkanen a9c4428c69 Merge pull request #1342 from centricular/commonpath-py34
Add our own implementation of os.path.commonpath
2017-02-02 19:43:03 +02:00
Nirbheek Chauhan 00846ce26d coredata: Fix setting of prefix inside default_options
Closes https://github.com/mesonbuild/meson/issues/1349
2017-02-02 16:37:14 +05:30
Nirbheek Chauhan bb491735a9 coredata: Use our own implementation of commonpath
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-30 03:19:31 +05:30
Jussi Pakkanen 380b9157b8 Increment version number for new development. 2017-01-29 22:25:16 +02:00
Jussi Pakkanen acdf5c2e71 Bump version number for release. 2017-01-29 21:36:29 +02:00
Nirbheek Chauhan 2bb58c909f Use CompilerArgs for generation of compile commands
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-28 05:09:51 +05:30
Nirbheek Chauhan 23f3cec9d0 Force installation dir options to be inside prefix
With the exception of things like sysconfdir (/etc), every other
installation directory option must be inside the prefix.

Also move the prefix checks to coredata.py since prefix can also be set
from inside project() with default_options and via mesonconf. Earlier
you could set prefix to a relative path that way.

This also allows us to return consistent values for get_option('xxxdir')
regardless of whether relative paths are passed or absolute paths are
passed while setting options on the command-line, via mesonconf, or via
default_options in project(). Now the returned path will *always* be
relative to the prefix.

Includes a unit test for this, and a failing test.

Closes #1299
2017-01-23 20:34:45 +02:00
Mike Sinkovsky 969be1f679 cleanup: Remove redundant parentheses 2017-01-18 21:22:47 +02:00
Mike Sinkovsky 5b626ab4cb style: [E1**] Indentation 2017-01-11 12:33:27 -05:00
Igor Gnatenko dd36847c4b style: fix E202 violations
E202: whitespace before ']'

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-02 19:09:47 +01:00
Igor Gnatenko c13160034f style: fix E201 violations
E201: whitespace after '['

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-02 19:08:16 +01:00
Igor Gnatenko 969dc7e995 style: fix E124 violations
E124: closing bracket does not match visual indentation

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01 12:02:05 -05:00
Igor Gnatenko 116da33cdd style: fix E128 violations
E128: continuation line under-indented for visual indent

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01 12:02:05 -05:00
Igor Gnatenko f0b30baa39 style: fix E225 violations
E225: missing whitespace around operator

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01 12:02:05 -05:00
Jussi Pakkanen b55235dfbd Fix space before :. 2016-12-31 16:28:15 +02:00
Jussi Pakkanen 0a14ad63de Add simple uninstall target. Closes #753. 2016-12-31 13:55:55 +02:00
Jussi Pakkanen 415990f1ba Version number bump for new development (again). 2016-12-20 22:26:13 +02:00
Jussi Pakkanen 3d4bfdcb22 Update version number for 0.37.1. 2016-12-20 21:45:01 +02:00
Nirbheek Chauhan a4219760ba clean-ctlist is a forbidden target name
No other target must be called this since we use it for calling the
`cleantrees.py` script.
2016-12-20 02:11:31 +05:30
Jussi Pakkanen 534066af1a Version update for new development. 2016-12-18 21:54:16 +02:00
Jussi Pakkanen d942243d50 Bump version number for release. 2016-12-18 21:16:09 +02:00
Igor Gnatenko 5bf22c5678 add support for $sharedstatedir
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-12-18 00:08:45 +01:00
Igor Gnatenko 2962d3a66b add support for $infodir
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-12-18 00:01:27 +01:00
Igor Gnatenko 380b362fa4 add support for $sbindir
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-12-18 00:01:23 +01:00
Igor Gnatenko c9818c02ec add builtin support for localstatedir
Reported-by: Richard Hughes <richard@hughsie.com>
Closes: https://github.com/mesonbuild/meson/issues/1142
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2016-12-06 20:27:02 +02:00
Jussi Pakkanen 951262d759 Removed Valgrind from core. 2016-11-18 22:04:29 +02:00
Jussi Pakkanen 070c6a72b2 Bump version for new development. 2016-11-14 20:49:06 +02:00
Jussi Pakkanen 4e3073f90a Updated version number for release. 2016-11-14 20:19:43 +02:00
Jussi Pakkanen 1cf787f281 Added reconfigure target that always reruns Meson. 2016-11-06 09:10:04 -08:00
Jussi Pakkanen e0034fd6a5 A few sysconf fixes. 2016-11-02 12:11:47 -07:00
Jussi Pakkanen b6b8d561b8 Raise proper exception type and improve error messages. Closes #322. 2016-10-13 21:30:49 +03:00
Igor Gnatenko a513bcfde6 allow libdir/includedir/etc. be absolute paths
In Fedora we don't care about prefix, we want to ensure that libdir
is /usr/lib64, localedir is /usr/share/locale, and cetera.

Additionally, we don't need to ensure that prefix is absolute as we
check it in main.

Fixes: cc19bf0f45 ("Move option validation in objects rather than doing it only in the conf script.")
Closes: https://github.com/mesonbuild/meson/issues/869
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-10-11 00:57:01 +03:00
Jussi Pakkanen e2b3752f87 Show error log options in help. 2016-10-10 19:51:48 +03:00
Jussi Pakkanen 4e1388620f Bump version number for new development. 2016-10-03 23:18:11 +03:00
Jussi Pakkanen dc083b4fe7 Increment version number for release. 2016-10-03 22:50:35 +03:00
Jussi Pakkanen 69433025ca Update version for new development. 2016-09-05 23:23:09 +03:00
Jussi Pakkanen c013298426 Update version number for release. 2016-09-05 22:23:44 +03:00
Elliott Sales de Andrade 4c71695e41 Use context manager for file I/O.
There are a few cases where a context manager cannot be used, such as
the logger.
2016-08-27 18:29:55 -04:00
Jussi Pakkanen a52154eba5 Change default and add explanatory comment for why we do that. 2016-08-21 23:37:13 +03:00
Jussi Pakkanen c4ade56150 Added sysconfdir option. Closes #694. 2016-08-21 15:57:38 +03:00
Jussi Pakkanen 4f6be39d26 Update version for new development. 2016-07-30 22:54:54 +03:00
Jussi Pakkanen 37ddadcd87 Raise version number for release. 2016-07-30 22:33:34 +03:00
Nirbheek Chauhan c527e4a658 coredata: Descriptive parser exceptions for UserStringArrayOption 2016-07-18 02:27:34 +05:30
Jussi Pakkanen 9e37c8a308 Warn if PKG_CONFIG_PATH has changed because it may cause dependency detection to fail. Closes #626. 2016-07-15 20:52:27 +03:00
Jussi Pakkanen b6e8809f25 Added minsize build type that optimizes for binary size. 2016-06-23 22:38:18 +03:00
Hemmo Nieminen fac6f869e0 Change test suite separator character from '-' to ':'.
This allows defining test suites for test-valgrind target without the risk
of e.g. being unable to differentiate the targets test-valgrind (testing
with valgrind) from test-valgrind (testing the valgrind subproject).
2016-06-06 10:28:00 +03:00
Jussi Pakkanen 50609054ec Bump version number for new development. 2016-06-05 23:13:25 +03:00