[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[shepherd] 04/24: build: Capture the source and object directories of Fi
From: |
Ludovic Courtès |
Subject: |
[shepherd] 04/24: build: Capture the source and object directories of Fibers. |
Date: |
Mon, 28 Mar 2022 17:24:45 -0400 (EDT) |
civodul pushed a commit to branch wip-fibers
in repository shepherd.
commit 5090ee5b9b78ea8a0f39b51c3057afad54faa2aa
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Mon Mar 21 21:59:22 2022 +0100
build: Capture the source and object directories of Fibers.
* configure.ac: Substitute 'FIBERS_SOURCE_DIRECTORY' and
'FIBERS_OBJECT_DIRECTORY'.
* Makefile.am (instantiate): Likewise.
* herd.in: Add FIBERS_SOURCE_DIRECTORY to %LOAD-PATH and add
FIBERS_OBJECT_DIRECTORY to %LOAD-COMPILED-PATH.
* shepherd.in: Likewise.
---
Makefile.am | 4 +++-
configure.ac | 8 ++++++++
herd.in | 8 ++++++--
shepherd.in | 8 ++++++--
4 files changed, 23 insertions(+), 5 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 774ebba..408c68e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
# Makefile.am -- How to build and install the Shepherd.
# Copyright © 2002, 2003 Wolfgang Jährling <wolfgang@pro-linux.de>
-# Copyright © 2013, 2014, 2015, 2016, 2018, 2019, 2020 Ludovic Courtès
<ludo@gnu.org>
+# Copyright © 2013-2016, 2018-2020, 2022 Ludovic Courtès <ludo@gnu.org>
# Copyright © 2018 Carlo Zancanaro <carlo@zancanaro.id.au>
#
# This file is part of the GNU Shepherd.
@@ -174,6 +174,8 @@ instantiate =
\
-e 's,%PACKAGE_BUGREPORT%,@PACKAGE_BUGREPORT@,g' \
-e 's,%PACKAGE_NAME%,@PACKAGE_NAME@,g' \
-e 's,%PACKAGE_URL%,@PACKAGE_URL@,g' \
+ -e 's,%FIBERS_SOURCE_DIRECTORY%,@FIBERS_SOURCE_DIRECTORY@,g' \
+ -e 's,%FIBERS_OBJECT_DIRECTORY%,@FIBERS_OBJECT_DIRECTORY@,g' \
-e 's,%GUILE%,$(GUILE),g'
# Instantiate templates.
diff --git a/configure.ac b/configure.ac
index f98dbb4..1b9676c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -58,6 +58,14 @@ if test "x$ac_cv_fibers_creates_pthreads" = "xyes"; then
AC_MSG_ERROR([Fibers creates POSIX threads behind our back; aborting.])
fi
+dnl Capture the location of Fibers' modules.
+FIBERS_SOURCE_DIRECTORY="`\
+ "$GUILE" -c '(display (dirname (search-path %load-path "fibers.scm")))'`"
+FIBERS_OBJECT_DIRECTORY="`\
+ "$GUILE" -c '(display (dirname (search-path %load-compiled-path
"fibers.go")))'`"
+AC_SUBST([FIBERS_SOURCE_DIRECTORY])
+AC_SUBST([FIBERS_OBJECT_DIRECTORY])
+
dnl
dnl Low-level operating system interface.
dnl
diff --git a/herd.in b/herd.in
index d190390..a1d27b8 100644
--- a/herd.in
+++ b/herd.in
@@ -2,6 +2,10 @@
-*- scheme -*-
!#
-(set! %load-path (cons "%modsrcdir%" %load-path))
-(set! %load-compiled-path (cons "%modbuilddir%" %load-compiled-path))
+(set! %load-path
+ (append '("%modsrcdir%" "%FIBERS_SOURCE_DIRECTORY%") %load-path))
+(set! %load-compiled-path
+ (append '("%modbuilddir%" "%FIBERS_OBJECT_DIRECTORY%")
+ %load-compiled-path))
+
(apply (@ (shepherd scripts herd) main) (cdr (command-line)))
diff --git a/shepherd.in b/shepherd.in
index e47d9fd..1cccf6e 100644
--- a/shepherd.in
+++ b/shepherd.in
@@ -2,6 +2,10 @@
-*- scheme -*-
!#
-(set! %load-path (cons "%modsrcdir%" %load-path))
-(set! %load-compiled-path (cons "%modbuilddir%" %load-compiled-path))
+(set! %load-path
+ (append '("%modsrcdir%" "%FIBERS_SOURCE_DIRECTORY%") %load-path))
+(set! %load-compiled-path
+ (append '("%modbuilddir%" "%FIBERS_OBJECT_DIRECTORY%")
+ %load-compiled-path))
+
(apply (@ (shepherd) main) (cdr (command-line)))
- [shepherd] 17/24: service: Add 'start-in-the-background'., (continued)
- [shepherd] 17/24: service: Add 'start-in-the-background'., Ludovic Courtès, 2022/03/28
- [shepherd] 14/24: service: Add inetd constructor and destructor., Ludovic Courtès, 2022/03/28
- [shepherd] 15/24: service: Allow 'running' value to be a thunk., Ludovic Courtès, 2022/03/28
- [shepherd] 20/24: service: Add #:handle-termination slot., Ludovic Courtès, 2022/03/28
- [shepherd] 22/24: service: 'make-inetd-constructor' lets the caller specify socket ownership., Ludovic Courtès, 2022/03/28
- [shepherd] 06/24: service: 'read-pid-file' no longer blocks., Ludovic Courtès, 2022/03/28
- [shepherd] 09/24: service: 'make-forkexec-constructor' spawns a logging fiber., Ludovic Courtès, 2022/03/28
- [shepherd] 16/24: service: Add systemd constructor and destructor., Ludovic Courtès, 2022/03/28
- [shepherd] 11/24: support: 'l10n' accepts plural forms., Ludovic Courtès, 2022/03/28
- [shepherd] 01/24: shepherd: Factorize out the main loop., Ludovic Courtès, 2022/03/28
- [shepherd] 04/24: build: Capture the source and object directories of Fibers.,
Ludovic Courtès <=
- [shepherd] 07/24: service: 'read-pid-file' uses (@ (guile) sleep) when it's not suspendable., Ludovic Courtès, 2022/03/28
- [shepherd] 21/24: service: Add #:max-connections to 'make-inetd-constructor'., Ludovic Courtès, 2022/03/28
- [shepherd] 23/24: shepherd: Do not change to the client directory when executing a command., Ludovic Courtès, 2022/03/28
- [shepherd] 24/24: shepherd: Gracefully handle failure to open the socket., Ludovic Courtès, 2022/03/28