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
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.
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).
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.
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.
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.
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.
`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`.
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.