linuxpackagingautomake

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.

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.


Solution

  • I found these targets:

    in Automake manual.