From 1905bd6c7e1123adccfd24803fea67227228d38c Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Mon, 25 May 2015 23:17:55 +0200 Subject: Substitute proper paths in ax25d.conf. Depending on the prefix configured, the default ax25d.conf file may contain incorrects paths. Generate config file using the correct sbin dir. Assume node which is not part of ax25-tools to be installed with the same prefix. Don't probe - chances are the sysadmin of a node system is going to install it after ax25-tools so we'd likely have to guess which never is a good thing. Signed-off-by: Ralf Baechle --- ax25/Makefile.am | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'ax25/Makefile.am') diff --git a/ax25/Makefile.am b/ax25/Makefile.am index 40eac38..b6bdbe5 100644 --- a/ax25/Makefile.am +++ b/ax25/Makefile.am @@ -1,8 +1,17 @@ SUBDIRS = axgetput etcfiles = ax25.profile ax25d.conf axspawn.conf rxecho.conf +etcsrcfiles = ax25.profile ax25d.conf.in axspawn.conf rxecho.conf +noinst_DATA = $(etcfiles) varfiles = mheard.dat +subst_path = sed -e 's|[@]SBINDIR[@]|$(sbindir)|' \ + -e 's|[@]SYSCONFDIR[@]|$(sysconfdir)|' + +ax25d.conf: ax25d.conf.in + $(subst_path) < $(srcdir)/ax25d.conf.in > ax25d.conf.tmp + mv ax25d.conf.tmp ax25d.conf + installconf: $(mkinstalldirs) $(DESTDIR)$(AX25_SYSCONFDIR) @list='$(etcfiles)'; for p in $$list; do \ @@ -36,7 +45,8 @@ dist_man_MANS = ax25.4 ax25d.conf.5 axspawn.conf.5 rxecho.conf.5 \ -EXTRA_DIST = $(etcfiles) $(varfiles) +CLEANFILES = ax25d.conf +EXTRA_DIST = $(etcsrcfiles) $(varfiles) ax25d_SOURCES = ax25d.c axctl_SOURCES = axctl.c -- cgit v1.2.3