简体   繁体   English

如何使用GNU Automake安装后的东西?

[英]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. 这并不工作,但复制aa1BINDIR,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: 我找到了这些目标:

  • install-exec-hook 安装-EXEC钩
  • install-data-hook 安装数据钩

in Automake manual . Automake手册中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM