Commit Graph

86 Commits

Author SHA1 Message Date
Daniel Mensinger 243eca6cee
mintro: Check meson-info.json version instead of loading coredata 2019-01-13 19:01:38 +01:00
Jussi Pakkanen 49557e15ec
Merge pull request #4731 from mensinda/introBreak2
mintro: Changes to the introspection API
2019-01-13 19:50:10 +02:00
John Ericson 913c87b327 `environment.cross_info.need_cross_compiler()` doesn't exist
It is no longer needed either.
2019-01-10 23:02:23 +02:00
Daniel Mensinger 5c139032b8
Deprecated --target-files API 2019-01-07 22:35:56 +01:00
Daniel Mensinger a1d8c1d3e9
Changed introspection target format 2019-01-07 22:24:49 +01:00
Daniel Mensinger b82cbbdd4c
Fixed missing newline 2019-01-06 22:20:15 +01:00
Daniel Mensinger ab32f1fe00 Added meson-info.json 2019-01-06 22:03:29 +01:00
Daniel Mensinger 38241f5fce Introspection refactoring 2019-01-06 22:03:21 +01:00
Daniel Mensinger bcb8146280
Indent flag only toggles 2019-01-06 12:19:35 +01:00
Daniel Mensinger aa6e3dc470
Fixed flake8 issues 2019-01-06 12:19:34 +01:00
Daniel Mensinger 9c214f4a70
Fixed buildoptions form source 2019-01-06 12:19:34 +01:00
Daniel Mensinger 25618c6a4d
Atomic write 2019-01-06 12:19:34 +01:00
Daniel Mensinger bd8bad46c3
Code cleanup and renamed variables 2019-01-06 12:19:33 +01:00
Daniel Mensinger 63e16fbcc3
Fixed flake8 2019-01-06 12:19:32 +01:00
Daniel Mensinger e1719c5d37
Load coredata 2019-01-06 12:19:32 +01:00
Daniel Mensinger 02734cc5c3
Better documentation 2019-01-06 12:19:31 +01:00
Daniel Mensinger c33df1fd73
Revert to old behavior 2019-01-06 12:19:31 +01:00
Daniel Mensinger 3588786138
Some small fixes 2019-01-06 12:19:31 +01:00
Daniel Mensinger 84948ea6cd
Renamed `--force-new` to `--force-dict-output` 2019-01-06 12:19:31 +01:00
Daniel Mensinger 2e81631d0c
Keep 'filename' and 'install_filename' as strings 2019-01-06 12:19:31 +01:00
Daniel Mensinger 7691b0460c
Ninja backend target introspection 2019-01-06 12:19:30 +01:00
Daniel Mensinger d4ac832bf6
Split the monolithic introspection file into chunks 2019-01-06 12:19:29 +01:00
Daniel Mensinger b11df88395
Documentation and unit test update 2019-01-06 12:19:29 +01:00
Daniel Mensinger b034f52656
Filenames are now lists 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 24d668bea0
Removed determine_installed_path since it is no longer needed 2019-01-06 12:19:28 +01:00
Daniel Mensinger 4addd176db
Removed fallback detection logic 2019-01-06 12:19:28 +01:00
Daniel Mensinger a5be893b19
Some code cleanup 2019-01-06 12:19:28 +01:00
Daniel Mensinger 74274e23ca
Moved the source and compiler generation to the backend 2019-01-06 12:19:28 +01:00
Daniel Mensinger 71d17b44e4
Fixed list_target_files and list_targets 2019-01-06 12:19:28 +01:00
Daniel Mensinger a0d478da39
More refactoring 2019-01-06 12:19:27 +01:00
Daniel Mensinger 98eb7a48ab
Added unit test 2019-01-06 12:19:27 +01:00
Daniel Mensinger b2854e9edc
Fixed rebase error 2019-01-06 12:19:27 +01:00
Daniel Mensinger 111e596200
Fixed tests and benchmarks 2019-01-06 12:19:27 +01:00
Daniel Mensinger f4285f350e
Initial automatic target file generation 2019-01-06 12:19:27 +01:00
Daniel Mensinger a6034d1f19
Added option to force use the new format 2019-01-06 12:15:10 +01:00
Daniel Mensinger 8288555aa1
mintro: Added option to introspect multiple parameters at once 2019-01-06 12:15:10 +01:00
Daniel Mensinger 1a0e1afbdd
Updated format to include sources 2019-01-06 12:15:10 +01:00
mensinda 9d13855544
Fixed hardcode is_cross = False 2019-01-06 12:15:10 +01:00
Daniel Mensinger 0a12594847
Added include_directories and extra_args keys to target introspection 2019-01-06 12:15:04 +01:00
Daniel Mensinger 64372d5cfc
Do not require build dir for introspection 2018-12-29 23:55:45 +01:00
Daniel Mensinger 6864ed60dd mintro: Bug fix for determine_installed_path for multiple target outputs 2018-12-20 23:03:55 +02:00
Daniel Schulte f954eee906 Remove name property from introspect --projectinfo as it is not used 2018-11-26 23:12:00 +01:00
Daniel Schulte 0e62193730 mintro: Allow introspect --projectinfo without build directory.
This variant was added to allow introspection before configuring a build
directory. This is useful for IDE integration to allow displaying and/or
setting options for the initial configuration of the build directory.

It also allows showing basic information about the project even if it's
not yet configured or configuring failed.

The project 'name' field in --projectinfo is used inconsistently:
For the top level project it always shows the name configured in
the top level meson.build file. For subprojects it's referring to the
name of the directory the subproject's meson.build is contained in.

To have a consistent output and preserve the existing behavior this adds
the 'descriptive_name' field which always shows the name set in the
project.

To be consistent the 'descriptive_name' field was also added to the
--projectfiles variant that uses an already configured build.

It also extends the information shown with the list of buildsystem-files.
This is currently only implemented in the variant for unconfigured
projects.
2018-11-26 23:12:00 +01:00
Daniel Schulte bdc9f6846c mintro: Split list_buildsystem_files into generation and command function 2018-11-26 23:10:53 +01:00
Daniel Mensinger 1759fc8f45
Sorted arrays alphabetically 2018-11-24 10:57:22 +01:00
Daniel Mensinger 1f48aa595d
Added 'section' key to buildoptions introspection 2018-11-24 09:49:33 +01: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
Nirbheek Chauhan 96b7fdb723 macos: Rewrite install_name for dependent built libraries on install
On macOS, we set the install_name for built libraries to
@rpath/libfoo.dylib, and when linking to the library, we set the RPATH
to its path in the build directory. This allows all built binaries to
be run as-is from the build directory (uninstalled).

However, on install, we have to strip all the RPATHs because they
point to the build directory, and we change the install_name of all
built libraries to the absolute path to the library. This causes the
install name in binaries to be out of date.

We now change that install name to point to the absolute path to each
built library after installation.

Fixes https://github.com/mesonbuild/meson/issues/3038
Fixes https://github.com/mesonbuild/meson/issues/3077

With this, the default workflow on macOS matches what everyone seems
to do, including Autotools and CMake. The next step is providing a way
for build files to override the install_name that is used after
installation for use with, f.ex., private libraries when combined with
the install_rpath: kwarg on targets.
2018-06-18 06:33:23 +00:00