build: add order-only dependency between building antlr .o and IDL headers

This ensures that if an antlr generated .cpp file depends on an
IDL-generated .hh file, then that .hh is generated before the .o is
built.
This commit is contained in:
Avi Kivity
2016-03-03 09:52:25 +02:00
parent b42d3a90b3
commit bec30ccf25

View File

@@ -876,7 +876,7 @@ with open(buildfile, 'w') as f:
grammar.source.rsplit('.', 1)[0]))
for cc in grammar.sources('$builddir/{}/gen'.format(mode)):
obj = cc.replace('.cpp', '.o')
f.write('build {}: cxx.{} {}\n'.format(obj, mode, cc))
f.write('build {}: cxx.{} {} || {}\n'.format(obj, mode, cc, ' '.join(serializers)))
f.write('build seastar/build/{mode}/libseastar.a seastar/build/{mode}/apps/iotune/iotune: ninja {seastar_deps}\n'
.format(**locals()))
f.write(' subdir = seastar\n')