From 196a4f8ac0f12d9193d14d9d9fa9ced8f9420b9c Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 14 May 2012 23:45:38 +0200 Subject: Mention "Guile 2.0" instead of "Guile-VM". * configure.ac: Remove `--enable-guile-vm' option. Check for `guild' and `guile-tools', defining `GUILD'. Rename `ENABLE_GUILE_VM' to `HAVE_GUILE2'. * guile-vm.am: Rename to... * guilec.am: ... this. * doc/modules/Makefile.am, src/guile/Makefile.am: Update accordingly. --- NEWS | 6 +----- configure.ac | 14 +++++--------- doc/modules/Makefile.am | 2 +- guile-vm.am | 48 ------------------------------------------------ guilec.am | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ src/guile/Makefile.am | 6 +++--- 6 files changed, 58 insertions(+), 66 deletions(-) delete mode 100644 guile-vm.am create mode 100644 guilec.am diff --git a/NEWS b/NEWS index 6304a0d..9232042 100644 --- a/NEWS +++ b/NEWS @@ -26,11 +26,7 @@ are not output in a separate file. ** HTML engine: the `charset' custom changes the output encoding ** Lout/LaTeX engine: new `encoding' custom ** Improved rendering of pie charts with Ploticus -** New experimental `--enable-guile-vm' configure switch - -This allows compilation with the compiler of "Guile-VM", i.e., the -future Guile 2.x. - +** On Guile 2.0, modules are compiled and `.go' files are installed ** New test suite (run "make check") ** Various documentation fixes, improvements and additions diff --git a/configure.ac b/configure.ac index 4fe1cee..0585bb0 100644 --- a/configure.ac +++ b/configure.ac @@ -10,11 +10,6 @@ AM_INIT_AUTOMAKE([gnu no-define check-news readme-alpha]) AC_CONFIG_SRCDIR([src/guile/skribilo/reader.scm]) -# Options. -AC_ARG_ENABLE([guile-vm], - [AS_HELP_STRING([--enable-guile-vm], - [compile source files for use with Guile-VM (aka. Guile 2.x)])]) - # GNU Gettext. AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT_VERSION([0.16.1]) @@ -32,11 +27,12 @@ AC_ARG_WITH([guilemoduledir], # Look for Guile. GUILE_PROGS GUILE_SITE_DIR +AC_PATH_PROGS([GUILD], [guild guile-tools]) -# Guile-VM's compiler (aka. Guile 2.0.x). -AM_CONDITIONAL([ENABLE_GUILE_VM], - [test "x$enable_guile_vm" = "xyes" && \ - $GUILE_TOOLS compile --help 2>&1 >/dev/null]) +# GNU Guile 2.0.x and its compiler. +AM_CONDITIONAL([HAVE_GUILE2], + [test "x$GUILD" != "x" && \ + "$GUILD" compile --help 2>&1 >/dev/null]) # Need Guile-Reader. GUILE_MODULE_REQUIRED([system reader]) diff --git a/doc/modules/Makefile.am b/doc/modules/Makefile.am index ca3459f..beccfd7 100644 --- a/doc/modules/Makefile.am +++ b/doc/modules/Makefile.am @@ -13,4 +13,4 @@ CLEANFILES = SUFFIXES = -include $(top_srcdir)/guile-vm.am +include $(top_srcdir)/guilec.am diff --git a/guile-vm.am b/guile-vm.am deleted file mode 100644 index c64eda9..0000000 --- a/guile-vm.am +++ /dev/null @@ -1,48 +0,0 @@ - -# Compilation with Guile-VM's compiler (aka. Guile 2.x). - -if ENABLE_GUILE_VM - -# XXX: This expression relies on a GNU extension. -GOBJECTS = $(SOURCES:%.scm=%.go) - -nobase_dist_module_DATA = $(SOURCES) $(SOURCES_NOT_COMPILED) -nobase_nodist_module_DATA = $(GOBJECTS) - -# Compiler warnings. -guile_warnings = \ - unused-variable unused-toplevel unbound-variable arity-mismatch \ - format - -.scm.go: - $(MKDIR_P) `dirname $@` - GUILE_AUTO_COMPILE=0 \ - GUILE_LOAD_COMPILED_PATH="$(builddir):$(top_builddir)/src/guile:$$GUILE_LOAD_COMPILED_PATH" \ - $(GUILE) -L "$(srcdir)" -L "$(top_srcdir)/src/guile" \ - -c "(use-modules (system base compile) \ - (system base message) \ - (skribilo condition)) \ - (with-fluids ((*current-warning-prefix* \"\")) \ - (call-with-skribilo-error-catch/exit \ - (lambda () \ - (compile-file \"$<\" #:output-file \"$@\" \ - #:opts '(#:warnings ($(guile_warnings)))))))" - -CLEANFILES += $(GOBJECTS) - -SUFFIXES += .go - -# Make sure source files are installed first, so that the mtime of -# installed compiled files is greater than that of installed source -# files. See -# -# for details. -skr_install_go_files = install-nobase_nodist_moduleDATA -$(skr_install_go_files): install-nobase_dist_moduleDATA - -else !ENABLE_GUILE_VM - -nobase_dist_module_DATA = $(SOURCES) $(SOURCES_NOT_COMPILED) -nobase_nodist_module_DATA = - -endif !ENABLE_GUILE_VM diff --git a/guilec.am b/guilec.am new file mode 100644 index 0000000..2eb5804 --- /dev/null +++ b/guilec.am @@ -0,0 +1,48 @@ + +# 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) + +nobase_dist_module_DATA = $(SOURCES) $(SOURCES_NOT_COMPILED) +nobase_nodist_module_DATA = $(GOBJECTS) + +# Compiler warnings. +guile_warnings = \ + unused-variable unused-toplevel unbound-variable arity-mismatch \ + format + +.scm.go: + $(MKDIR_P) `dirname $@` + GUILE_AUTO_COMPILE=0 \ + GUILE_LOAD_COMPILED_PATH="$(builddir):$(top_builddir)/src/guile:$$GUILE_LOAD_COMPILED_PATH" \ + $(GUILE) -L "$(srcdir)" -L "$(top_srcdir)/src/guile" \ + -c "(use-modules (system base compile) \ + (system base message) \ + (skribilo condition)) \ + (with-fluids ((*current-warning-prefix* \"\")) \ + (call-with-skribilo-error-catch/exit \ + (lambda () \ + (compile-file \"$<\" #:output-file \"$@\" \ + #:opts '(#:warnings ($(guile_warnings)))))))" + +CLEANFILES += $(GOBJECTS) + +SUFFIXES += .go + +# Make sure source files are installed first, so that the mtime of +# installed compiled files is greater than that of installed source +# files. See +# +# for details. +skr_install_go_files = install-nobase_nodist_moduleDATA +$(skr_install_go_files): install-nobase_dist_moduleDATA + +else !HAVE_GUILE2 + +nobase_dist_module_DATA = $(SOURCES) $(SOURCES_NOT_COMPILED) +nobase_nodist_module_DATA = + +endif !HAVE_GUILE2 diff --git a/src/guile/Makefile.am b/src/guile/Makefile.am index 9c2c706..c853b50 100644 --- a/src/guile/Makefile.am +++ b/src/guile/Makefile.am @@ -77,20 +77,20 @@ SOURCES += \ CLEANFILES = $(nobase_nodist_module_DATA) include $(top_srcdir)/substitute.am -include $(top_srcdir)/guile-vm.am +include $(top_srcdir)/guilec.am # Generated files not part of the distribution. nobase_nodist_module_DATA += \ skribilo/config.scm \ skribilo/utils/images.scm -if ENABLE_GUILE_VM +if HAVE_GUILE2 nobase_nodist_module_DATA += \ skribilo/config.go \ skribilo/utils/images.go -endif ENABLE_GUILE_VM +endif HAVE_GUILE2 BUILT_SOURCES = \ -- cgit v1.2.3