mirror of
https://github.com/rspeer/wordfreq.git
synced 2024-12-23 17:31:41 +00:00
update the build diagram and its script
This commit is contained in:
parent
2370287539
commit
5def3a7897
@ -11,17 +11,19 @@ def ninja_to_dot():
|
||||
print('rankdir="LR";')
|
||||
for line in sys.stdin:
|
||||
line = line.rstrip()
|
||||
parts = line.split(' ')
|
||||
if parts[0] == 'build':
|
||||
if line.startswith('build'):
|
||||
# the output file is the first argument; strip off the colon that
|
||||
# comes from ninja syntax
|
||||
outfile = last_component(parts[1][:-1])
|
||||
operation = parts[2]
|
||||
infiles = [last_component(part) for part in parts[3:]]
|
||||
output_text, input_text = line.split(':')
|
||||
outfiles = [last_component(part) for part in output_text.split(' ')[1:]]
|
||||
inputs = input_text.strip().split(' ')
|
||||
infiles = [last_component(part) for part in inputs[1:]]
|
||||
operation = inputs[0]
|
||||
for infile in infiles:
|
||||
if infile == '|':
|
||||
# external dependencies start here; let's not graph those
|
||||
break
|
||||
for outfile in outfiles:
|
||||
print('"%s" -> "%s" [label="%s"]' % (infile, outfile, operation))
|
||||
print("}")
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 3.3 MiB After Width: | Height: | Size: 10 MiB |
Loading…
Reference in New Issue
Block a user