build.ninja knows about its own dependencies

This commit is contained in:
Rob Speer 2015-05-08 12:40:06 -04:00
parent d6cc90792f
commit 35128a94ca

View File

@ -45,6 +45,10 @@ def make_ninja_deps(rules_filename, out=sys.stdout):
print(rulesfile.read(), file=out) print(rulesfile.read(), file=out)
lines = [] lines = []
# The first dependency is to make sure the build file is up to date.
add_dep(lines, 'build_deps', 'rules.ninja', 'build.ninja',
extra='wordfreq_builder/ninja.py')
if PRETOKENIZE_TWITTER: if PRETOKENIZE_TWITTER:
lines.extend( lines.extend(
twitter_preprocess_deps( twitter_preprocess_deps(
@ -188,6 +192,8 @@ def combine_lists(languages):
output_dBpack = wordlist_filename('combined', language, 'msgpack.gz') output_dBpack = wordlist_filename('combined', language, 'msgpack.gz')
add_dep(lines, 'freqs2dB', output_file, output_dBpack, add_dep(lines, 'freqs2dB', output_file, output_dBpack,
extra='wordfreq_builder/word_counts.py') extra='wordfreq_builder/word_counts.py')
lines.append('default {}'.format(output_dBpack))
return lines return lines