aboutsummaryrefslogtreecommitdiff
path: root/module
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@hornquist.se>2019-07-21 16:09:40 +0200
committerHugo Hörnquist <hugo@hornquist.se>2019-07-21 16:11:16 +0200
commitfa5bc4d0b8c68d488c3b288362bbff88ad104db1 (patch)
tree55fb779b3b880468e1bd442e674f0485947f0c8e /module
parentReword terminal output to better modularization. (diff)
downloadcalp-fa5bc4d0b8c68d488c3b288362bbff88ad104db1.tar.gz
calp-fa5bc4d0b8c68d488c3b288362bbff88ad104db1.tar.xz
Rewrote build and main execution.
Diffstat (limited to 'module')
-rwxr-xr-xmodule/main.scm17
-rw-r--r--module/vcomponent/primitive.scm3
-rw-r--r--module/vulgar/termios.scm2
3 files changed, 14 insertions, 8 deletions
diff --git a/module/main.scm b/module/main.scm
index 6fb878a0..c991f78b 100755
--- a/module/main.scm
+++ b/module/main.scm
@@ -1,8 +1,17 @@
-#!/usr/bin/guile \
--e main -s
-!#
+#!/bin/bash
+# -*- mode: scheme -*-
+
+root=$(dirname $(dirname $(realpath $0)))
+
+GUILE_LOAD_PATH="$root/module:$GUILE_LOAD_PATH"
+GUILE_LOAD_COMPILED_PATH="root/obj/module:$GUILE_LOAD_COMPILED_PATH"
+LD_LIBRARY_PATH="$root/lib:$LD_LIBRARY_PATH"
-(add-to-load-path (dirname (current-filename)))
+export GUILE_LOAD_PATH GUILE_LOAD_COMPILED_PATH LD_LIBRARY_PATH
+export GUILE_AUTO_COMPILE=0
+
+exec guile -e main -s $0 "$@"
+!#
(use-modules (srfi srfi-1)
(srfi srfi-19)
diff --git a/module/vcomponent/primitive.scm b/module/vcomponent/primitive.scm
index b583d454..ad33a3be 100644
--- a/module/vcomponent/primitive.scm
+++ b/module/vcomponent/primitive.scm
@@ -16,7 +16,4 @@
%vcomponent-shallow-copy))
-(setenv "LD_LIBRARY_PATH"
- (string-append (dirname (dirname (dirname (current-filename))))
- "/lib"))
(load-extension "libguile-calendar" "init_lib")
diff --git a/module/vulgar/termios.scm b/module/vulgar/termios.scm
index aa40b6e7..6bebda2a 100644
--- a/module/vulgar/termios.scm
+++ b/module/vulgar/termios.scm
@@ -36,7 +36,7 @@
;; int, * → int, and bind it to a scheme procedure of the same name.
;;
;; Currently only links to the library stored in the variable lib, when called.
-(eval-when (compile)
+(eval-when (compile expand)
(read-hash-extend
#\$ (lambda (c port)
(let* ((name (string-trim-both (read-delimited ":" port)))