Automake:如何添加构建步骤?
目前,我有一个构建链,完全由 automake 管理,例如:
.vala > .c > .o > .exe
我想添加一个新步骤来将 XML 文件 .ui 预处理到 vala 源中:
.ui > .vala > .c > .o > .exe
我在 makefile.am 中做到了这一点
gtkbuilder2vala_SOURCES = \
abstract-window.ui \
main.vala \
$(NULL)
并且:
XSLTPROC = xsltproc
.ui.vala:
$(XSLTPROC) ...
但是 make 不明白:
make: *** No rule to make target `abstract-window.c', needed by `gtkbuilder2vala-abstract-window.o'. Stop.
这似乎是 make 的限制:
http://www.ensta.fr/ ~diam/dev/online/autoconf/autobook/autobook_180.html
如果翻译需要三个步骤——从
.m'到
.x',然后从.x'到
.c',最后到`.o '——那么 Automake 的简单化方法将会被打破。
你还有别的想法吗?
Currently, I have a build chain, completly manage by automake, like:
.vala > .c > .o > .exe
I would like add a new step for preprocess a XML file .ui into a vala source:
.ui > .vala > .c > .o > .exe
I did this, in makefile.am
gtkbuilder2vala_SOURCES = \
abstract-window.ui \
main.vala \
$(NULL)
And:
XSLTPROC = xsltproc
.ui.vala:
$(XSLTPROC) ...
But make don't understand:
make: *** No rule to make target `abstract-window.c', needed by `gtkbuilder2vala-abstract-window.o'. Stop.
This seems to be a limitation of make:
http://www.ensta.fr/~diam/dev/online/autoconf/autobook/autobook_180.html
if the translation takes three steps--from
.m' to
.x', then from.x' to
.c', and finally to `.o'---then Automake's simplistic approach will break.
Have you another idea?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我会按照这些思路做一些事情,
将
XSLTPROC
定义保留给configure 中的
。AC_SUBST
(或者更好的是AC_ARG_VAR
) .acI would do something along these lines
I would leave the
XSLTPROC
definition to anAC_SUBST
(or even better, anAC_ARG_VAR
) inconfigure.ac
.