在makefile.am(自动工具)中使用sed
我正在使用Autotools打包程序(我没有太多经验)。
我有一个gnome .desktop文件,该文件引用了可执行文件和图标的位置。 这需要是/usr/share
或/usr/local/share
,具体取决于@prefix@
。 我如何在data/makefile.am
上在此文件上运行sed
配置为?
我的makefile.am
目前很简单
wombatdir = $(prefix)/share/
wombat_DATA = applications/wombat.desktop pixmaps/wombat.svg
。
I'm packaging up a program using autotools (which I don't have much experience with).
I have a gnome .desktop file that references the location of the executable and the icon.
This needs to be /usr/share
or /usr/local/share
depending upon the @PREFIX@
.
How can I run sed
on this file in the data/Makefile.am
so that the installed file works no mater what the @PREFIX@
is configured to?
My Makefile.am
is pretty simple at the moment ..
wombatdir = $(prefix)/share/
wombat_DATA = applications/wombat.desktop pixmaps/wombat.svg
Michael
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是关于我要做的。
在
configure.ac
中,添加ac_prog_sed
。在
makefile.am
中,添加然后将您的
wombat.desktop
重命名为wombat.desktop.in
and write(不确定PixMaps/是否是正确的不过,安装SVG文件的位置)
wombat.desktop.in
将受到版本的控制。wombat.desktop
将不受控制,并且很可能会添加到.gitignore
:This is about what I would do.
In
configure.ac
, addAC_PROG_SED
.In
Makefile.am
, addThen rename your
wombat.desktop
towombat.desktop.in
and write(not sure whether pixmaps/ is the correct place to install an SVG file, though)
wombat.desktop.in
will be version controlled.wombat.desktop
will not be version controlled, and might very well be added to.gitignore
: