Commit Graph

156 Commits

Author SHA1 Message Date
Jon Turney 1f5c6d62bf More clearly explain portability issues with linking to a module
Refine #3277

According to what I read on the internet, on OSX, both MH_BUNDLE (module)
and MH_DYLIB (shared library) can be dynamically loaded using dlopen(), but
it is not possible to link against MH_BUNDLE as if they were shared
libraries.

Metion this as an issue in the documentation.

Emitting a warning, and then going on to fail during the build with
mysterious errors in symbolextractor isn't very helpful, so make attempting
this an error on OSX.

Add a test for that.

See also:
https://docstore.mik.ua/orelly/unix3/mac/ch05_03.htm
https://stackoverflow.com/questions/2339679/what-are-the-differences-between-so-and-dylib-on-osx
2018-06-07 12:57:39 +00:00
Jon Turney 7e08e958c0 Allow substitutions in custom_target() depfile:
Allow substitutions in custom_target() depfile: as well as in command:
2018-06-03 21:06:23 +00:00
Jon Turney 50aabc0129 Document @PLAINNAME@ and @BASENAME@ substitutions in custom_target(command:)
Since f3ff8fe6 (0.39.0), this has a common implementation with the same
substitution in generators, but I think they existed earlier.

@BASENAME@ is used internally by the custom target generated by
windows.compile_resources()
2018-06-03 21:06:23 +00:00
Filipe Brandenburger 73decf31f1 Update reference manual to include 'install_mode' where supported 2018-06-02 04:50:32 +00:00
Mathieu Duponchelle 14750b50ea configure_file: Add output_format kwarg (#3636)
* configure_file: Add output_format kwarg

* docs: Reference-manual.md output_format was added in 0.47 [skip ci]
2018-06-01 17:53:07 +00:00
Dylan Baker 17cb364046 [skip ci] docs: cross reference tables from manual (#3656)
* docs/reference-manual: link to references tables

Currently the reference manual entries for *machine.cpu_family() and
*machine.system() have incomplete (and wrong) information. Rather than
continue to duplicate this information just link to the reference
tables.

* docs/Reference-manual: fix link target

The IDs in hotdoc are always lowered, so this pointed to the right page,
but didn't go to the heading.

* docs/Reference-manual: link compiler.get_id directly to tables

Currently it goes round about to an entry that doesn't add much
information and points to the reference table. Instead just point to the
reference table.
2018-06-01 15:19:36 +00:00
Jon Turney 809336833c Improve dependency() documentation [skip ci]
Mention that the dependency name will also be searched for as a framework on
OSX.

Note that additional dependency-specific keywords may be used by custom
dependency lookup.
2018-05-31 13:15:47 +00:00
Nirbheek Chauhan 27b290d6df Add check_header to Reference manual and release notes [skip ci] 2018-05-30 15:25:39 +05:30
Nirbheek Chauhan c87c42b736
Document how to set the default name_prefix and name_suffix [skip ci]
Else people (like me) try to use the old behaviour where
setting it to `''` would use the default.

https://gitlab.gnome.org/GNOME/glib-networking/issues/33
2018-05-30 13:27:24 +05:30
Jussi Pakkanen cc3e0bc469
Merge pull request #3491 from jeandet/qt_private_headers
Qt private headers
2018-05-27 23:50:30 +03:00
Jussi Pakkanen 55a0831bc3
Merge pull request #3383 from mesonbuild/nirbheek/configure-file-nodata
configure_file: Add a new action 'copy'
2018-05-22 21:09:19 +03:00
Jussi Pakkanen 9ecd92c6fe
Merge pull request #3490 from MathieuDuponchelle/dict_builtin
Add new built-in type, dict
2018-05-22 20:46:26 +03:00
Andrei Alexeyev 2e2d14c9d7
Update documentation for run_command [skip ci] 2018-05-22 04:45:40 +03:00
Mathieu Duponchelle fe6fc59ee7 dict: add since annotations 2018-05-22 00:17:42 +02:00
Nirbheek Chauhan 4b9393e165 docs: Add manual entry for configure_file copy kwarg 2018-05-22 02:37:07 +05:30
Mathieu Duponchelle 1de7dce414 dict: Document, add release snippet 2018-05-20 22:39:33 +02:00
Nirbheek Chauhan e9a181a545
docs: Add a warning about find_program().path()
See: https://github.com/mesonbuild/meson/issues/3552
2018-05-09 18:30:00 +05:30
Nirbheek Chauhan 43f9318afa
Reference-manual: compiler checks
Document that compiler checks are self-contained and
do not add arguments from anywhere else.
2018-05-09 14:43:08 +05:30
Alexis Jeandet 51868d00e7 [Qt module] Privates headers: added documentation
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2018-04-28 17:45:23 +02:00
Xavier Claessens 9a82b0136a extract_all_objects: Add 'recursive' keyword argument
To maintain backward compatibility we cannot add recursive objects by
default. Print a warning when there are recursive objects to be pulled
and the argument is not set. After a while we'll do pull recursive
objects by default.
2018-04-18 14:54:52 -04:00
Jussi Pakkanen 628f910760
Merge pull request #3314 from sarum9in/test_depends
Add test(depends) keyword parameter
2018-04-18 00:40:52 +03:00
Dylan Baker 92487ea33d Add partial_dependency method to dependencies
This adds a new method, partial_dependency to all dependencies. These
sub dependencies are copies of the original dependency, but with one or
more of the attributes replaced with an empty list. This allows creating
a sub dependency that has only cflags or drops link_arguments, for
example.
2018-04-17 23:33:31 +03:00
Xavier Claessens bd37afeeea Add has_link_argument() and friends
Closes: #3335.
2018-04-16 19:14:02 -04:00
Nirbheek Chauhan 0e6a332d0c Document that override_find_program works on configure_file [skip ci]
Also link to the release notes snippet from the Reference manual
2018-04-15 13:32:38 +05:30
Jussi Pakkanen f489aa77e5 Added documentation [skip ci] 2018-04-15 13:32:38 +05:30
Alberto Sartori 717f7db67e improve suite of meson test (#3369) 2018-04-14 22:17:02 +03:00
David Fort 6dea177774 add support for cmakedefine in configure_file()
The added format argument for configure_file allows to specify the kind of
file that is treated. It defaults to 'meson', but can also have the 'cmake'
or 'cmake@' value to treat config.h.in files in the cmake format with #cmakedefine
statements.
2018-04-08 22:00:45 +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
behlec 37d379ebe5 Allow meson build file to exit early. (#2808) 2018-03-29 21:29:45 +03:00
Aleksey Filippov 780d301c1c Add test(depends) documentation 2018-03-25 01:33:33 +00:00
Alistair Thomas 3b9f4098ef docs: In executable() remove statement that all other files are ignored [skip ci]
Currently Meson returns an error that no compiler can be found
for an unknown file extension
2018-03-23 21:09:32 +02:00
Alistair Thomas 47f71d1a41 docs: Update test() to include that a program found with find_program() can be used [skip ci] 2018-03-23 21:09:32 +02:00
Jussi Pakkanen 30827b5644 Do not install configure_file output if install_dir is empty. Closes #3270. 2018-03-21 21:25:47 +02:00
Aleksey Filippov d63fff06d9 Add install_data() rename documentation 2018-03-19 22:13:34 +00:00
Aleksey Filippov 98fc7a82dc Link "External commands" page from run_command() reference [skip ci] 2018-03-12 13:44:31 +00:00
Jon Turney ffe6ed2a47 doc: Tweak text about get_option('foodir') in reference manual [skip ci]
* The example for executable()'s install_dir: should use join_paths()

* Clarify how to use directory options which are potentially not prefix
relative

This is mentioned in https://github.com/mesonbuild/meson/issues/1637 and see
also https://patchwork.freedesktop.org/patch/200373/ for an example of this
usage, and the possible confusion that can arise.
2018-03-07 19:57:20 +02:00
Jussi Pakkanen e98ae58d0e
Merge pull request #3086 from sarum9in/declare-link-whole
Add declare_dependency() link_whole parameter
2018-03-06 21:08:54 +02:00
Evgenii Shatokhin 19718a8d9c Allow passing a compiler object to run_command()
Sometimes it is needed to run the current compiler with specific options
not to compile a file but rather to obtain additional info. For example,
GCC has several -print-* options to query it about the paths to
different libraries and development files. One use case is to get the
location of development files for GCC plugins, which is not easily
obtainable by other means:

  gcc -print-file-name=plugin

For this purpose, it would be convenient if the compiler object returned
by meson.get_compiler(lang) could be used in run_command() directly.
This commit implements it.

Signed-off-by: Evgenii Shatokhin <eshatokhin@virtuozzo.com>
2018-03-06 21:07:16 +02:00
Nirbheek Chauhan 9e18e4c703
Improve vcs_tag documentation [skip ci]
Document that dependencies must be explicitly signalled, just like with a custom target.
2018-03-06 15:33:00 +05:30
Aleksey Filippov 4de02cb5b0 Document declare_dependency() link_whole parameter 2018-03-06 01:44:26 +00:00
Jussi Pakkanen 38145e0251 The "outputs" kwarg should be "output" and rewrapping. Closes #3166. [skip ci] 2018-03-04 00:57:42 +02:00
Aleksey Filippov 15537f5e8e Add links to Subprojects.md page from subproject() and subproject object documentation [skip ci] 2018-03-01 21:52:08 +02:00
Aleksey Filippov 5e6c47a4b2 Add reference to implicit_include_directories from include_directories() [skip ci]
Closes #3153
2018-03-01 15:30:15 +00:00
Peter Hutterer 6b550ae91f Allow for missing install_dir in install_data()
The documentation doesn't require it and the interpreter code works around the
possibility of it being None. The ninja backend code however fails with

File "/home/whot/code/meson/mesonbuild/backend/ninjabackend.py", line 796, in generate_data_install
    dstabs = os.path.join(subdir or None, plain_f)
File "/usr/lib64/python3.6/posixpath.py", line 78, in join
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType

If install_dir is missing, default to datadir/projectname
2018-02-22 20:26:16 +02:00
Nirbheek Chauhan 86e8d587cb docs: Add subproject warning for source_root and build_root [skip ci] 2018-02-20 16:45:27 +05:30
Eric Engestrom 8a2d9e0ad4 docs: fix missing backtick 2018-02-19 23:46:34 +05:30
Sami Kerola 70a7cf30a1 Re-link remaining github wiki urls to mesonbuild.com site 2018-02-11 13:39:46 +02:00
Jon Turney 0774f319e8 Don't use --export-dynamic on Cygwin
After PR #2662, running test case common/125 shared module/ on Cygwin gets
me:

$ ninja -C _build
ninja: Entering directory `_build'
[7/7] Linking target prog.exe.
/usr/lib/gcc/x86_64-pc-cygwin/6.4.0/../../../../x86_64-pc-cygwin/bin/ld: warning: --export-dynamic is not supported for PE+ targets, did you mean --export-all-symbols?

Also, fix doc for correct version of first apperance.

Future work: Notwithstanding the hint that ld gives, these options are not
equivalent, and it's not clear we should be using it here:
--export-all-symbols is the default behaviour, and if the exports are
restricted by explicit annotations or a .def file, this option might be
overriding that...
2018-02-08 23:51:06 +02:00
Jon Turney 7bfcf68777 Add get_pkgconfig_variable(default:)
Also use that to squelch the warning for internal uses which handle the
variable missing case (just gnome at the moment)

A follow up to PR #2914
2018-02-08 00:35:38 +02:00
Aleksey Filippov f5917d261c Use text keyword for directory example code blocks 2018-02-05 01:28:07 +00:00