aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/user/Makefile.am21
-rw-r--r--guile-vm.am20
-rwxr-xr-xsrc/pre-inst-skribilo.in5
-rwxr-xr-xsrc/skribilo.in7
-rw-r--r--tests/Makefile.am4
5 files changed, 41 insertions, 16 deletions
diff --git a/doc/user/Makefile.am b/doc/user/Makefile.am
index 8039480..fb5cd4a 100644
--- a/doc/user/Makefile.am
+++ b/doc/user/Makefile.am
@@ -51,14 +51,19 @@ endif
load_path = $(top_srcdir)/doc/modules
+load_compiled_path = $(top_builddir)/doc/modules
skribilo.info: user.skb
- GUILE_LOAD_PATH=$(load_path):$$GUILE_LOAD_PATH \
+ GUILE_LOAD_PATH=$(load_path):$$GUILE_LOAD_PATH \
+ GUILE_LOAD_COMPILED_PATH=$(load_compiled_path):$$GUILE_LOAD_COMPILED_PATH \
+ GUILE_AUTO_COMPILE=0 \
$(skribilo) $(skrflags) --target=info -o $@ $<
.skb.html:
- GUILE_LOAD_PATH=$(load_path):$$GUILE_LOAD_PATH \
+ GUILE_LOAD_PATH=$(load_path):$$GUILE_LOAD_PATH \
+ GUILE_LOAD_COMPILED_PATH=$(load_compiled_path):$$GUILE_LOAD_COMPILED_PATH \
+ GUILE_AUTO_COMPILE=0 \
$(skribilo) $(skrflags) --target=html -o $@ $<
if HAVE_LOUT
@@ -93,15 +98,21 @@ if HAVE_PS2PDF
endif
.skb.lout:
- GUILE_LOAD_PATH=$(load_path):$$GUILE_LOAD_PATH \
+ GUILE_LOAD_PATH=$(load_path):$$GUILE_LOAD_PATH \
+ GUILE_LOAD_COMPILED_PATH=$(load_compiled_path):$$GUILE_LOAD_COMPILED_PATH \
+ GUILE_AUTO_COMPILE=0 \
$(skribilo) $(skrflags) --target=lout -o $@ $<
.skb.tex:
- GUILE_LOAD_PATH=$(load_path):$$GUILE_LOAD_PATH \
+ GUILE_LOAD_PATH=$(load_path):$$GUILE_LOAD_PATH \
+ GUILE_LOAD_COMPILED_PATH=$(load_compiled_path):$$GUILE_LOAD_COMPILED_PATH \
+ GUILE_AUTO_COMPILE=0 \
$(skribilo) $(skrflags) --target=latex -o $@ $<
.skb.ctx:
- GUILE_LOAD_PATH=$(load_path):$$GUILE_LOAD_PATH \
+ GUILE_LOAD_PATH=$(load_path):$$GUILE_LOAD_PATH \
+ GUILE_LOAD_COMPILED_PATH=$(load_compiled_path):$$GUILE_LOAD_COMPILED_PATH \
+ GUILE_AUTO_COMPILE=0 \
$(skribilo) $(skrflags) --target=context -o $@ $<
diff --git a/guile-vm.am b/guile-vm.am
index 14b146f..627e5a0 100644
--- a/guile-vm.am
+++ b/guile-vm.am
@@ -1,3 +1,4 @@
+
# Compilation with Guile-VM's compiler (aka. Guile 2.x).
if ENABLE_GUILE_VM
@@ -8,15 +9,20 @@ GOBJECTS = $(SOURCES:%.scm=%.go)
nobase_nodist_module_DATA = \
$(SOURCES) $(GOBJECTS) $(SOURCES_NOT_COMPILED)
+# Compiler warnings.
+guile_warnings = unused-variable unbound-variable arity-mismatch
+
.scm.go:
$(MKDIR_P) `dirname $@`
- $(GUILE) -L $(srcdir) \
- -c "(use-modules (system base compile) \
- (skribilo condition)) \
- (read-set! keywords 'prefix) \
- (call-with-skribilo-error-catch/exit \
- (lambda () \
- (compile-file \"$<\" \"$@\")))"
+ GUILE_AUTO_COMPILE=0 \
+ GUILE_LOAD_COMPILED_PATH="$(builddir):$(top_builddir)/src/guile:$$GUILE_LOAD_COMPILED_PATH" \
+ $(GUILE) --debug -L "$(srcdir)" -L "$(top_srcdir)/src/guile" \
+ -c "(use-modules (system base compile) \
+ (skribilo condition)) \
+ (call-with-skribilo-error-catch/exit \
+ (lambda () \
+ (compile-file \"$<\" #:output-file \"$@\" \
+ #:opts '(#:warnings ($(guile_warnings))))))"
CLEANFILES += $(GOBJECTS)
diff --git a/src/pre-inst-skribilo.in b/src/pre-inst-skribilo.in
index 3a5c0d8..eb93e8e 100755
--- a/src/pre-inst-skribilo.in
+++ b/src/pre-inst-skribilo.in
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2007 Ludovic Courtès <ludo@gnu.org>
+# Copyright 2007, 2009 Ludovic Courtès <ludo@gnu.org>
#
#
# This program is free software; you can redistribute it and/or modify
@@ -21,6 +21,9 @@
# A pre-installation `skribilo' executable that makes sure to load
# stuff from the source directory rather than the installation directory.
+GUILE_LOAD_COMPILED_PATH="@abs_top_builddir@/src/guile:$GUILE_LOAD_COMPILED_PATH"
+export GUILE_LOAD_COMPILED_PATH
+
main='(module-ref (resolve-interface '\''(skribilo)) '\'skribilo')'
exec ${GUILE-@GUILE@} -L "@abs_top_srcdir@/src/guile" \
-L "@abs_top_builddir@/src/guile" \
diff --git a/src/skribilo.in b/src/skribilo.in
index 95d75b7..f5d3d75 100755
--- a/src/skribilo.in
+++ b/src/skribilo.in
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2005, 2006, 2007, 2008 Ludovic Courtès <ludo@gnu.org>
+# Copyright 2005, 2006, 2007, 2008, 2009 Ludovic Courtès <ludo@gnu.org>
#
#
# This program is free software; you can redistribute it and/or modify
@@ -20,10 +20,13 @@
# The `skribilo' executable.
-# Don't pass `--debug' by default (for performance reason). When
+# Don't pass `--debug' by default (for performance reasons). When
# needed, the use should explicitly set the `GUILE' environment
# variable to, e.g., "guile --debug".
+GUILE_LOAD_COMPILED_PATH="@guilemoduledir@:$GUILE_LOAD_COMPILED_PATH"
+export GUILE_LOAD_COMPILED_PATH
+
main='(module-ref (resolve-interface '\''(skribilo)) '\'skribilo')'
exec ${GUILE-@GUILE@} -L "@guilemoduledir@" -c "
diff --git a/tests/Makefile.am b/tests/Makefile.am
index bd4349f..280875a 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,4 +1,6 @@
-TESTS_ENVIRONMENT = \
+TESTS_ENVIRONMENT = \
+ GUILE_AUTO_COMPILE=0 \
+ GUILE_LOAD_COMPILED_PATH="$(top_builddir)/src/guile:$$GUILE_LOAD_COMPILED_PATH" \
$(GUILE) -L $(top_srcdir)/src/guile -L $(top_builddir)/src/guile
TESTS = ast.test readers/rss-2.test resolve.test