Commit Graph

4390 Commits

Author SHA1 Message Date
Dylan Baker dda5e8cadb Allow CustomTarget's to be indexed
This allows a CustomTarget to be indexed, and the resulting indexed
value (a CustomTargetIndex type), to be used as a source in other
targets. This will confer a dependency on the original target, but only
inserts the source file returning by index the original target's
outputs. This can allow a CustomTarget that creates both a header and a
code file to have it's outputs split, for example.

Fixes #1470
2017-09-27 22:01:24 +03:00
Jussi Pakkanen dfc2b75ee2 Merge pull request #2348 from centricular/configure-file-infinite-loop
configure_file: Fix infinite loop in some cases
2017-09-26 21:46:55 +03:00
Jussi Pakkanen cf6693a4eb Linker flag for Windows GUI applications was missing on MSVC. 2017-09-26 21:46:32 +03:00
Nirbheek Chauhan 87327d414a configure_file: Fix infinite loop in some cases
We were adding built files to the list of source files to check for
regen. We were also not adding sources files to regen when `command:`
was used.

Fixes #1865
2017-09-26 18:47:00 +05:30
Nirbheek Chauhan 92318c7660 docs: get_supported_arguments was added in 0.43.0
Closes https://github.com/mesonbuild/meson/issues/2371

[noci]
2017-09-26 10:00:28 +00:00
Jussi Pakkanen 011adc4bd2 Merge pull request #2365 from liugang/master
Improve mesonbuild/wrap/wrap.py
2017-09-25 19:43:15 +03:00
Jussi Pakkanen 876b2475dd Made man page gzip creation deterministic. Closes #2363. 2017-09-23 11:31:59 +03:00
liugang a93ac1a6a8 Improve download package
Using wrap mechanism in enterprise environment,
Some package is very large, example, sdk package from
BSP vendor.

so:
- open file in the output directory with a temporary name
- download a chunk, update hash calculation, write chunk to file
- when finished close file and check the hash
- if hash is incorrect, delete temp file and raise error
- if hash is correct, atomically rename temp file to final file

fix issue: #2358
2017-09-23 16:01:11 +08:00
liugang de259b6690 Fix unpack patch archive fail
fix shutil.unpack_archive() failure when the
destination files already exists and is read-only.

Example: all files in opensource package live555
is `-r--r--r--`, if some file in patch archive try to
patch original files of live555, shutil.unpack_archive
will raise `[Errno 13] Permission denied`
2017-09-23 15:59:43 +08:00
liugang 7060b15773 fix patch archive never download on some case
Fix issue #2359
2017-09-23 13:53:27 +08:00
Jussi Pakkanen bea6b1a6f6 Merge pull request #2187 from centricular/fix-pcap-dependency
Fix pcap dependency, str.strip() now takes an argument, add cc.get_return_value()
2017-09-22 22:04:18 +03:00
Jussi Pakkanen be0aa7fd74 Merge pull request #2357 from LukeShu/flake8
Bring into compliance with flake8
2017-09-22 21:33:34 +03:00
Jussi Pakkanen 2ab4b397a8 Merge pull request #2350 from tintou/master
Add 'install' keyword to the gettext macro
2017-09-22 21:30:08 +03:00
Johan Bjäreholt 102c1d09fe Replaced references to 'mesontest'
'mesontest' is deprecated and is now 'meson test'

Replaced all references to 'mesontest' with 'meson test' and added a note of the change in the bottom of the page
2017-09-22 21:29:20 +03:00
Johan Bjäreholt e129cf7278 Replaced references to 'mesonconf'
mesonconf is deprecated and all references of it has been replaced with 'meson configure'
2017-09-22 21:29:20 +03:00
Nirbheek Chauhan 177283d203 pcap dependency: Frameworks for libpcap do not exist
The only ways to get it are via Homebrew or Macports, which install
pkg-config files and/or pcap-config
2017-09-22 19:11:57 +05:30
Corentin Noël 34c6cccde2 Update i18n markdown page to add the new install parameter 2017-09-22 01:08:10 +02:00
Luke Shumaker 68d4c1e559 flake8: disable E731: do not assign a lambda expression, use a def
It has too many false positives.  It was complaining about things like

    if this:
         fn = some_func
    else:
         fn = lambda x: ...

Where obviously, "fn" can't be a def, and it would be silly to introduce
some other name to use as the def, just to assign it to fn.
2017-09-21 13:41:09 -04:00
Luke Shumaker 4dbbb4884c flake8: Clean up complained-about unused imports
This also adds a "# noqa: F401" comment on an unused "import lzma",
which we are using it in a try/except block that is being used to
check if the lzma module is importable; of course it is unused.

v2: This turned out to be a little tricky.

    mesonbuild/modules/__init__.py had the "unused" import:

        from ..interpreterbase import permittedKwargs, noKwargs

    However, that meant that the various modules could do things like:

        from . import noKwargs # "." is "mesonbuild.modules"

    Which breaks when you remove __init__.py's "unused" import.  I
    could have tagged that import with "# noqa: F401", but instead I
    chose to have each of the module import directly from
    "..interpreterbase" instead of ".".
