I'm wondering how to process a data template so as to install properly configurations files accordingly to "make distcheck".
For instance I try severals ways like this but either the template (here rsyslog.conf) is finally installed by "make install" or it leaks for "make distcheck".
The one bellow is based on this thread : Install data directory tree with massive number of files using automake
rsyslogdir = $(sysconfdir)/rsyslog.d
dist_rsyslog_DATA = $(name).conf
install-data-hook: rsyslog.conf
cp rsyslog.conf $(name)$.conf
sed $(rsyslogdir)$(name).conf -i -e \
"s!TEMPLATE!$(name)!"
Do I have to process my template file like a source file even if it concern a configuration file ?
Thanks for your advices.