summaryrefslogtreecommitdiffstats
path: root/misc
Commit message (Collapse)AuthorAgeFilesLines
* Implement type hints in `ninja_syntax.py`Thaddeus Crews2024-04-061-21/+53
|
* Gracefully handle outdated .ninja_log during '-t recompact'von Heydebrand Julian2024-03-211-0/+23
| | | | When we explicitly unlink the file we should return LOAD_NOT_FOUND instead of LOAD_SUCCESS
* Minor fix to output_test.pyDavid 'Digit' Turner2024-03-141-9/+6
| | | | | | | | | | | | Do not use os.chdir() to change the current directory inside the run() function, as doing this prevents the temporary directory from being removed. Moreover, this breaks pytest invocations when adding new regression test scripts in this directory (as done in other forks). + Use dict.pop() to undefine environment variables in `default_env` dictionary.
* Add output_test assertion for quiet without 'no work to do'Tamino Bauknecht2023-10-241-0/+1
|
* Allow duplicate rule variable usage.David 'Digit' Turner2023-04-271-0/+13
| | | | | | | | This fixes #1966 by removing the variable name from the lookups stack once the recursive lookup call has been performed. Without this, any previously expanded variable could no longer be referenced in the command, as Ninja would (incorrectly) complain about a cyclical dependency.
* ninja-mode.el: add support for indentationKonstantin Kharlamov2023-03-281-5/+30
| | | | | | | | | | | We default `ninja-indent-offset` to `2` because Meson and CMake use `1` and `2` values accordingly, but `1` seems like too little, so use `2`. The correctness was tested in particular on two `build.ninja` files, one generated by Meson (1790 lines), and another by CMake (7777 lines). After setting `ninja-indent-offset` to the expected by the file value and re-indenting whole file the buffer was left unchanged, i.e. the calculated offset matched the ones already used.
* ninja-mode.el: fix variables highlightingKonstantin Kharlamov2023-03-281-1/+1
| | | | | | | | | | | | The code previously did not take into account that between the name and assignment may be any number of space including no space at all. It was also incorrectly highlighting in a code like foo = bar = buzz the `bar` as a variable, even though the `bar = buzz` is just a text that gets assigned to `foo`, i.e. `bar` is not a variable. Fix that.
* Use python3 in all run linesNico Weber2023-01-103-5/+3
| | | | | We already did this in some, this converts the rest. Also chmod +x on write_fake_manifests.py while here.
* Add --quiet flag to zsh completionPaul Seyfert2022-09-041-1/+2
|
* improve zsh-completionEisuke Kawashima2022-06-131-17/+19
| | | | | | | - add `ninja` prefix to functions - improve completion of `-d` and `-t` - stop completion if `-h`, `--help`, or `--version` is supplied - add missing `--verbose` options
* Make the output of `ninja -t inputs` deterministicDavid 'Digit' Turner2022-03-211-0/+18
| | | | | | | | | This sorts the output of `ninja -t inputs` to make it deterministic and remove duplicates, and adds a regression test in output_test.py + Ensure all inputs are listed, not only explicit ones. + Document the `inputs` tool in doc/manual.asciidoc.
* xrange() was removed in Python 3 in favor of range() (#2036)Christian Clauss2021-11-111-4/+4
| | | https://portingguide.readthedocs.io
* Make output_test.py executable again (mistake thanks to WSL)Jan Niklas Hasse2021-06-101-0/+0
|
* Put Info output back on stdout instead of stderrJan Niklas Hasse2021-06-101-0/+5
| | | | | | See comment in #1899. Also adds two tests to output_test.py which check this behaviour by relying on Python's suprocess.check_output not piping stderr.
* Add test for status suppression under '--quiet'.Eli Ribble2021-05-061-0/+18
| | | | This just tests that the flag works.
* Adds dyndep support to ninja_syntax.py.Nathan Ringo2021-01-121-1/+3
|
* Created oss-fuzz folder and moved build.sh and sample ninja file into itAdamKorcz2020-12-102-0/+0
|
* Added fuzzer with build script and seedAdamKorcz2020-12-083-0/+84
|
* Add missing Apache license header, fix #1781Jan Niklas Hasse2020-05-251-0/+14
|
* test: skip non-Windows tests if on WindowsMichael Hirsch, Ph.D2020-04-271-0/+1
|
* Add output test for 'no work to do.'Jan Niklas Hasse2020-04-241-0/+3
|
* Replace references to README with README.mdMike Gilbert2020-03-201-1/+1
| | | | | The README file was renamed to README.md in commit a37da20ae74c81703b1c811182fc154d95ed46fe.
* Ignore nonexistent .ninja_log/.ninja_deps for restat and recompactJan Niklas Hasse2019-12-231-0/+5
|
* Run output test in temporary directoryJan Niklas Hasse2019-12-231-4/+7
|
* Fix test_issue_1418 to pass on 1-core VMBernhard M. Wiedemann2019-09-201-1/+1
| | | | | the previous assert would fail because on a 1-core VM, the 3 outputs were produced sequentially from top to bottom
* Remove trailing whitespace from all filesJan Niklas Hasse2019-04-171-0/+41
|
* ninja_syntax.py: remove unused has_path argumentAlex Vallee2019-01-301-1/+1
| | | The usage of the parameter was removed a long time ago and was never cleaned up. The argument is not provided in the test.
* Add OSX build on travis (#1502)Takuto Ikuta2018-11-171-1/+5
| | | Also make test script works for OSX script command.
* Allow disabling of escape code stripping, fix #1475Jan Niklas Hasse2018-11-131-5/+16
| | | | | Don't strip colors when CLICOLOR_FORCE is set to a non-zero value. This environment variable is also used by CMake's Make back-end.
* Make output_test.py independent of the environmentJan Niklas Hasse2018-11-071-2/+8
|
* Add test for #1418 (edge output should match status)Jan Niklas Hasse2018-11-051-0/+21
|
* Add script to test Ninja's outputJan Niklas Hasse2018-11-051-0/+61
| | | | First test checks for #1214.
* Merge pull request #1472 from Hi-Angel/masterJan Niklas Hasse2018-11-021-1/+1
|\ | | | | Fix wrong description of script installation
| * Fix wrong description of script installationKonstantin Kharlamov2018-09-281-1/+1
| | | | | | The described way of installation makes zsh fail with `_arguments:comparguments:325: can only be called from completion function`. Per [zsh documentation](https://github.com/zsh-users/zsh-completions/blob/master/zsh-completions-howto.org#telling-zsh-which-function-to-use-for-completing-a-command) the correct way is to use `$fpath`.
* | Misc typo fixes by https://github.com/codespell-project/codespell/Mo Zhou2018-09-062-3/+3
|/
* update ninja.vim version after bff884d55Nico Weber2018-04-051-2/+2
|
* Merge pull request #1356 from RedBeard0531/vim_syntaxNico Weber2018-04-051-5/+9
|\ | | | | Improve vim syntax definition
| * Improve vim syntax definitionMathias Stearn2017-11-091-5/+9
| | | | | | | | | | Only highlights comments where the ninja lexer would treat them as such. Also correctly scopes the rule- and pool-specific variables highlighting.
* | Support pool for Writer.build() in ninja_syntax.pyKareem Khazem2018-02-201-1/+3
|/ | | | | ninja_syntax.py now supports a pool being specified for individual builds, as well as rules.
* Make zsh completion use explicitly specified ninja filesMathias Stearn2017-05-181-1/+6
|
* Fix syntax error in misc/write_fake_manifests.pyJames Robinson2016-10-251-2/+2
| | | | This is used by manifest_parser_perftest
* enhance write_fake_manifest.pyFrank Benkstein2016-06-231-18/+71
| | | | | | | | | | | | | | | Add an option to write_fake_manifest.py to generate sources expected by the manifest. Also slightly adapt command lines to the called commands. Together these changes mean that generated manifest can actually be executed successfully on Linux and OSX. Also add command line options to to change the number of targets being generated and the seed for the random number generator. Example usage: # create build directory in fake/build, sources in fake/src $ python misc/write_fake_manifest.py -s ../src fake/build # execute build in fake/build $ ninja -C fake/build
* Make misc/measure.py compatible with python3KiYugadgeter2016-05-041-5/+7
|
* Add support for implicit outputs in ninja_syntax.py.Nicolas Despres2016-02-062-1/+13
|
* Teach zsh to complete intermediary targets.Nicolas Despres2015-12-241-3/+2
| | | | | | | | Bash completion script uses "-t targets all" to list the target which is faster than "-t targets" and reports intermediary targets (see the manual entry for the 'targets' tool). See commit fc135c45.
* Merge pull request #1042 from avallee/masterEvan Martin2015-12-062-2/+9
|\ | | | | Fix wrapping file paths in Writer.comment
| * Disable long word wrapping entirely in comments.Alex Vallée2015-11-272-10/+3
| | | | | | | | | | | | As pointed out by nico, we should unconditionally disable breaking of long words in comments. It is unlikely long words that are in comments should be split (like pathnames).
| * Fix indent in pull request #1042.Alex Vallee2015-11-121-1/+1
| |
| * Fix wrapping file paths in Writer.commentAlex Vallée2015-10-232-2/+16
| | | | | | | | | | | | | | | | Long file names, especially with hyphens will get incorrectly wrapped by the comment method. Pass has_path=True to prevent this type of wrapping. This is mainly so that longer path names can show up in comments on their on line without breaking them up.
* | Merge pull request #1047 from pykello/masterNico Weber2015-11-121-3/+2
|\ \ | | | | | | Speed-up bash target auto-complete.