【发布时间】:2011-03-26 13:46:43
【问题描述】:
对于那些不熟悉 IDL(接口描述语言)的人来说,它抽象了数据描述以供跨平台(java、c、c++ 等)使用。我的项目具有从 Foo.idl 生成的依赖项 Foo.c、Foo.h、FooHelper.c 和 FooHelper.h。如何在 Foo.idl 更改时运行任意命令,但在构建过程中仍包含 Foo.c、FooHelper.c?
我目前的尝试将规则添加到 Makefile.am - 希望规则被复制到生成的 Makefile。
我试过了:
Foo.idl : Foo.idl
${the_generate_command}
然后将 Foo.idl 添加到 my_program_SOURCES 但它在构建时不运行 the_generate_command。
我已经成功地从 IDL 生成了
Foo.c Foo.h FooHelper.h FooHelper.c : Foo.idl
${the_generate_command}
但它不会将 Foo.c、FooHelper.c 添加到编译过程中,因此它们永远不会被构建,只是由 the_generate_command 生成!
所有代码(包括idl)都在$PROJECT_DIR/src。
【问题讨论】:
标签: build-process makefile automake idl libtool