Commit Graph

138 Commits

Author SHA1 Message Date
Frank Benkstein
1992ab65ad enhance write_fake_manifest.py
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
2016-06-23 12:23:23 +02:00
KiYugadgeter
28cedf1695 Make misc/measure.py compatible with python3 2016-05-04 11:38:31 +09:00
Nicolas Despres
d3c7da5893 Add support for implicit outputs in ninja_syntax.py. 2016-02-06 09:37:51 +01:00
Nicolas Despres
48e647781d Teach zsh to complete intermediary targets.
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.
2015-12-24 16:53:05 +01:00
Evan Martin
2eb1cc9329 Merge pull request #1042 from avallee/master
Fix wrapping file paths in Writer.comment
2015-12-06 11:17:55 -08:00
Alex Vallée
97e96284a3 Disable long word wrapping entirely in comments.
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).
2015-11-27 16:09:34 -05:00
Nico Weber
207ff58e44 Merge pull request #1047 from pykello/master
Speed-up bash target auto-complete.
2015-11-11 21:46:33 -08:00
Nico Weber
dda86b7540 Merge pull request #1046 from zed0/master
Speed up zsh target completion
2015-11-11 21:46:19 -08:00
Alex Vallee
8c18cf97ff Fix indent in pull request #1042. 2015-11-11 22:48:39 -05:00
Nico Weber
5e076f0593 Update link to point to ninja-build.org 2015-11-11 13:27:16 -08:00
Nico Weber
c2307f9277 Make links point to org page 2015-11-11 11:53:15 -08:00
Hadi Moshayedi
fc135c456d Speed-up bash target auto-complete.
These speed-ups include:

* Let compgen do the command substitution. Similar to
  https://lists.gnu.org/archive/html/bug-bash/2012-03/msg00115.html
* Use "cut" instead of "awk" for separating fields.
2015-10-31 06:13:33 -04:00
Ben Falconer
530d2b1666 Speed up zsh target completion 2015-10-30 14:43:32 +00:00
Alex Vallée
8f658d6329 Fix wrapping file paths in Writer.comment
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.
2015-10-23 16:36:28 -04:00
Nico Weber
5560e2e26b Add notes on using afl-fuzz to HACKING. 2015-03-19 10:41:28 -07:00
Fraser Cormack
d130968ecd zsh-completion: remove use of 'head' with negative offset
Some systems - like OSX - don't come with a version of head that
supports a negative value for the -n flag. Such systems get a message
such as this when tab-completing ninja's -d flag:

    ninja -dhead: illegal line count -- -1

Using sed instead should be more universally supported.
2014-12-20 00:12:52 +00:00
Fanael Linithien
f5f4b3ba7c Remove unneeded save-excursion.
syntax-propertize-function is allowed to move the point and mark.
2014-11-24 19:09:33 +01:00
Fanael Linithien
40a76d8cd5 Use lexical-binding.
There's no reason not to use lexical-binding when supporting only
Emacs 24+. Its semantics are just that much saner.
2014-11-23 22:29:49 +01:00
Fanael Linithien
f15faca3c3 Add a Emacs 24 requirement.
Only Emacs >= 24 has prog-mode.
2014-11-23 22:26:54 +01:00
Fanael Linithien
11377a46d1 Correctly recognize a comment if the previous line is a comment ending in $. 2014-11-23 22:25:27 +01:00
Fanael Linithien
73f934e886 Avoid putting properties past the end of the buffer. 2014-11-23 22:25:27 +01:00
Fanael Linithien
14d161080c Don't use dotted list syntax unless necessary. 2014-11-23 22:25:27 +01:00
Fanael Linithien
310532c0b0 Remove unnecessary regexp group. 2014-11-23 22:25:27 +01:00
Fanael Linithien
931db561cf Correctly recognize comments. 2014-11-23 22:25:27 +01:00
Fanael Linithien
327c094596 Set up a proper syntax table for ninja-mode.
Since quotes are not meant to be treated as string delimiters,
the syntax table is the place to tell Emacs so.

