code generation - qt qmake extra compilers with dependencies among generated files -
can qmake handle dependencies of generated source files?
we have prf file this:
idl_h.name = generate .h file ${qmake_file_base}.idl idl_h.input = idls  # variable containing our input files idl_h.variable_out = headers idl_h.commands = <command takes .idl , genrates .h> idl_h.output = $$idl_gen_dir/${qmake_file_base}.h qmake_extra_compilers += idl_h   this generation works fine , creates .h files @ make time. problem input files ($$idls) depend on each other, , not built in correct order. have app.idl, containing:
#include "common.idl"   it seems following should work
idl_h.depend_command = g++ -ee ... $$idl_gen_dir/${qmake_file_base}.h   but apparently depend_command is not executed.
another idea parse dependencies out of original idl:
idl_h.depends = $$system(cat ${qmake_file_in} | grep "^#include" | sed -re 's/#include\s+["<]([^.]+)\.idl[">]/\1.h/')   but seems qmake syntax failing me.
try adding
idl_h.dependency_type = type_c   to prf, , drop .depend_command , .depends
Comments
Post a Comment