Commit Graph

177 Commits

Author SHA1 Message Date
aa6e3dc470 Fixed flake8 issues 2019-01-06 12:19:34 +01:00
9c214f4a70 Fixed buildoptions form source 2019-01-06 12:19:34 +01:00
25618c6a4d Atomic write 2019-01-06 12:19:34 +01:00
bd8bad46c3 Code cleanup and renamed variables 2019-01-06 12:19:33 +01:00
63e16fbcc3 Fixed flake8 2019-01-06 12:19:32 +01:00
e1719c5d37 Load coredata 2019-01-06 12:19:32 +01:00
02734cc5c3 Better documentation 2019-01-06 12:19:31 +01:00
c33df1fd73 Revert to old behavior 2019-01-06 12:19:31 +01:00
3588786138 Some small fixes 2019-01-06 12:19:31 +01:00
84948ea6cd Renamed --force-new to --force-dict-output 2019-01-06 12:19:31 +01:00
2e81631d0c Keep 'filename' and 'install_filename' as strings 2019-01-06 12:19:31 +01:00
7691b0460c Ninja backend target introspection 2019-01-06 12:19:30 +01:00
d4ac832bf6 Split the monolithic introspection file into chunks 2019-01-06 12:19:29 +01:00
b11df88395 Documentation and unit test update 2019-01-06 12:19:29 +01:00
b034f52656 Filenames are now lists 2019-01-06 12:19:29 +01:00
b91c5aad85 Update intro dump on meson configure 2019-01-06 12:19:29 +01:00
24d668bea0 Removed determine_installed_path since it is no longer needed 2019-01-06 12:19:28 +01:00
4addd176db Removed fallback detection logic 2019-01-06 12:19:28 +01:00
a5be893b19 Some code cleanup 2019-01-06 12:19:28 +01:00
74274e23ca Moved the source and compiler generation to the backend 2019-01-06 12:19:28 +01:00
71d17b44e4 Fixed list_target_files and list_targets 2019-01-06 12:19:28 +01:00
a0d478da39 More refactoring 2019-01-06 12:19:27 +01:00
98eb7a48ab Added unit test 2019-01-06 12:19:27 +01:00
b2854e9edc Fixed rebase error 2019-01-06 12:19:27 +01:00
111e596200 Fixed tests and benchmarks 2019-01-06 12:19:27 +01:00
f4285f350e Initial automatic target file generation 2019-01-06 12:19:27 +01:00
a6034d1f19 Added option to force use the new format 2019-01-06 12:15:10 +01:00
8288555aa1 mintro: Added option to introspect multiple parameters at once 2019-01-06 12:15:10 +01:00
1a0e1afbdd Updated format to include sources 2019-01-06 12:15:10 +01:00
9d13855544 Fixed hardcode is_cross = False 2019-01-06 12:15:10 +01:00
0a12594847 Added include_directories and extra_args keys to target introspection 2019-01-06 12:15:04 +01:00
64372d5cfc Do not require build dir for introspection 2018-12-29 23:55:45 +01:00
6864ed60dd mintro: Bug fix for determine_installed_path for multiple target outputs 2018-12-20 23:03:55 +02:00
f954eee906 Remove name property from introspect --projectinfo as it is not used 2018-11-26 23:12:00 +01:00
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
bdc9f6846c mintro: Split list_buildsystem_files into generation and command function 2018-11-26 23:10:53 +01:00
1759fc8f45 Sorted arrays alphabetically 2018-11-24 10:57:22 +01:00
1f48aa595d Added 'section' key to buildoptions introspection 2018-11-24 09:49:33 +01:00
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
1e6d72eb5a Remove useless __main__ in files that cannot be executed 2018-08-22 15:15:54 -04:00
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
aee9b5a518 mintro: Fix introspecting installation paths
A new custom_install_mode element was added in 05c43cdcd
2018-06-08 12:18:16 +00:00
68001193d3 meson introspect: Fix --installed argument
Traceback (most recent call last):
  File "meson.py", line 29, in <module>
    sys.exit(mesonmain.main())
  File "mesonbuild/mesonmain.py", line 411, in main
    return run(sys.argv[1:], launcher)
  File "mesonbuild/mesonmain.py", line 320, in run
    return mintro.run(remaining_args)
  File "mesonbuild/mintro.py", line 234, in run
    list_installed(installdata)
  File "mesonbuild/mintro.py", line 72, in list_installed
    for path, installdir, aliases, unknown1, unknown2 in installdata.targets:
ValueError: too many values to unpack (expected 5)
2018-06-06 06:59:06 +00:00
6485f04c16 introspect: Fix listing target files that are File objects 2018-05-09 21:01:00 +05:30
e9860cff41 introspect: default builddir to . to prevent a crash
Fixes #3250
2018-04-11 21:43:59 +03:00
9b2e533d87 Always build parser objects anew to avoid leaking old data. 2018-03-27 00:39:45 +03:00
f48da481ab introspect: tests: Inform about tests run parallelization 2018-03-18 20:29:35 +02:00
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
0204895143 Expose integer options to build option files. 2018-02-07 22:10:04 +02:00
2cf85ae16f Use os.path: basename() and dirname() instead of split()
According to Python documentation[1] dirname and basename
are defined as follows:
    os.path.dirname() = os.path.split()[0]
    os.path.basename() = os.path.split()[1]
For the purpose of better readability split() is replaced
by appropriate function if only one part of returned tuple
is used.

[1]: https://docs.python.org/3/library/os.path.html#os.path.split
2018-01-30 07:08:22 +11:00