[英]How to post-install something using GNU Automake?
I want to setup symlinks and add some lines to system configuration files, I think I should do these jobs in some post-install manner. 我想设置符号链接并添加一些行到系统配置文件,我想我应该以一些安装后的方式完成这些工作。
Makefile.am:
bin_SCRIPTS = a a1
a1:
ln -snf a a1
This does work but it copies a
to a1
in the bindir , while a1
is created as a symlink in the build dir. 这并不工作,但复制
a
到a1
在BINDIR,而a1
作为在build目录符号链接创建。
I'd also want to modify some system configuration files, rather then replace them, for example something like, 我还想修改一些系统配置文件,而不是替换它们,例如,
post-install:
grep -q [magic-word] /etc/somefile || echo more-config... >>/etc/somefile
But I don't know how to do. 但我不知道该怎么做。
I found these targets: 我找到了这些目标:
in Automake manual . 在Automake手册中 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.