aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès2020-08-01 12:49:29 +0200
committerLudovic Courtès2020-08-01 17:00:15 +0200
commitd183aa487d99baea3746f79759c17cf36c55dfbf (patch)
treec3cf9577d5f252e0c9f3fb30f780b0b75fb57b0f
parentddb2e47d8ed4d6d6508d342c0718492f99db64d4 (diff)
downloadskribilo-d183aa487d99baea3746f79759c17cf36c55dfbf.tar.gz
skribilo-d183aa487d99baea3746f79759c17cf36c55dfbf.tar.lz
skribilo-d183aa487d99baea3746f79759c17cf36c55dfbf.zip
build: Remove support for Guile 1.8.
* configure.ac: Remove "1.8" from 'GUILE_PKG'. Remove 'HAVE_GUILE2' conditional. Remove checks for (srfi srfi-34), (srfi srfi-35), and (srfi srfi-37). * guilec.am: Inline what was in HAVE_GUILE2 and remove the alternate. * src/guile/skribilo/debug.scm (debug-item): Remove 'cond-expand' and keep only the 'guile-2' variant. * src/guile/skribilo/engine.scm (engine-loaded?): Likewise. * src/guile/skribilo/lib.scm (&invocation-location, define-markup): Likewise. * src/guile/skribilo/utils/syntax.scm (%skribilo-module-reader): Likewise. * web/index.skb: Remove mention of 1.8. * README: Likewise.
-rw-r--r--README2
-rw-r--r--configure.ac18
-rw-r--r--guilec.am11
-rw-r--r--src/guile/Makefile.am7
-rw-r--r--src/guile/skribilo/debug.scm16
-rw-r--r--src/guile/skribilo/engine.scm12
-rw-r--r--src/guile/skribilo/lib.scm92
-rw-r--r--src/guile/skribilo/utils/syntax.scm12
-rw-r--r--web/index.skb6
9 files changed, 54 insertions, 122 deletions
diff --git a/README b/README
index ea62741..d10f636 100644
--- a/README
+++ b/README
@@ -29,7 +29,7 @@ Requirements
You need at least:
- * GNU Guile >= 1.8.3 (2.0.x recommended)
+ * GNU Guile >= 2.0.x
http://www.gnu.org/software/guile/
* Guile-Reader >= 0.6
diff --git a/configure.ac b/configure.ac
index 73cbc21..26b063d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,28 +45,14 @@ AC_PROG_LN_S
AC_PROG_MKDIR_P
# Look for Guile.
-GUILE_PKG([2.2 2.0 1.8])
+GUILE_PKG([2.2 2.0])
GUILE_PROGS
GUILE_SITE_DIR
-AC_PATH_PROGS([GUILD], [guild guile-tools])
-
-# GNU Guile 2.0.x and its compiler.
-AM_CONDITIONAL([HAVE_GUILE2],
- [test "x$GUILD" != "x" && \
- "$GUILD" compile --help >/dev/null 2>&1])
+AC_PATH_PROGS([GUILD], [guild])
# Need Guile-Reader.
GUILE_MODULE_REQUIRED([system reader])
-# SRFI-34 is normally in Guile 1.8, but let's make sure.
-GUILE_MODULE_REQUIRED([srfi srfi-34])
-
-# Need SRFI-35, available in Guile >= 1.8.3.
-GUILE_MODULE_REQUIRED([srfi srfi-35])
-
-# Need SRFI-37, available in Guile >= 1.8.3.
-GUILE_MODULE_REQUIRED([srfi srfi-37])
-
# Make sure we're not using the broken SRFI-35 from Guile-Lib <= 0.1.6.
SKR_GUILE_SRFI_35_WORKS
diff --git a/guilec.am b/guilec.am
index 8fa3daf..3519d61 100644
--- a/guilec.am
+++ b/guilec.am
@@ -1,8 +1,4 @@
-# Compilation with Guile-VM's compiler (aka. Guile 2.x).
-
-if HAVE_GUILE2
-
# XXX: This expression relies on a GNU extension.
GOBJECTS = $(SOURCES:%.scm=%.go)
@@ -48,10 +44,3 @@ SUFFIXES += .go
# for details.
skr_install_go_files = install-nobase_nodist_guileobjectDATA
$(skr_install_go_files): install-nobase_dist_moduleDATA
-
-else !HAVE_GUILE2
-
-nobase_dist_module_DATA = $(SOURCES) $(SOURCES_NOT_COMPILED)
-nobase_nodist_guileobject_DATA =
-
-endif !HAVE_GUILE2
diff --git a/src/guile/Makefile.am b/src/guile/Makefile.am
index 6599581..7001377 100644
--- a/src/guile/Makefile.am
+++ b/src/guile/Makefile.am
@@ -1,5 +1,5 @@
# Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2012,
-# 2015, 2018 Ludovic Courtès <ludo@gnu.org>
+# 2015, 2018, 2020 Ludovic Courtès <ludo@gnu.org>
#
# This file is part of Skribilo.
#
@@ -95,15 +95,10 @@ nobase_nodist_module_DATA = \
skribilo/config.scm \
skribilo/utils/images.scm
-if HAVE_GUILE2
-
nobase_nodist_guileobject_DATA += \
skribilo/config.go \
skribilo/utils/images.go
-endif HAVE_GUILE2
-
-
BUILT_SOURCES = \
skribilo/config.scm \
skribilo/utils/images.scm
diff --git a/src/guile/skribilo/debug.scm b/src/guile/skribilo/debug.scm
index f3da3b9..80ab952 100644
--- a/src/guile/skribilo/debug.scm
+++ b/src/guile/skribilo/debug.scm
@@ -1,6 +1,6 @@
;;; debug.scm -- Debugging facilities. -*- coding: iso-8859-1 -*-
;;;
-;;; Copyright 2005, 2006, 2009, 2012 Ludovic Courts <ludo@gnu.org>
+;;; Copyright 2005, 2006, 2009, 2012, 2020 Ludovic Courts <ludo@gnu.org>
;;; Copyright 2003, 2004 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
;;;
;;; This file is part of Skribilo.
@@ -110,17 +110,9 @@
(for-each (lambda (a) (display a (*debug-port*))) args)
(newline (*debug-port*))))
-(cond-expand
- (guile-2
- (define-syntax-rule (debug-item args ...)
- (if (*debug-item?*)
- (%do-debug-item args ...))))
- (else
- (begin
- ;; Work around Guile 1.8's broken macro support.
- (export %do-debug-item)
- (define-macro (debug-item . args)
- `(if (*debug-item?*) (%do-debug-item ,@args))))))
+(define-syntax-rule (debug-item args ...)
+ (if (*debug-item?*)
+ (%do-debug-item args ...)))
;;;
diff --git a/src/guile/skribilo/engine.scm b/src/guile/skribilo/engine.scm
index b1df2ce..a9e5701 100644
--- a/src/guile/skribilo/engine.scm
+++ b/src/guile/skribilo/engine.scm
@@ -1,7 +1,7 @@
;;; engine.scm -- Skribilo engines.
;;; -*- coding: iso-8859-1 -*-
;;;
-;;; Copyright 2005, 2007, 2008, 2009, 2010, 2018 Ludovic Courts <ludo@gnu.org>
+;;; Copyright 2005, 2007, 2008, 2009, 2010, 2018, 2020 Ludovic Courts <ludo@gnu.org>
;;; Copyright 2003, 2004 Erick Gallesio - I3S-CNRS/ESSI <eg@essi.fr>
;;;
;;;
@@ -278,14 +278,8 @@
(define (engine-loaded? id)
"Check whether engine @var{id} is already loaded."
;; Trick taken from `resolve-module' in `boot-9.scm'.
- (cond-expand (guile-2
- (nested-ref-module (resolve-module '() #f)
- (engine-id->module-name id)))
- (else
- ;; This method works for 1.8 but is deprecated in 1.9/2.0 and
- ;; doesn't work with 1.9.11 anyway.
- (nested-ref the-root-module
- `(%app modules ,@(engine-id->module-name id))))))
+ (nested-ref-module (resolve-module '() #f)
+ (engine-id->module-name id)))
;; A mapping of engine names to hooks.
(define %engine-load-hook (make-hash-table))
diff --git a/src/guile/skribilo/lib.scm b/src/guile/skribilo/lib.scm
index 5543644..ef18bda 100644
--- a/src/guile/skribilo/lib.scm
+++ b/src/guile/skribilo/lib.scm
@@ -1,6 +1,6 @@
;;; lib.scm -- Utilities. -*- coding: iso-8859-1 -*-
;;;
-;;; Copyright 2005, 2007, 2009, 2012, 2013, 2016 Ludovic Courts <ludo@gnu.org>
+;;; Copyright 2005, 2007, 2009, 2012, 2013, 2016, 2020 Ludovic Courts <ludo@gnu.org>
;;; Copyright 2003, 2004 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
;;;
;;;
@@ -109,60 +109,44 @@
;; keyword style, and a couple other differences handled by
;; `dsssl->guile-formals'.
-(cond-expand
- (guile-2
- ;; On Guile 2.0, `define-markup' generates a macro for the markup, such
- ;; that the macro captures its invocation source location using
- ;; `current-source-location'.
-
- (define-syntax-parameter &invocation-location
- (identifier-syntax #f))
-
- (define-syntax define-markup
- (lambda (s)
- (syntax-case s ()
- ;; Note: Use a dotted pair for formals, to allow for dotted forms
- ;; like: `(define-markup (foo x . rest) ...)'.
- ((_ (name . formals) body ...)
- (let ((formals (map (lambda (s)
- (datum->syntax #'formals s))
- (dsssl->guile-formals (syntax->datum #'formals))))
- (internal (symbol-append '% (syntax->datum #'name)
- '-internal)))
- (with-syntax ((internal/loc (datum->syntax #'name internal)))
- #`(begin
- (define* (internal/loc loc #,@formals)
- (syntax-parameterize ((&invocation-location
- (identifier-syntax loc)))
- body ...))
- (define-syntax name
- (lambda (s)
- (syntax-case s ()
- ((_ . args)
- #'(let ((loc (source-properties->location
+;; On Guile 2.0, `define-markup' generates a macro for the markup, such
+;; that the macro captures its invocation source location using
+;; `current-source-location'.
+
+(define-syntax-parameter &invocation-location
+ (identifier-syntax #f))
+
+(define-syntax define-markup
+ (lambda (s)
+ (syntax-case s ()
+ ;; Note: Use a dotted pair for formals, to allow for dotted forms
+ ;; like: `(define-markup (foo x . rest) ...)'.
+ ((_ (name . formals) body ...)
+ (let ((formals (map (lambda (s)
+ (datum->syntax #'formals s))
+ (dsssl->guile-formals (syntax->datum #'formals))))
+ (internal (symbol-append '% (syntax->datum #'name)
+ '-internal)))
+ (with-syntax ((internal/loc (datum->syntax #'name internal)))
+ #`(begin
+ (define* (internal/loc loc #,@formals)
+ (syntax-parameterize ((&invocation-location
+ (identifier-syntax loc)))
+ body ...))
+ (define-syntax name
+ (lambda (s)
+ (syntax-case s ()
+ ((_ . args)
+ #'(let ((loc (source-properties->location
+ (current-source-location))))
+ (internal/loc loc . args)))
+ (_
+ #'(lambda args
+ (let ((loc (source-properties->location
(current-source-location))))
- (internal/loc loc . args)))
- (_
- #'(lambda args
- (let ((loc (source-properties->location
- (current-source-location))))
- (apply internal/loc loc args)))))))
- internal/loc ; mark it as used
- (export name)))))))))
-
- (else ; Guile 1.8
- ;; On Guile 1.8, a markup is a procedure. Its invocation source location
- ;; is captured by walking the stack, which is fragile.
-
- (define-macro (define-markup bindings . body)
- (let ((name (car bindings))
- (opts (cdr bindings)))
- `(define*-public ,(cons name (dsssl->guile-formals opts))
- ;; Memorize the invocation location. Note: the invocation depth
- ;; passed to `invocation-location' was determined experimentally and
- ;; may change as Guile changes (XXX).
- (let ((&invocation-location (invocation-location 3)))
- ,@body))))))
+ (apply internal/loc loc args)))))))
+ internal/loc ; mark it as used
+ (export name))))))))
;;;
diff --git a/src/guile/skribilo/utils/syntax.scm b/src/guile/skribilo/utils/syntax.scm
index c771507..5c606fc 100644
--- a/src/guile/skribilo/utils/syntax.scm
+++ b/src/guile/skribilo/utils/syntax.scm
@@ -1,7 +1,7 @@
;;; syntax.scm -- Syntactic candy for Skribilo modules. -*- coding: utf-8 -*-
;;;
;;; Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011,
-;;; 2012, 2016, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; 2012, 2016, 2018, 2020 Ludovic Courtès <ludo@gnu.org>
;;;
;;;
;;; This file is part of Skribilo.
@@ -56,15 +56,7 @@
"")
(G_ "unexpected character in Skribilo module"))
chr)))
-
- (cond-expand
- (guile-2 '(reader/record-positions))
- (else
- ;; On Guile 1.8, don't record positions by default: this yields a
- ;; nice read performance improvement.
- (if (memq 'positions (debug-options))
- (list 'reader/record-positions)
- '())))))
+ '(reader/record-positions)))
(define-macro (skribilo-module-syntax)
"Install the syntax reader for Skribilo modules."
diff --git a/web/index.skb b/web/index.skb
index ef4cf62..78f1cd8 100644
--- a/web/index.skb
+++ b/web/index.skb
@@ -139,8 +139,8 @@ document generation tasks. Technically, the Skribilo language/API is an
embedded domain-specific language (EDSL), implemented ,(it [via])
so-called ,(ref :url
"http://www.haskell.org/haskellwiki/Embedded_domain_specific_language#Degree_of_embedding"
-:text [“deep embedding”]). Skribilo uses ,(guile [GNU Guile]) 2.2, 2.0,
-or 1.8 as the underlying Scheme implementation.])
+:text [“deep embedding”]). Skribilo uses ,(guile [GNU Guile]) 2.2 or 2.0
+as the underlying Scheme implementation.])
(chapter :title [Features] :number #f :file #f
@@ -181,7 +181,7 @@ General Public Licence]), version 3 or later. To use Skribilo,
you need the following pieces of software:
,(itemize
- (item [,(guile [GNU Guile]) 2.2.*, 2.0.*, or 1.8.3+;])
+ (item [,(guile [GNU Guile]) 2.2.* or 2.0.*;])
(item [,(ref :url "http://www.nongnu.org/guile-reader/"
:text [Guile-Reader]) 0.6 or later;])
(item [either ,(lout [Lout]) (3.31 or later), ,(latex [LaTeX]), or