guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[shepherd] 04/16: build: Capture the source and object directories of Fi


From: Ludovic Courtès
Subject: [shepherd] 04/16: build: Capture the source and object directories of Fibers.
Date: Sun, 27 Mar 2022 17:08:29 -0400 (EDT)

civodul pushed a commit to branch wip-fibers
in repository shepherd.

commit 01742a4967c4a9b63a12faba1432302bd62d1128
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)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]