在哪里放置带有 GNU autoconf/automake 的辅助脚本? [英] Where to put helper-scripts with GNU autoconf/automake?

查看:42
本文介绍了在哪里放置带有 GNU autoconf/automake 的辅助脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个将与 GNU autoconf/automake 一起分发的项目,并且我有一组调用 awk 脚本的 bash 脚本.我希望 bash 脚本最终出现在 $PATH 中,而不是 awk 脚本中.我应该如何将这些插入到项目中?它们应该与其他二进制文件一起放入吗?

I'm working on a project that will be distributed with GNU autoconf/automake, and I have a set of bash scripts which call awk scripts. I would like the bash scripts to end up in the $PATH, but not the awk scripts. How should I insert these into the project? Should they be put in with other binaries?

另外,有没有办法确定安装后文件的最终位置?我认为/usr/local/bin 不是总是可执行文件的最终位置...

Also, is there a way to determine the final location of the file after installation? I presume that /usr/local/bin isn't always where the executables end up...

推荐答案

在 Makefile.am 中添加类似内容

Add something like this to Makefile.am

scriptsdir = $(prefix)/bin
scripts_DATA = awkscript1 awkscript2

在这种情况下,它将在 $(prefix)/bin 中安装 awkscript(您也可以使用 $(bindir)).

In this case it will install awkscript in $(prefix)/bin (you can also use $(bindir)).

注意:不要忘记第一个应该是name + dir (scripts -> scriptsdir),第二个应该是name + _DATA (scripts -> scripts_DATA).

Note: Dont forget that the first should be named name + dir (scripts -> scriptsdir) and the second should be name + _DATA (scripts -> scripts_DATA).

这篇关于在哪里放置带有 GNU autoconf/automake 的辅助脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