Commit Graph

3721 Commits

Author SHA1 Message Date
Jon Turney e99cfdfbc7 Make vs_module_defs: do something for gcc on Windows as well
Module definition files may be useful when building with gcc on Windows also
(e.g. if the existing build uses them, if exports are aliased, if we were
retro enough to export by ordinal, etc.)

Add the .def file to the link command line when using gcc on Windows

Run the appropriate windows tests irrespective of compiler.
2017-05-12 18:56:43 +03:00
Jussi Pakkanen 1e14438a38 Merge pull request #1735 from dcbaker/list-of-files
Allow passing a list of Files to CustomTarget. Closes #1720
2017-05-12 18:54:46 +03:00
Nirbheek Chauhan 67b195f919 setup.py: dependencies is now a directory 2017-05-12 18:54:03 +03:00
Dylan Baker 410937c08e Flatten SharedLibary link_args. 2017-05-11 16:59:59 -07:00
Jussi Pakkanen 86ec0d9477 Merge pull request #1631 from QuLogic/split-dependencies
Split dependencies.py into separate files
2017-05-11 22:43:10 +03:00
Peter Hutterer 73494c9927 docs: make the required argument for find_program stick out more 2017-05-11 22:39:47 +03:00
liberforce b15f0a0fc1 Update Compiler-properties.md
Fix table formatting
2017-05-11 22:39:03 +03:00
Dylan Baker 99c1038988 appveyor: Don't run appveyor for docs only changes
Appveyor takes a *long* time to run (~45 minutes per commit currently),
and it does no parallelism. It is possible to skip merge requests that
only touch documentation, this commit adds that support.

Because Appveyor (and Travis) test a merge of the pull request into
master and not the branch itself this will only skip builds that only
touch docs, and not pull requests that do both doc and non-doc changes.
2017-05-11 22:38:36 +03:00
Dylan Baker c03744cccb Allow passing a list of Files to CustomTarget. Closes #1720 2017-05-11 09:57:38 -07:00
Dylan Baker e2567386f1 Use flatten for link targets. Fixes #1764 2017-05-11 09:57:38 -07:00
Dylan Baker e419198ff8 Flatten should always return a list
Currently if flatten() is passed a non-list object, it returns that
object. This is surprising behavior, and prone to causing serious and
numerous problems, since many objects implement the iterable interface,
and thus can be used in cases a list is expected, but with undesirable
results.
2017-05-11 09:57:38 -07:00
Jussi Pakkanen 1a87c967f1 Merge pull request #1761 from keszybz/docs
Some simple doc fixes
2017-05-11 00:15:58 +03:00
Jussi Pakkanen 9141cd78aa Now cracks a noble heart. Good night sweet prince:
And flights of angels sing thee to thy rest!
2017-05-11 00:14:40 +03:00
liberforce ad6c61dcf5 Update Running-Meson.md
Fix parameter escapement
2017-05-11 00:14:17 +03:00
liberforce 6dc54b86b6 Update Syntax.md
Fix variable name
2017-05-11 00:13:51 +03:00
Peter Hutterer 7ed19902be pkgconfig: add suppport for custom variables during generation
Usage:
    pkgconfig.generate(
      ...
      description : 'A library with custom variables.',
      variables : ['foo=bar', 'datadir=${prefix}/data']
      )

The variables 'prefix', 'libdir' and 'includedir' are reserved, meson will
fail with an error message.

Variables can reference each other with the pkgconfig notation, e.g.

   variables : ['datadir=${prefix}/data',
                'otherdatadir=${datadir}/other']

meson does not check this for correctness or that the referenced variable
exists, we merely keep the same order as specified.
2017-05-11 00:13:30 +03:00
Elliott Sales de Andrade e922a6f6f0 Make base imports explicit. 2017-05-09 18:28:05 -04:00
Elliott Sales de Andrade 8731e00ada Tweak formatting of base dependency file. 2017-05-09 18:28:05 -04:00
Elliott Sales de Andrade d3caadb675 Split misc dependencies into their own file. 2017-05-09 18:28:05 -04:00
Elliott Sales de Andrade cb24c2d58a Split apart platform-specific dependencies 2017-05-09 18:28:04 -04:00
Elliott Sales de Andrade d96b16c24b Split development-related deps into their own file. 2017-05-09 18:13:10 -04:00
Elliott Sales de Andrade 23f9b42d3b Split UI-related into a separate file.
Some of these are a bit bigger than just UI libraries, but this division
seems close enough.
2017-05-09 18:13:09 -04:00
Elliott Sales de Andrade 92557e1c2a Move dependencies.py into a subdirectory. 2017-05-09 17:39:38 -04:00
Zbigniew Jędrzejewski-Szmek 65450459de docs: add puncuation to description of compiler object functions 2017-05-09 14:51:01 -04:00
Zbigniew Jędrzejewski-Szmek ed9f79b8a4 docs: mention $DESTDIR in add_install_script description, add punctuation
Although not stricly necessary, it is good to mention $DESTDIR in the
explanation for add_install_script, since it might not be obvious for the
user that it is available.

Also add punctuation to be consistent.