2017-09-21 13:41:03 -04:00
Jussi Pakkanen 2f6702839e Merge pull request #2340 from NickeZ/generator-fix
Add @PLAINNAME@ and @BASENAME@ to arguments argument for Generator
2017-09-21 20:02:21 +03:00
Jussi Pakkanen b6821dc590 Merge pull request #2352 from LukeShu/minor-fixups
Minor fixups
2017-09-21 19:55:00 +03:00
Jussi Pakkanen 2cbd917cf6 Merge pull request #2326 from dcbaker/use-link-compilers
Consider compilers used in static_library parents
2017-09-21 19:53:45 +03:00
Luke Shumaker bb25260f00 flake8: Perform suggested whitespace/formatting changes
This only touches newlines, spaces, and (occaisionally) commas.  Anything
else is left for another commit.
2017-09-21 11:59:03 -04:00
Nirbheek Chauhan 751d59d952 Update Reference-manual.md
Add notes about not using full_path() unless absolutely necessary.
2017-09-20 21:05:50 +00:00
Corentin Noël 3e6c3ea10c Change ternary to another argument 2017-09-20 20:34:20 +02:00
Corentin Noël 6a2926870c Add 'install' keyword to the gettext macro 2017-09-20 20:17:59 +02:00
Luke Shumaker e7d5b9dd8e fix file permissions on a couple of files 2017-09-20 14:02:57 -04:00
Luke Shumaker 3f446a79ec ghwt: Add a comment at the top briefly explaining what it is 2017-09-20 14:02:57 -04:00
Luke Shumaker ef9a49d464 fix a typo in the UTF-8 warning message 2017-09-20 14:02:57 -04:00
Niklas Claesson 63ada0ce26 Update according to input 2017-09-20 19:24:26 +02:00
Dylan Baker d5003c2190 Consider compilers used in static_library parents
Currently meson only considers what compiler/linker were used by a
Target's immediate sources or objects, not the sources of libraries it's
linked with by the link_with and link_while keywords. This means that if
given 3 libraries: libA which is C++, libB which is C, and libC which is
also C, and libC links with libB which links with libA then linking libC
will be attempted with the C linker, and will fail.

This patch corrects that by adding the compilers used by sub libraries
to the collection of compilers considered by meson when picking a
linker.

This adds a new process_compilers_late method to the BuildTarget class,
which is evaluated after process_kwargs is called. This is needed
because some D options need to be evaluated after compilers are
selected, while for C-like languages we need to check the link* targets
for language requirements, and link* targets are passed by kwargs.

This implementation is recursive, since each Target adds it's parent's
dependencies.
2017-09-20 08:59:26 -07:00
Thibault Saunier 96e24a50f9 Add cs_args as known args for csharp 2017-09-20 18:54:15 +03:00
Florian Zwoch 7e1caaf1cd ninja: Generator is more informative on what it is doing. 2017-09-20 18:53:46 +03:00
Dylan Baker 59a90309ab Fix error message for find_program if program cannot be found
Currently this raises an exception because exename is undefined.
2017-09-20 08:42:33 -07:00
Niklas Claesson 07dde545d9 Add @PLAINNAME@ and @BASENAME@ to arguments argument for Generator
Fixes #1282
2017-09-20 13:00:34 +02:00
Nirbheek Chauhan 65dfa428d5 tests/common/144: Add a test for #1865
Ninja goes into an infinite loop when you build this.
2017-09-20 14:24:33 +05:30
Nirbheek Chauhan 6c38b1f281 docs: Document the new str.strip() feature 2017-09-20 13:39:24 +05:30
Nirbheek Chauhan ef0501fc7d tests: Only error for lines starting with tabs
Otherwise we can't even use tabs for testing.
2017-09-20 13:36:42 +05:30
Nirbheek Chauhan 20991c0669 dependencies: Add version detection to pcap 2017-09-20 13:36:42 +05:30
Nirbheek Chauhan 59473e9ed7 Add a new compiler method: get_return_value()
This method accepts a single function that takes no arguments and
returns a single value which can be a value that can be cast to
a 64-bit signed integer, or a string, and returns that value.

Mostly useful for running foolib_version() functions that return the
currently-available version of libraries.
2017-09-20 13:36:42 +05:30
Nirbheek Chauhan 140c463b01 Add detail to the command: kwarg of custom targets 2017-09-20 06:55:54 +00:00
Jussi Pakkanen 898b723ee5 Merge pull request #2331 from mesonbuild/winencode
Do not use universal newlines on old Python versions.
2017-09-19 22:05:11 +03:00
Ola x Nilsson 307b69b69a Fix table in Compiler-properties
hotdoc requires a pipe character for the right edge
2017-09-19 21:45:40 +03:00
Jussi Pakkanen 1556b1bdb0 Merge pull request #2264 from jeandet/master
Some refactoring, introduction of listify function.
2017-09-19 21:20:02 +03:00
Alexis Jeandet e553d0807b Last round with listify function refactoring.
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2017-09-18 22:25:34 +02:00
Alexis Jeandet bf64cf569b Gnome, pkgconfig, Qt4, Qt5 and windows modules slightly refactored.
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2017-09-18 22:21:22 +02:00
Alexis Jeandet 55975f852e Introduced extract_as_list.
Corrected code style and typo.

Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2017-09-18 22:21:22 +02:00
Alexis Jeandet 7549a39a17 Introduction of listify method. Test on build.py module to see benefits.
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2017-09-18 22:21:22 +02:00
Jussi Pakkanen 9c834a4ecd Merge pull request #2310 from hvenev/reconfigure-get_option
Fix get_option() for base options on reconfigure.
2017-09-18 20:42:38 +03:00
Guillaume Poirier-Morency 02ad00b982 ninja: Fix the dependency on the VAPI when 'vala_vapi' is used 2017-09-18 20:40:53 +03:00