Automake/Autoconf 脚本自定义目录

Automake/Autoconf scripts custom directory

我项目的根文件夹是PROJECTPROJECT/scripts/abc.sh里面只有一个脚本,我想把它安装到/usr/share/xxx/abc.sh目录下。

因为没有安装到/usr/bin/abc.sh,所以bin_SCRIPTS = abc.sh是不正确的。

你能告诉我Makefile.am怎么写吗?

您需要定义安装目录:

xxxdir = $(datarootdir)/xxx

xxx_SCRIPTS = scripts/abc.sh

More typically 类似于:

pkgdata_SCRIPTS = scripts/abc.sh

其中 automake 已经设置 pkgdatadir