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

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

问题描述

我正在开发一个将与GNU autoconf/automake一起分发的项目,并且我有一组bash脚本,它们称为awk脚本.我希望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(您也可以使用$ {bindir))中安装awkscript.

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

注意:不要忘记第一个名称应为name + dir(脚本-> scriptsdir),第二个名称应为name + _DATA(脚本-> 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天全站免登陆