【发布时间】:2016-04-27 20:40:56
【问题描述】:
我在子目录中有一些头文件,必须将它们复制到我的包含目录中的同名子目录中。我可以使用 nobase 前缀来实现这一点(我正在使用 heimdal 代码,仅供参考):
nobase_include_HEADERS = hcrypto/aes.h \
hcrypto/bn.h \
hcrypto/cmac.h \
hcrypto/des.h \
hcrypto/dh.h \
hcrypto/dsa.h \
etc...
但是其中一些头文件是在构建过程中生成的(因为必须在这些头文件存在之前构建 heimdal),所以我需要使用 nodist 前缀,这样 dist 就不会死。
I found an article 说我可以同时使用它们,甚至提供了一个类似的例子,所以我这样做了:
nobase_nodist_include_HEADERS = hcrypto/aes.h \
hcrypto/bn.h \
hcrypto/cmac.h \
hcrypto/des.h \
hcrypto/dh.h \
hcrypto/dsa.h \
etc...
我没有注意到任何警告或错误,但这些头文件不会被复制到我的包含目录中。 是我做错了什么,还是 autotools 中存在错误?
有趣的是,如果我颠倒前缀,我会得到这个错误:
Makefile.am:93: error: 'nodist_nobase_include_HEADERS' is used but 'nobase_includedir' is undefined
automake documentation 中解释了该错误的原因:
在与“dist_”或“nodist_”结合使用时,应首先指定“nobase_”
我还定义了 nodist_include_HEADERS (正在工作)。也许这两个定义引起了某种冲突?
我刚刚尝试删除 nodist_include_HEADERS 并将所有标题放在 nobase_nodist_include_HEADERS 行下,但现在我的标题都没有安装。
Automake 和系统信息: automake (GNU automake) 1.13.4 openSUSE 13.2 (x86_64)
【问题讨论】:
-
请在问题本身中添加任何其他信息,而不是滥用某些 cmets。
-
请做一个最小的完整工作示例stackoverflow.com/help/mcve(在您的情况下是一小部分 Makefile.am)