我有一个项目,其中我们有一些在Visual Studio中生成的文档,由Python的运行时解析,以便我们的用户可以在REPL窗口中执行help (our.module)
之类的操作并获取有意义的数据。我们正在为Linux中的构建环境切换到autotools。我必须找到一种方法来确保必要的2 xml文件通过make安装到$(libdir)
。
我的第一次尝试是在Makefile.am
中做这样的事情dist_lib_DATA = file1.xml file2.xml
然而,这产生了这个结果:
[afalanga@afalanga4 BuildSystemWork]$ autoreconf
Makefile.am:5: error: 'libdir' is not a legitimate directory for 'DATA'
autoreconf: automake failed with exit status: 1
有人告诉我,autotools手册中有一个解决方法,提到 somewhere 。我还没找到它。我现在唯一可以想到的“解决方法”的方法是在Makefile.am中编写一个特殊规则来复制文件。像这样的东西
install_docs : file1.xml file2.xml
cp $^ $(libdir)
这看起来是否正确或有更好的方法吗?另一种方法可能是如果python有其他地方寻找文档,我可能能够在那里安装?这可能吗?我并不熟悉python内部的“内联”帮助。