* [PATCH] dmd: Find the system dmdconf.scm in the configured sysconfdir
@ 2014-07-09 2:05 David Michael
2014-07-09 12:39 ` Ludovic Courtès
0 siblings, 1 reply; 2+ messages in thread
From: David Michael @ 2014-07-09 2:05 UTC (permalink / raw)
To: guix-devel
* Makefile.am (instantiate): Substitute the sysconfdir value.
* modules/dmd/config.scm.in (%sysconfdir): New variable.
* modules/dmd/support.scm (default-config-file): Use %sysconfdir in
place of prefix+"/etc".
---
Hi,
As is, using "./configure --prefix=/usr --sysconfdir=/etc" will try to
read /usr/etc/dmdconf.scm by default. Can it be adjusted to read
dmdconf.scm from the configured sysconfdir?
Thanks.
David
Makefile.am | 1 +
modules/dmd/config.scm.in | 2 ++
modules/dmd/support.scm | 2 +-
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 5e6ff05..3329382 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -86,6 +86,7 @@ instantiate = \
-e 's,%modsrcdir%,${abs_top_srcdir}/modules,g' \
-e 's,%modbuilddir%,${abs_top_builddir}/modules,g' \
-e 's,%localstatedir%,${localstatedir},g' \
+ -e 's,%sysconfdir%,${sysconfdir},g' \
-e 's,%VERSION%,@VERSION@,g' \
-e 's,%PACKAGE_BUGREPORT%,@PACKAGE_BUGREPORT@,g' \
-e 's,%PACKAGE_NAME%,@PACKAGE_NAME@,g' \
diff --git a/modules/dmd/config.scm.in b/modules/dmd/config.scm.in
index dd2db9b..0ee9340 100644
--- a/modules/dmd/config.scm.in
+++ b/modules/dmd/config.scm.in
@@ -4,6 +4,7 @@
#:export (Version
Prefix-dir
%localstatedir
+ %sysconfdir
copyright
bug-address
package-name
@@ -12,6 +13,7 @@
(define Version "%VERSION%")
(define Prefix-dir "%PREFIX%")
(define %localstatedir "%localstatedir%")
+(define %sysconfdir "%sysconfdir%")
(define copyright "Copyright (C) 2002, 2003 Wolfgang Jährling")
(define bug-address "%PACKAGE_BUGREPORT%")
diff --git a/modules/dmd/support.scm b/modules/dmd/support.scm
index 8ca1597..7eacc70 100644
--- a/modules/dmd/support.scm
+++ b/modules/dmd/support.scm
@@ -217,7 +217,7 @@ TARGET should be a string representing a filepath + name."
global system configuration file when running as 'root'. As a side effect,
create a template configuration file if non exists."
(if (zero? (getuid))
- (string-append Prefix-dir "/etc/dmdconf.scm")
+ (string-append %sysconfdir "/dmdconf.scm")
(let ((config-file (string-append user-dmddir "/init.scm")))
(catch-system-error (mkdir user-dmddir))
(if (not (file-exists? config-file))
--
1.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-07-09 12:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-09 2:05 [PATCH] dmd: Find the system dmdconf.scm in the configured sysconfdir David Michael
2014-07-09 12:39 ` Ludovic Courtès
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).