AboutSummaryRefsLogTreeCommitDiffStats
diff options
context:
space:
mode:
authorulfvonbelow <striness@tilde.club>2023-02-02 19:29:50 +0000
committerDale Mellor <mcron-lsfnyl@rdmp.org>2023-03-18 14:00:26 +0000
commitec6a023c6634777da138f6237aab98b2f40ed4c2 (patch)
treee06d7d610b91cca156e5cc71038bd2e45908be5e
parent48b8d47ca245a7837af593f14e688ee04720f68a (diff)
downloadmcron-ec6a023c6634777da138f6237aab98b2f40ed4c2.tar.gz
mcron-ec6a023c6634777da138f6237aab98b2f40ed4c2.tar.bz2
mcron-ec6a023c6634777da138f6237aab98b2f40ed4c2.zip
config.scm.in: rename to config.scm.in.in, substitute from Makefile.
* src/mcron/config.scm.in: renamed to config.scm.in.in. (config-sbin-dir): new variable. * Makefile.am: substitute in config.scm.in.
-rwxr-xr-xMakefile.am15
-rw-r--r--configure.ac2
-rw-r--r--src/mcron/config.scm.in.in (renamed from src/mcron/config.scm.in)1
3 files changed, 11 insertions, 7 deletions
diff --git a/Makefile.am b/Makefile.am
index a9ef5a9..4afd7f3 100755
--- a/Makefile.am
+++ b/Makefile.am
@@ -100,10 +100,7 @@ DISTCLEANFILES = src/mcron/config.scm
--warn=format --warn=unbound-variable --warn=arity-mismatch \
--target="$(host)" --output="$@" "$<" $(devnull_verbose)
-
-bin/% : src/%.in Makefile
- $(AM_V_GEN)$(MKDIR_P) bin ; \
- sed -e 's,%PREFIX%,${prefix},g' \
+do_subst = sed -e 's,%PREFIX%,${prefix},g' \
-e 's,%modsrcdir%,${guilesitedir},g' \
-e 's,%modbuilddir%,${guilesitegodir},g' \
-e 's,%localstatedir%,${localstatedir},g' \
@@ -114,8 +111,14 @@ bin/% : src/%.in Makefile
-e 's,%PACKAGE_BUGREPORT%,@PACKAGE_BUGREPORT@,g' \
-e 's,%PACKAGE_NAME%,@PACKAGE_NAME@,g' \
-e 's,%PACKAGE_URL%,@PACKAGE_URL@,g' \
- -e 's,%GUILE%,$(GUILE),g' \
- $< > $@ ; \
+ -e 's,%GUILE%,$(GUILE),g'
+
+src/mcron/config.scm: src/mcron/config.scm.in Makefile
+ $(AM_V_GEN)$(do_subst) $< > $@
+
+bin/% : src/%.in Makefile
+ $(AM_V_GEN)$(MKDIR_P) bin ; \
+ $(do_subst) $< > $@ ; \
chmod a+x $@
diff --git a/configure.ac b/configure.ac
index 451777d..7ea532f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -127,5 +127,5 @@ AC_CONFIG_FILES([pre-inst-env:build-aux/pre-inst-env.in],
[chmod +x pre-inst-env])
AC_CONFIG_FILES([doc/config.texi
Makefile
- src/mcron/config.scm])
+ src/mcron/config.scm.in])
AC_OUTPUT
diff --git a/src/mcron/config.scm.in b/src/mcron/config.scm.in.in
index e6a0e07..769a913 100644
--- a/src/mcron/config.scm.in
+++ b/src/mcron/config.scm.in.in
@@ -26,6 +26,7 @@
(define-public config-package-url "@PACKAGE_URL@")
(define-public config-sendmail "@SENDMAIL@")
+(define-public config-sbin-dir "%sbindir%")
(define-public config-spool-dir "@CONFIG_SPOOL_DIR@")
(define-public config-socket-file "@CONFIG_SOCKET_FILE@")
(define-public config-allow-file "@CONFIG_ALLOW_FILE@")