aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-10-08doc: fix yaml indentation typo that broke building the websiteEli Schwartz1-6/+6
2021-10-08add install_emptydir functionEli Schwartz12-5/+125
This replaces the absolute hack of using ``` install_subdir('nonexisting', install_dir: 'share') ``` which requires you to make sure you don't accidentally or deliberately have a completely different directory with the same name in your source tree that is full of files you don't want installed. It also avoids splitting the name in two and listing them in the wrong order. You can also set the install mode of each directory component by listing them one at a time in order, and in fact create nested structures at all. Fixes #1604 Properly fixes #2904
2021-10-08Add Mac installation instructions for HomebrewIsmayil Mirzali1-0/+4
2021-10-08cmake: handle arguments in the [binaries] section of the machine filePaolo Bonzini2-6/+49
Sometimes, the machine file can include compiler command line options, in order to pick the correct multilib. For example, Meson uses "$cc --print-search-dirs" to find the library search path, where $cc is the cc from the machine file. Because the outputs of "gcc -m32 --print-search-dirs" and "gcc --print-search-dirs" are different, this only works if you have [binaries] cc = ['gcc', '-m32'] in the machine file. Right now, however, the cmake module assumes that the compiler listed in the machine file is either a compiler, or a "launcher" followed by the compiler. Check if the second argument starts with a slash (for Microsoft-like compilers) or a dash (for everyone else), and if so presume that the CMAKE_*_COMPILER_LAUNCHER need not be defined.
2021-10-08backend/vs: Parallelize compilation inside one project.Andres Freund1-0/+1
UseMultiToolTask allows parallelism inside a project, without requiring cl.exe internal multi-threading (which meson generated projects currently can't use, mainly due to specifying output filenames for each object). TODO: - think about making behaviour conditional on msbuild version / add comment why not
2021-10-08backend/vs: Deduplicate basic project template.Andres Freund1-171/+61
Note that a few minor details of the output changed for some target types. I think I called them out with XXXs in the code for now.
2021-10-08backend/vs: Name pch pdb files to avoid naming & lock conflicts.Andres Freund1-0/+7
2021-10-08backend/vs: Move Microsoft.Cpp.props to before ItemDefinitionGroup.Andres Freund1-2/+3
The main reason for this move is to make it easier to merge the copies of project generation. But as far as I can tell, the Microsoft.Cpp.props import also belongs before the ItemDefinitionGroup. Originally the order seems to have been that way, but 431a9ea664 changed it in the course of other changes.
2021-10-08modules/gnome: Fix unset install_dirDylan Baker1-3/+2
install_dir needs to be set to something, because CustomTarget expects that. genmarshal still relies on CustomTarget setting it internally itself. Fixes #9350
2021-10-08modules/gnome: Fix case that could never be hit due to bad typesDylan Baker1-3/+3
It's impossible to get a Holder here, we'd get the unholdered build types. Mypy points this out for us.
2021-10-08modules/gnome: fix use of undefined variableDylan Baker1-1/+1
Theere is no 'output' key in the kwargs, so if this was it it would result in an exception. Mypy spotted this in a branch I'm working on full typing for gnome, but since that seems unlikely to be done before the 0.60 branchpoint I'd like to get this in sooner
2021-10-07Windows module: Make path flattening for windres work in more casesLuca Bacci1-2/+2
If either 'name' or 'name_formatted' are absolute paths, then they are of the form: C:\path/to/file.ext (example) By only substituting slashes with the underscore, we get: C:_path_to_file.ext This is still not quite right, infact os.path.basename() returns: _path_to_file.ext Also replace colons with underscores to overcome issues when absolute paths are involved.
2021-10-07docs: restore build_target method documentation which went missingEli Schwartz1-0/+40
In the refman rewrite, these functions vanished. I noticed this when I went looking at the docs for extract_all_objects(), or should I say I tried to go looking.
2021-10-07clike compilers: drop semicolon at function endVladimír Čunát1-4/+4
warning: ISO C does not allow extra ';' outside of a function [-Wpedantic]
2021-10-07modules/gnome: deprecate yelp variadic sourcesDylan Baker3-1/+27
Yelp currently can take sources two different ways, the first is via variadic arguments, the second is by a keyword argument. If the keyword is passed then the variadic arguments are silently ignored, which is obviously not ideal. Fortunately the variadic form was never documented, and is likely not in wide use. This patch fixes it by deprecating the variadic form, and warning if both are passed. It does not change behavior as someone may be relying on it.
2021-10-06interpreter: Move RangeHolder out of interpreterbase to interpreterDaniel Mensinger5-28/+39
2021-10-06interpreter: Holderify arrays and dictsDaniel Mensinger14-428/+349
This is the final refactoring for extracting the bultin object logic out of Interpreterbase. I decided to do both arrays and dicts in one go since splitting it would have been a lot more confusing.
2021-10-06Fix compiler detection for cl/clang-clJesse Natalie1-1/+1
If the compiler specified is a path to a compiler, the current detection is broken. It needs to use just the compiler name instead.
2021-10-06cmake: Implement support for interpreting link "keywords"Daniel Mensinger3-11/+37
CMakes `target_link_libraries()` supports certain keywords to only enable specific libraries for specific CMake configurations. We now try our best to replicate this for Meson dependencies. Fixes #9197
2021-10-06cmake: Warn if we could use IMPORTED CMake targetsDaniel Mensinger3-2/+43
2021-10-06ci: Add TTY mode to the image builder mounting mesonDaniel Mensinger1-1/+30
2021-10-06ci: Add comment to not forget updating wrapdb rulesXavier Claessens1-0/+2
2021-10-04wrap clone: be less noisy when doing automated code checkoutsEli Schwartz1-4/+5
There are two possible issues, both of which emit very long messages from git: - when shallow cloning via depth + a pinned commit we locally init rather than cloning; use an almost-certainly not conflicting dummy branch name - any time a checkout of a revision is performed, it might not be a branch name, in which case it will be a detached HEAD. By default git is very noisy about this -- it wants you to know what happened and how not to mess up. But wraps aren't per default intended for user editing and development, it's just part of the internal transport which meson uses. So, temporarily squelch this advice. Do not permanently configure the repo like this though, because the user *might* cd in and start developing on the subproject; in this case, any additional git advice they trigger is their responsibility (and they probably do want it). Fixes #9318
2021-10-04backend/vs: Generate dependencies for CustomTargetIndex for a CustomTarget.Andres Freund7-0/+78
Test & fix.
2021-10-04backend/vs: process link dependencies.Andres Freund4-15/+10
Partially-Fixes: #1799
2021-10-04Record build in BuildTarget.link_depends, not just output of targets.Andres Freund1-7/+4
To be able to handle link_depends in backends that do not just operate on a file basis like ninja, information about the targets, not just their output is required.
2021-10-04run_mypy: Add the external_project_moduleDylan Baker1-0/+1
2021-10-04modules/external_project: use typed_kwargsDylan Baker1-23/+33
Which resolves all of the remaining typing issues.
2021-10-04mdoules/external_project: fix most of the mypy warnings/errorsDylan Baker1-29/+39
2021-10-04mesonlib: ConfigurationData can also be a `Dict[str, Tuple[Str, Optional[str]]]`Dylan Baker1-2/+2
2021-10-04dependencies: Dependency.sources can have CustomTargetsDylan Baker1-5/+6
2021-10-04modules/external_project: clean up and sort modulesDylan Baker1-6/+7
2021-10-04remove printf debuggingEli Schwartz1-1/+0
Why did this dumb thing of mine ever get committed???
2021-10-04docs: Temporarily disable modules and move RefMan --> Reference-manualDaniel Mensinger6-7/+16
2021-10-04condense linesEli Schwartz4-22/+11
2021-10-04f-stringsEli Schwartz13-77/+66
2021-10-04use list unpacking to simplify for loop referencesEli Schwartz1-4/+5
2021-10-04fix extra whitespaceEli Schwartz18-28/+0
discovered via flake8 --select E303
2021-10-04flake8: extend the ignore list, do not overrideEli Schwartz1-1/+1
Some things are disabled by default because most people are not interested in them. But (non-obviously) adding a list of ignores to the flake8 configuration file will actually turn back on anything you didn't explicitly specify. This reduces the number of flake8 warnings by about 100, a vast chunk of which are E704 multiple statements on one line (def) which turn out to actually be T.overload or typing definitions with def func(): ... which is understandably quite reasonable to permit.
2021-10-04use idiomatic python for membership testsEli Schwartz1-1/+1
"X not in Y" is preferred over "not X in Y", as the former is more readable.
2021-10-04remove useless variables that are no longer or were never usedEli Schwartz3-3/+1
2021-10-04work around flake8 F811 for T.overload redefined functionsEli Schwartz2-4/+4
Since typing != T as far as flake8 is aware, give the linter an extra hint.
2021-10-04remove double importEli Schwartz1-2/+2
Imported both inside and outside of T.TYPE_CHECKING, the runtime import can be removed by quote-deferring one of the use sites. Update: In between then and now, this got removed from T.TYPE_CHECKING, move it back there rather than preserving the runtime import.
2021-10-04remove f from f-string that has no formattingEli Schwartz3-3/+3
2021-10-04fix incorrect porting from % formatting to .format methodEli Schwartz1-1/+1
(var,) is the correct way to pass values to a percent formatted string, but not to .format so we would end up printing something like: unexpected input at line (4,) Upgrade to an f-string and insert the correct value correctly.
2021-10-04coding style: don't format an empty string with another stringEli Schwartz1-1/+1
'{}'.format('foo') for any given value of 'foo' (in this case, a function returning a string), can always just be 'foo' directly, which is a lot more readable.
2021-10-04better error message for modules returning the wrong valueEli Schwartz1-1/+1
2021-10-04various python neatness cleanupsEli Schwartz16-27/+27
All changes were created by running "pyupgrade --py3-only" and committing the results. Although this has been performed in the past, newer versions of pyupgrade can automatically catch more opportunities, notably list comprehensions can use generators instead, in the following cases: - unpacking into function arguments as function(*generator) - unpacking into assignments of the form x, y = generator - as the argument to some builtin functions such as min/max/sorted Also catch a few creeping cases of new code added using older styles.
2021-10-04Merge pull request #8960 from mensinda/yamlDocJussi Pakkanen152-3097/+6918
Reference Manual 2.0
2021-10-04Minor fixupsDaniel Mensinger6-9/+51