This also means syntactic fontification can be reenabled and the
font-lock keyword entry for comments removed.
2014-11-23 22:25:27 +01:00
Fanael Linithien
c600a82589 Set comment-start buffer-locally, not globally. 2014-11-23 22:23:35 +01:00
Fanael Linithien
2f7f4ae945 Use quasi-quoting instead of list+cons. 2014-11-23 22:23:35 +01:00
Fanael Linithien
a13b647460 Reindent ninja-mode.el using Emacs.
Emacs knows best how to indent Emacs Lisp.
2014-11-23 22:23:30 +01:00
Fanael Linithien
6091cfefcd Use double semicolon comments. 2014-11-23 22:23:28 +01:00
Fanael Linithien
77d5c3a67a Don't leave lone closing parens. 2014-11-23 22:18:24 +01:00
Elan Ruusamäe
6fc15c47a0 no subshell
don't need subshell to send stderr to /dev/null
2014-11-23 12:35:03 -08:00
Evan Martin
2ab60038b6 Merge pull request #772 from drbo/syntax_bugfix
Added highlighting in Emacs for ${...} variables
2014-11-23 12:14:02 -08:00
Evan Martin
1e21e5f441 drop leftover references to bootstrap.py 2014-11-18 09:58:45 -08:00
Evan Martin
62c10b9969 Merge pull request #813 from cdlm/emacs-mode-require-newline
Emacs mode: inherit from prog-mode
2014-11-18 09:44:38 -08:00
Evan Martin
dcd41dcef3 add a --bootstrap mode for configure.py
Instead of bootstrapping through a separate script, instead make
configure.py able to either generate a build.ninja *or* just execute
all the computed commands to build a ninja binary.
2014-11-18 08:15:37 -08:00
Evan Martin
76a95e45bb add an "expand" function to ninja_syntax
Implements basic variable expansion for use in configure.py.
2014-11-18 08:15:36 -08:00
Nico Weber
2cfb99985d emacs: Remove an empty line, wrap a comment. 2014-11-17 15:15:19 -08:00
Scott Graham
65151e7eef CanonicalizePath handles \ on Windows 2014-10-30 15:34:25 -07:00
Fraser Cormack
a73e6931ae Add zsh completion for targets in conjunction with -C
zsh can now list completions for targets in the directory specified by
the -C option
2014-10-24 20:34:06 +01:00
Damien Pollet
fb9f17f48c Emacs mode: inherit from prog-mode
`prog-mode` ensures a final newline when saving files, which is useful
since ninja fails otherwise.

See `require-final-newline` and `mode-require-final-newline`.
2014-09-16 14:28:46 +02:00
donkopotamus
781aa24ba5 Add highlighting of rule in build statements
Highlight the rule being used in a build statement.  Also add `.` to acceptable characters in a rule name and relax whitespace matching before the name.
2014-06-27 12:26:37 +12:00
donkopotamus
583632513c Update ninja-mode for emacs to handle hyphens in rule names 2014-06-26 16:34:35 +12:00
Nico Weber
23a88eaf4c Version 1.4 of the vim syntax file was merged.
See https://code.google.com/p/vim/source/detail?r=92751673cc37c9ef4d1ad1ac4d42d36faa67f88f
2014-06-12 13:22:35 -07:00
Demetri Obenour
4e0e6c58b4 Removed tab and added . in variable name regexp 2014-06-01 13:39:48 -04:00
Demetri Obenour
44a0d08a52 Added highlighting in Emacs for ${...} variables 2014-06-01 11:29:18 -04:00
Nico Weber
6915955e37 Merge pull request #768 from nico/vimsyn
vim syntax: Correctly highlight $$a as ($$)a instead of $($a).
2014-05-29 17:58:33 -07:00
Nico Weber
4213308cb9 vim syntax: Correctly highlight $$a as ($$)a instead of $($a). 2014-05-13 23:51:51 +02:00
Nico Weber
1a465ea6c8 Merge pull request #756 from ronnychevalier/rc/zsh_completion
improve zsh completion
2014-05-05 15:54:26 -07:00
Chris Drake
fca5ea6ece Get rid of unused import 2014-05-04 19:55:09 -07:00
Chris Drake
c5ee738460 Use consistent indentation conventions 2014-05-04 19:55:02 -07:00