Automake flex output naming

家住魔仙堡 提交于 2021-01-28 20:08:37

问题


If if use, for example

foo_SOURCES = bar.l

then, automake generates via flex file bar.c. But, if I provide prefix AM_LFLAGS=-Psome_prefix, it generates lex.some_prefix.c, which is not known by other compilation rules, so it fails with bar.c: No such file or directory. Where is my mistake and how can I work around it? I really need prefix.


回答1:


I think the only way around this is to write your own rule for the .l->.c translation. Something like:

x_SOURCES = lex.some_prefix.c
lex.some_prefix.c: lex.l
    ... rule here

You may also need a tweak to ensure you distribute the .l file.



来源:https://stackoverflow.com/questions/12569547/automake-flex-output-naming

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!