From fa5bc4d0b8c68d488c3b288362bbff88ad104db1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sun, 21 Jul 2019 16:09:40 +0200 Subject: Rewrote build and main execution. --- module/main.scm | 17 +++++++++++++---- module/vcomponent/primitive.scm | 3 --- module/vulgar/termios.scm | 2 +- 3 files changed, 14 insertions(+), 8 deletions(-) (limited to 'module') 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))) -- cgit v1.2.3