v2:
- fix "witht" typo
- reword $DESTDIR description to say that it is inherited from the environment
- also describe $MESONINTROSPECT
2017-05-09 12:10:35 -04:00
Jussi Pakkanen 1aa68cf6e3 Merge pull request #1610 from valum-framework/vala-use-generate-basic-compiler-args
Use 'generate_basic_compiler_args' for Vala targets
2017-05-09 18:45:06 +03:00
Nicolas Schneider 39520d5688 vs: surround project guid with '{}'
Closes #1672.
2017-05-09 18:43:11 +03:00
Jussi Pakkanen 69abca2a67 Merge pull request #1751 from centricular/fix-cached-deps
Fix caching of external dependencies of various types
2017-05-09 18:41:51 +03:00
Jussi Pakkanen ebfaf3a16f Merge pull request #1758 from dcbaker/llvm-cpp-blacklist
LLVM cpp blacklist
2017-05-09 18:40:10 +03:00
Jussi Pakkanen 8d3d6382e8 Upgrade CI image to Ubuntu Zesty. 2017-05-09 18:39:50 +03:00
Nirbheek Chauhan 830b44867c dependencies: Only store found deps in the cache
This simplifies everything since it means we will always search for the
dependency again on the system if it wasn't found. This is particularly
important when running `ninja reconfigure` with an edited
PKG_CONFIG_PATH to point to a path that contains more pkg-config files.
2017-05-09 14:24:48 +05:30
Nirbheek Chauhan 66f0ccb39b dependencies: Fix two more edge-cases in dependency searching
Includes tests for both of them.
2017-05-09 14:24:48 +05:30
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
Nirbheek Chauhan 1570a90822 project tests: Also regen before building
This actually caught a cached-dependency related bug for me that the
test-time regen did not. I also increased the ninja wait time to
1 second because that's actually how long you need to sleep to be
guaranteed that a change will be detected.

Must poke upstream about https://github.com/ninja-build/ninja/issues/371
2017-05-09 14:23:15 +05:30
Nirbheek Chauhan 41f51f567a pkgconfig dependency: Define version_reqs at the start
Otherwise a cached not-found dependency won't have it and __repr__
will fail.
2017-05-09 14:23:15 +05:30
Nirbheek Chauhan ac1c929f66 mesonintrospect: Print all deps, not just those with the same name
This breaks the API, but the original API was just broken.
2017-05-09 14:23:15 +05:30
Nirbheek Chauhan c650ba8928 interpreter: Typo in error message
'Non-existent' is the grammatically correct version. Also call it
a 'build file' since that's what everyone calls it nowadays.
2017-05-09 14:23:15 +05:30
Nirbheek Chauhan c7d71c7943 dependencies: Fix caching of native/cross dependencies
All our cached_dep magic was totally useless since we ended up using
the same identifier for native and cross deps. Just nuke all this
cached_dep code since it is very error-prone and improve the
identifier generation instead.

For instance, this is broken *right now* with the `type_name` kwarg.

Add a bunch of tests to ensure that all this actually works...

Closes https://github.com/mesonbuild/meson/issues/1736
2017-05-09 14:23:15 +05:30
Tim-Philipp Müller bf54383d8a Merge pull request #1762 from tp-m/docs-find-program-additional-paths
docs: how to make find_program() search additional directories
2017-05-09 09:52:19 +01:00
Tim-Philipp Müller df48be051c docs: how to make find_program() search additional directories
Fixes #1702
2017-05-09 09:20:21 +01:00
Zbigniew Jędrzejewski-Szmek 0a8621a9bd docs: add hyperlinks and a short description of unity builds
At first I thought this is something about Ubuntu ;)
2017-05-08 20:12:29 -04:00
Zbigniew Jędrzejewski-Szmek fba29b14e7 docs: clarify where hotdoc should be run 2017-05-08 20:11:47 -04:00
Dylan Baker 7053d9abfd Allow link_depends to take strings, Files or generated objects. Closes #1172
Currently only strings can be passed to the link_depends argument of
executable and *library, which solves many cases, but not every one.
This patch allows generated sources and Files to be passed as well.

On the implementation side, it uses a helper method to keep the more
complex logic separated from the __init__ method. This also requires
that Targets set their link_depends paths as Files, and the backend is
responsible for converting to strings when it wants them.

This adds tests for the following cases:
- Using a file in a subdir
- Using a configure_file as an input
- Using a custom_target as an input

It does not support using a generator as an input, since currently that
would require calling the generator twice, once for the -Wl argument,
and once for the link_depends.

Also updates the docs.
2017-05-08 20:59:46 +02:00
Guillaume Poirier-Morency ebb228a11b vala: Add 'no_warn_args' with '--disable-warnings' 2017-05-08 14:58:52 -04:00
Guillaume Poirier-Morency 904ed5a599 Use 'generate_basic_compiler_args' for Vala targets
Move '-C' option into 'get_always_args' as we always generate C sources.

Add a branch in the dependency management to perform Vala-specific work
of adding '--pkg' and '--target-glib'.
2017-05-08 14:58:52 -04:00
Alberto Aguirre ccab7d64f4 Add support for @CURRENT_SOURCE_DIR@ in generator arguments
Allow users to specify @CURRENT_SOURCE_DIR@ in generator arguments
to specify the current target source directory.
This is useful when creating protobuf generator objects in sub-directories
because protoc will then generate files in the expected location.

Fixes #1622.

Remove stray semicolon

Update documentation
2017-05-08 20:53:57 +02:00
Niclas Moeslund Overby 1882548f05 Make name_suffix keyword known to binaries
Fixes #1728
2017-05-08 20:50:25 +02:00
Quentin Glidic 10c435fabe mesonintrospect: List all installed files
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-05-08 20:21:29 +02:00
Jon Turney 855715b29e docs: make project(license:) a separate bullet point 2017-05-08 20:08:56 +02:00
Jussi Pakkanen e0cf45edf0 Merge pull request #1747 from centricular/run-command-configure-file
Some fixes to run_command()
2017-05-08 20:08:28 +02:00