From 489a7bdd7368be492993f83113ef65c5b372bd0e Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Mon, 23 Jul 2001 22:13:30 +0000 Subject: [PATCH] * Makefile.am (psyntax.pp): Enable rule for psyntax.pp only in maintainer mode. Use compile-psyntax.scm for actual compilation. Make sure the uninstalled guile is used. (EXTRA_DIST): Distribute compile-psyntax.scm * compile-psyntax.scm: New file. * syncase.scm (psyncomp): Removed, it is now in compile-psyntax.scm. --- ice-9/Makefile.am | 4 +++- ice-9/syncase.scm | 16 ---------------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/ice-9/Makefile.am b/ice-9/Makefile.am index 597fa7700..736d253f6 100644 --- a/ice-9/Makefile.am +++ b/ice-9/Makefile.am @@ -45,5 +45,7 @@ install-data-local: ## test.scm is not currently installed. EXTRA_DIST = $(ice9_sources) test.scm and-let-star-compat.scm +if MAINTAINER_MODE psyntax.pp: psyntax.ss - cd $(srcdir) && guile -c '(load-from-path "ice-9/syncase") (define-module (ice-9 syncase)) (psyncomp)' + GUILE_LOAD_PATH=$(srcdir)/..:.. ../libguile/guile -s compile-psyntax.scm $(srcdir)/psyntax.ss $(srcdir)/psyntax.pp +endif diff --git a/ice-9/syncase.scm b/ice-9/syncase.scm index f7aca4c43..948e11b86 100644 --- a/ice-9/syncase.scm +++ b/ice-9/syncase.scm @@ -139,22 +139,6 @@ (define generated-symbols (make-weak-key-hash-table 1019)) -;;; Utilities - -(define (psyncomp) - (system "mv -f psyntax.pp psyntax.pp~") - (let ((in (open-input-file "psyntax.ss")) - (out (open-output-file "psyntax.pp"))) - (let loop ((x (read in))) - (if (eof-object? x) - (begin - (close-port out) - (close-port in)) - (begin - (write (sc-expand3 x 'c '(compile load eval)) out) - (newline out) - (loop (read in))))))) - ;;; Load the preprocessed code (let ((old-debug #f)