summaryrefslogtreecommitdiffstats
path: root/waftools/dependencies.py
Commit message (Collapse)AuthorAgeFilesLines
* build: use unified dependency expressions instead of weird fieldswm42017-09-181-40/+24
| | | | | | | | | | | | | | | | Instead of "deps", "deps_neg", and "deps_any" fields, just have a single "deps" field, which changes from an array to a string. The string is now an expression, which can contain the operators &&, ||, !, and allows grouping with ( ). It's probably overkill. If it gets a maintenance burden, we can switch to specifiying the dep expressions as ASTs (or maybe eval()-able Python expressions), and we could simplify the code that determines the reason why a dependency is not fulfilled. The latter involves a complicated conversion of the expression AST to DNF. The parser is actually pretty simple, and pretty much follows: https://en.wikipedia.org/wiki/Shunting_yard_algorithm
* build: change how some OS specific source files are selectedwm42017-06-291-0/+12
| | | | | | | | | | | | | | | | | | In a bunch of cases, we emulate highly platform specific APIs on a higher level across all OSes, such as IPC, terminal, subprocess handling, and more. We have source files for each OS, and they implement all the same mpv internal API. Selecting which source file to use on an OS can be tricky, because there is partially overlapping and emulated APIs (consider Cygwin on Windows). Add a pick_first_matching_dep() function to make this slightly easier and more structured. Also add dummy backends in some cases, to deal with APIs not being available. Clarify the Windows dependency identifiers, as these are the most confusing.
* build: Set a default error message for #3692Thomas Nagy2016-10-211-1/+1
| | | | | This change will prevent annoying exceptions from appearing when error messages are missing.
* build: make sure the HAVE_ key is undefined on failureStefano Pigozzi2015-08-191-0/+1
| | | | | | Some particular checks can define the HAVE_ key on their own. To make sure they work correctly when composed (with compose_checks) we force the HAVE_ key to be undefined if a check fails.
* build: remove useless classStefano Pigozzi2015-07-261-5/+3
|
* build: make deps_neg work with multiple dependenciesStefano Pigozzi2013-11-291-2/+2
| | | | Previous code only worked id len(deps_neg) was 1.
* build: make --disable-gl disable all the gl backendsStefano Pigozzi2013-11-281-4/+13
| | | | Fixes #369
* build: store dependencies as listsStefano Pigozzi2013-11-241-13/+23
| | | | | | | | | | | | | In Python sets are unordered, so iterating them after converting to a list always leads to different results. The code iterated on them to collect all the flags to pass to the compiler, and since the order of the flags changed, waf would rebuild all of the C files. Seems like in Python 2 this worked as expected by pure chance. This commit stores the sets as lists, and converts them to sets when the set operations are needed. Fixes #363
* switch the build system to wafStefano Pigozzi2013-11-211-0/+210
This commit adds a new build system based on waf. configure and Makefile are deprecated effective immediately and someday in the future they will be removed (they are still available by running ./old-configure). You can find how the choice for waf came to be in `DOCS/waf-buildsystem.rst`. TL;DR: we couldn't get the same level of abstraction and customization with other build systems we tried (CMake and autotools). For guidance on how to build the software now, take a look at README.md and the cross compilation guide. CREDITS: This is a squash of ~250 commits. Some of them are not by me, so here is the deserved attribution: - @wm4 contributed some Windows fixes, renamed configure to old-configure and contributed to the bootstrap script. Also, GNU/Linux testing. - @lachs0r contributed some Windows fixes and the bootstrap script. - @Nikoli contributed a lot of testing and discovered many bugs. - @CrimsonVoid contributed changes to the bootstrap script.