配置问题:安装库示例程序最合适的位置是什么?
我目前正在为一个库编写一个配置脚本,并希望将其与一些示例二进制文件打包以提供有关如何使用它的示例。当用户运行“make install”时,安装这些二进制文件的最合适位置在哪里?我问什么是符合 GNU 标准的合适的东西。
谢谢,
萨姆
I'm currently writing a configure script for a library and would like to package it with some sample binaries to give examples on how to use it. Where would be the most appropriate location to install these binaries when a user runs "make install"? I ask what would be appropriate in terms of what would comply with GNU standards.
Thanks,
Sam
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用
/your_prefix_installation_path/share/your_package_name
文件夹来执行此操作。这是放置文档/示例的通用文件夹。操作方法:
例如,以下代码片段如何将文件安装到“$(datadir)/your_package_name”中。
you can use the
/your_prefix_installation_path/share/your_package_name
folder to do it. Which is the general folder to put the documentation/example in.To do it:
For instance, the following snippet how to install your file into ‘$(datadir)/your_package_name’.
在安装目录之外的“Examples”文件夹中。
如果库的安装文件夹是“系统”文件夹,请在通常的“我的程序”位置创建一个安装目录,并在自述文件中添加有关如何找到它的说明。
In an "Examples" folder, off the installation directory.
If the installation folder for the library is a "System" folder, make an installation directory in the usual "My Programs" place, and put instructions in the README on how to find it.