SummaryRefsLogTreeCommitDiffStats
path: root/Makefile.am
diff options
context:
space:
mode:
authorMathieu Lirzin <mthl@gnu.org>2018-03-19 23:31:30 +0100
committerMathieu Lirzin <mthl@gnu.org>2018-03-20 00:11:28 +0100
commitdd9d6a6b06f3ec249757c728dc1568b2e4efbd3f (patch)
tree69642a47d46869ec336ae4de1dfcbc4cc371123f /Makefile.am
parent22ba12d1aa0f6380146f6e66382dbc1058c30625 (diff)
downloadmcron-dd9d6a6b06f3ec249757c728dc1568b2e4efbd3f.tar.gz
mcron-dd9d6a6b06f3ec249757c728dc1568b2e4efbd3f.tar.bz2
mcron-dd9d6a6b06f3ec249757c728dc1568b2e4efbd3f.zip
build: Handle all programs names transformations
Previously only prepending a prefix was handled when installing 'crontab'. Using the 'transform' Make macro allows the installation process to support generic transformations as defined by the '--program-suffix' and '--program-transform-name' configure options. * configure.ac: Don't substitue '@real_program_prefix@'. * Makefile.am (fpp): Remove. (transform_exe): New macro. [MULTI_USER] (install-exec-hook): Use it when installing 'crontab'.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am7
1 files changed, 4 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index 1e953c6..96b67c1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -172,12 +172,13 @@ EXTRA_DIST = \
## Installation. ##
## -------------- ##
-#full program prefix
-fpp = $(DESTDIR)$(bindir)/@real_program_prefix@
+# Sed command for Transforming program names.
+transform_exe = s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/
if MULTI_USER
install-exec-hook:
- chmod u+s $(fpp)crontab$(EXEEXT)
+ tcrontab=`echo crontab$(EXEEXT) | sed '$(transform_exe)'`; \
+ chmod u+s $(DESTDIR)$(bindir)/$${tcrontab}
endif
## --------------- ##