From b8b065987961063e09d476234ffcbe8728cf2715 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Mon, 30 May 2011 23:02:03 +0200 Subject: [PATCH] rename `guile-tools' to `guild' * configure.ac: Look for ln -s. Write out `guild' instead of `guile-tools'. * meta/Makefile.am (install-data-hook): Link the installed `guild' to the backward-compatible `guile-tools' name. (bin_SCRIPTS, EXTRA_DIST): Fix up for guild change. * meta/guild.in: Moved here from `guile-tools.in'. * doc/ref/Makefile.am (autoconf-macros.texi): * doc/ref/api-evaluation.texi (Compilation): * doc/ref/autoconf.texi (Autofrisk, Using Autofrisk): * doc/ref/mod-getopt-long.texi (getopt-long Reference): * doc/ref/tools.texi (Miscellaneous Tools, Executable Modules): Minimal doc update. * .gitignore: * am/guilec (.scm.go): * libguile/Makefile.am (snarf2checkedtexi): * module/Makefile.am (ice-9/psyntax-pp.go): Update makefiles, etc. * module/scripts/README: * module/scripts/lint.scm: * module/scripts/list.scm: Update commentaries. --- .gitignore | 2 +- am/guilec | 2 +- configure.ac | 3 ++- doc/ref/Makefile.am | 2 +- doc/ref/api-evaluation.texi | 8 ++++---- doc/ref/autoconf.texi | 11 ++++++----- doc/ref/mod-getopt-long.texi | 4 ++-- doc/ref/tools.texi | 27 ++++++++++++++------------- libguile/Makefile.am | 2 +- meta/Makefile.am | 11 ++++++++--- meta/{guile-tools.in => guild.in} | 18 +++++++++--------- module/Makefile.am | 2 +- module/scripts/README | 6 +++--- module/scripts/lint.scm | 4 ++-- module/scripts/list.scm | 4 ++-- 15 files changed, 57 insertions(+), 49 deletions(-) rename meta/{guile-tools.in => guild.in} (86%) diff --git a/.gitignore b/.gitignore index a0eeeca76..928db2060 100644 --- a/.gitignore +++ b/.gitignore @@ -120,7 +120,7 @@ INSTALL /GRTAGS /GSYMS /GTAGS -/meta/guile-tools +/meta/guild /meta/guile-config /lib/locale.h /module/ice-9/eval.go.stamp diff --git a/am/guilec b/am/guilec index a34683266..7f4e85d0a 100644 --- a/am/guilec +++ b/am/guilec @@ -28,4 +28,4 @@ SUFFIXES = .scm .go .scm.go: $(AM_V_GUILEC)GUILE_AUTO_COMPILE=0 \ $(top_builddir)/meta/uninstalled-env \ - guile-tools compile $(GUILE_WARNINGS) -o "$@" "$<" + guild compile $(GUILE_WARNINGS) -o "$@" "$<" diff --git a/configure.ac b/configure.ac index 146b77b00..3f820bfc1 100644 --- a/configure.ac +++ b/configure.ac @@ -62,6 +62,7 @@ gl_EARLY AC_PROG_CPP AC_PROG_SED AC_PROG_AWK +AC_PROG_LN_S dnl Gnulib. gl_INIT @@ -1724,7 +1725,7 @@ GUILE_CONFIG_SCRIPT([benchmark-guile]) GUILE_CONFIG_SCRIPT([meta/guile]) GUILE_CONFIG_SCRIPT([meta/uninstalled-env]) GUILE_CONFIG_SCRIPT([meta/gdb-uninstalled-guile]) -GUILE_CONFIG_SCRIPT([meta/guile-tools]) +GUILE_CONFIG_SCRIPT([meta/guild]) GUILE_CONFIG_SCRIPT([libguile/guile-snarf]) GUILE_CONFIG_SCRIPT([libguile/guile-snarf-docs]) GUILE_CONFIG_SCRIPT([test-suite/standalone/test-use-srfi]) diff --git a/doc/ref/Makefile.am b/doc/ref/Makefile.am index 2ccf7dd22..4def24610 100644 --- a/doc/ref/Makefile.am +++ b/doc/ref/Makefile.am @@ -114,7 +114,7 @@ EXTRA_DIST = ChangeLog-2008 $(PICTURES) autoconf.texi: autoconf-macros.texi autoconf-macros.texi: $(top_srcdir)/meta/guile.m4 - GUILE_AUTO_COMPILE=0 $(top_builddir)/meta/uninstalled-env guile-tools \ + GUILE_AUTO_COMPILE=0 $(top_builddir)/meta/uninstalled-env guild \ snarf-guile-m4-docs $(top_srcdir)/meta/guile.m4 \ > $(srcdir)/$@ diff --git a/doc/ref/api-evaluation.texi b/doc/ref/api-evaluation.texi index e87331086..aa7d9c7bb 100644 --- a/doc/ref/api-evaluation.texi +++ b/doc/ref/api-evaluation.texi @@ -581,7 +581,7 @@ procedures in this section, for the same reason that it is often bad taste to use @code{eval}. By default, Guile automatically compiles any files it encounters that have not been compiled yet (@pxref{Invoking Guile, @code{--auto-compile}}). The compiler can also be invoked -explicitly from the shell as @code{guile-tools compile foo.scm}. +explicitly from the shell as @code{guild compile foo.scm}. (Why are calls to @code{eval} and @code{compile} usually in bad taste? Because they are limited, in that they can only really make sense for @@ -603,10 +603,10 @@ For more information on the compiler itself, see @ref{Compiling to the Virtual Machine}. For information on the virtual machine, see @ref{A Virtual Machine for Guile}. -The command-line interface to Guile's compiler is the @command{guile-tools +The command-line interface to Guile's compiler is the @command{guild compile} command: -@deffn {Command} {guile-tools compile} [@option{option}...] @var{file}... +@deffn {Command} {guild compile} [@option{option}...] @var{file}... Compile @var{file}, a source file, and store bytecode in the compilation cache or in the file specified by the @option{-o} option. The following options are available: @@ -673,7 +673,7 @@ computed by @code{(compiled-file-name @var{file})}. @xref{Compiling to the Virtual Machine}, for more information on these options, and on @var{env} and @var{opts}. -As with @command{guile-tools compile}, @var{file} is assumed to be +As with @command{guild compile}, @var{file} is assumed to be UTF-8-encoded unless it contains a coding declaration. @end deffn diff --git a/doc/ref/autoconf.texi b/doc/ref/autoconf.texi index 6edee5425..33aab7cac 100644 --- a/doc/ref/autoconf.texi +++ b/doc/ref/autoconf.texi @@ -165,10 +165,11 @@ In Makefile.in: @node Autofrisk @section Autofrisk -The @dfn{guile-tools autofrisk} command looks for the file @file{modules.af} +The @dfn{guild autofrisk} command looks for the file @file{modules.af} in the current directory and writes out @file{modules.af.m4} containing -autoconf definitions for @code{AUTOFRISK_CHECKS} and @code{AUTOFRISK_SUMMARY}. -@xref{Autoconf Background}, and @xref{Using Autoconf Macros}, for more info. +autoconf definitions for @code{AUTOFRISK_CHECKS} and +@code{AUTOFRISK_SUMMARY}. @xref{Autoconf Background}, and @xref{Using +Autoconf Macros}, for more info. The modules.af file consists of a series of configuration forms (Scheme lists), which have one of the following formats: @@ -238,10 +239,10 @@ Macros}) that does basically the same thing. @end example If the SRFI modules (@pxref{SRFI Support}) were a separate package, we could -use @code{guile-tools frisk} to find out its dependencies: +use @code{guild frisk} to find out its dependencies: @example -$ guile-tools frisk srfi/*.scm +$ guild frisk srfi/*.scm 13 files, 18 modules (13 internal, 5 external), 9 edges x (ice-9 and-let-star) diff --git a/doc/ref/mod-getopt-long.texi b/doc/ref/mod-getopt-long.texi index 17402151a..07fab813b 100644 --- a/doc/ref/mod-getopt-long.texi +++ b/doc/ref/mod-getopt-long.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Guile Reference Manual. -@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004 +@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2011 @c Free Software Foundation, Inc. @c See the file guile.texi for copying conditions. @@ -332,7 +332,7 @@ An option predicate fails. @end itemize @code{#:stop-at-first-non-option} is useful for command line invocations -like @code{guile-tools [--help | --version] [script [script-options]]} +like @code{guild [--help | --version] [script [script-options]]} and @code{cvs [general-options] command [command-options]}, where there are options at two levels: some generic and understood by the outer command, and some that are specific to the particular script or command diff --git a/doc/ref/tools.texi b/doc/ref/tools.texi index 7a98884d8..f6eeefe02 100644 --- a/doc/ref/tools.texi +++ b/doc/ref/tools.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Guile Reference Manual. -@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004 +@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2011 @c Free Software Foundation, Inc. @c See the file guile.texi for copying conditions. @@ -9,13 +9,13 @@ @chapter Miscellaneous Tools Programming is more fun with a good tools. This chapter describes snarfing -tools, and the @code{guile-tools} program which can be used to invoke the rest +tools, and the @code{guild} program which can be used to invoke the rest of the tools (which are self-documenting). Some of these are used in Guile development, too. Imagine that! @menu * Snarfing:: Grepping the source in various ways. -* Executable Modules:: Modules callable via guile-tools. +* Executable Modules:: Modules callable via guild. @end menu @c --------------------------------------------------------------------------- @@ -298,26 +298,27 @@ is rather byzantine, so for now @emph{NO} doc snarfing programs are installed. @c --------------------------------------------------------------------------- @node Executable Modules @section Executable Modules +@cindex guild @cindex guile-tools @cindex modules, executable @cindex executable modules @cindex scripts When Guile is installed, in addition to the @code{(ice-9 FOO)} modules, a set -of @dfn{guile-tools modules} @code{(scripts BAR)} is also installed. Each is +of @dfn{guild modules} @code{(scripts BAR)} is also installed. Each is a regular Scheme module that has some additional packaging so that it can be -used by guile-tools, from the shell. For this reason, we sometimes use the +used by guild, from the shell. For this reason, we sometimes use the term @dfn{script} in this context to mean the same thing. -As a convenience, the @code{guile-tools} wrapper program is installed along w/ +As a convenience, the @code{guild} wrapper program is installed along w/ @code{guile}; it knows where a particular module is installed and calls it passing its args to the program. The result is that you need not augment your PATH. Usage is straightforward: @example -guile-tools --help -guile-tools --version -guile-tools [OPTION] PROGRAM [ARGS ...] +guild --help +guild --version +guild [OPTION] PROGRAM [ARGS ...] If PROGRAM is "list" or omitted, display contents of scripts dir, otherwise PROGRAM is run w/ ARGS. Options (only one of which may be used at a time): @@ -330,8 +331,8 @@ The modules are self-documenting. For example, to see the documentation for @code{lint}, use one (or both) of the shell commands: @example -guile-tools display-commentary '(scripts lint)' -guile-tools --source lint +guild display-commentary '(scripts lint)' +guild --source lint @end example The rest of this section describes the packaging that goes into creating an @@ -343,7 +344,7 @@ executable module. Feel free to skip to the next chapter. See template file @code{PROGRAM} for a quick start. -Programs must follow the @dfn{guile-tools} convention, documented here: +Programs must follow the @dfn{guild} convention, documented here: @itemize @@ -371,7 +372,7 @@ However, `main' must NOT be exported. @end itemize Following these conventions allows the program file to be used as module -@code{(scripts PROGRAM)} in addition to being invoked by guile-tools. Please +@code{(scripts PROGRAM)} in addition to being invoked by guild. Please also include a helpful Commentary section w/ some usage info. @c tools.texi ends here diff --git a/libguile/Makefile.am b/libguile/Makefile.am index 6f2f79367..880028f38 100644 --- a/libguile/Makefile.am +++ b/libguile/Makefile.am @@ -698,7 +698,7 @@ posix.x: cpp-SIG.c load.x: libpath.h alldotdocfiles = $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES) -snarf2checkedtexi = GUILE_AUTO_COMPILE=0 $(top_builddir)/meta/uninstalled-env guile-tools snarf-check-and-output-texi +snarf2checkedtexi = GUILE_AUTO_COMPILE=0 $(top_builddir)/meta/uninstalled-env guild snarf-check-and-output-texi dotdoc2texi = cat $(alldotdocfiles) | $(snarf2checkedtexi) guile.texi: $(alldotdocfiles) guile$(EXEEXT) diff --git a/meta/Makefile.am b/meta/Makefile.am index fe4aeb419..f26fc4436 100644 --- a/meta/Makefile.am +++ b/meta/Makefile.am @@ -1,7 +1,7 @@ ## Process this file with Automake to create Makefile.in ## Jim Blandy --- September 1997 ## -## Copyright (C) 1998, 1999, 2001, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +## Copyright (C) 1998, 1999, 2001, 2006, 2007, 2008, 2009, 2011 Free Software Foundation, Inc. ## ## This file is part of GUILE. ## @@ -20,11 +20,16 @@ ## write to the Free Software Foundation, Inc., 51 Franklin Street, ## Fifth Floor, Boston, MA 02110-1301 USA -bin_SCRIPTS = guile-config guile-tools +bin_SCRIPTS = guile-config guild EXTRA_DIST= \ guile.m4 ChangeLog-2008 \ guile-2.0.pc.in guile-2.0-uninstalled.pc.in \ - guile-tools.in guile-config.in + guild.in guile-config.in + +# What we now call `guild' used to be known as `guile-tools'. +install-data-hook: + cd $(DESTDIR)$(bindir) && rm -f guile-tools$(EXEEXT) && \ + $(LN_S) guild$(EXEEXT) guile-tools$(EXEEXT) pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = guile-2.0.pc diff --git a/meta/guile-tools.in b/meta/guild.in similarity index 86% rename from meta/guile-tools.in rename to meta/guild.in index 2f335b8f7..bb9c37e05 100755 --- a/meta/guile-tools.in +++ b/meta/guild.in @@ -1,9 +1,9 @@ #!/bin/sh # -*- scheme -*- -exec guile $GUILE_FLAGS -e '(@@ (guile-tools) main)' -s "$0" "$@" +exec guile $GUILE_FLAGS -e '(@@ (guild) main)' -s "$0" "$@" !# -;;;; guile-tools --- running scripts bundled with Guile +;;;; guild --- running scripts bundled with Guile ;;;; Andy Wingo --- April 2009 ;;;; ;;;; Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. @@ -23,7 +23,7 @@ exec guile $GUILE_FLAGS -e '(@@ (guile-tools) main)' -s "$0" "$@" ;;;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;;;; Boston, MA 02110-1301 USA -(define-module (guile-tools) +(define-module (guild) #:use-module (ice-9 getopt-long) #:autoload (ice-9 format) (format)) @@ -39,16 +39,16 @@ exec guile $GUILE_FLAGS -e '(@@ (guile-tools) main)' -s "$0" "$@" (define (display-help) (display "\ -Usage: guile-tools --version - guile-tools --help - guile-tools PROGRAM [ARGS] +Usage: guild --version + guild --help + guild PROGRAM [ARGS] If PROGRAM is \"list\" or omitted, display available scripts, otherwise PROGRAM is run with ARGS. ")) (define (display-version) - (format #t "guile-tools (GNU Guile ~A) ~A + (format #t "guild (GNU Guile ~A) ~A Copyright (C) 2010 Free Software Foundation, Inc. License LGPLv3+: GNU LGPL version 3 or later This is free software: you are free to change and redistribute it. @@ -82,7 +82,7 @@ There is NO WARRANTY, to the extent permitted by law. (cdr args)))))) (else (format (current-error-port) - "guile-tools: unknown script ~s~%" (car args)) + "guild: unknown script ~s~%" (car args)) (format (current-error-port) - "Try `guile-tools --help' for more information.~%") + "Try `guild --help' for more information.~%") (exit 1)))))))) diff --git a/module/Makefile.am b/module/Makefile.am index ecae83bbe..b21b73c77 100644 --- a/module/Makefile.am +++ b/module/Makefile.am @@ -82,7 +82,7 @@ ice-9/psyntax-pp.scm.gen: ice-9/psyntax-pp.go: ice-9/psyntax.scm ice-9/psyntax-pp.scm $(AM_V_GUILEC) GUILE_AUTO_COMPILE=0 \ $(top_builddir)/meta/uninstalled-env \ - guile-tools compile $(GUILE_WARNINGS) -o "ice-9/psyntax-pp.go" "$(srcdir)/ice-9/psyntax.scm" + guild compile $(GUILE_WARNINGS) -o "ice-9/psyntax-pp.go" "$(srcdir)/ice-9/psyntax.scm" SCHEME_LANG_SOURCES = \ language/scheme/spec.scm \ diff --git a/module/scripts/README b/module/scripts/README index cb397f5d2..0f5bea583 100644 --- a/module/scripts/README +++ b/module/scripts/README @@ -4,7 +4,7 @@ Overview and Usage This directory contains Scheme programs, some useful in maintaining Guile. On "make install", these programs are copied to PKGDATADIR/VERSION/scripts. -You can use guile-tools to invoke a program from the shell, or alternatively, +You can use guild to invoke a program from the shell, or alternatively, load its file as a Guile Scheme module, and use its exported procedure(s) from Scheme code. Typically for any PROGRAM: @@ -38,7 +38,7 @@ How to Contribute See template file PROGRAM for a quick start. -Programs must follow the "guile-tools" convention, documented here: +Programs must follow the "guild" convention, documented here: - The module name must be "(scripts PROGRAM)". A procedure named PROGRAM w/ signature "(PROGRAM . args)" must be exported. Basically, use some variant @@ -56,7 +56,7 @@ Programs must follow the "guile-tools" convention, documented here: However, `main' must NOT be exported. Following these conventions allows the program file to be used as module -(scripts PROGRAM) in addition to being invoked by guile-tools. Please also +(scripts PROGRAM) in addition to being invoked by guild. Please also include a helpful Commentary section w/ some usage info. diff --git a/module/scripts/lint.scm b/module/scripts/lint.scm index b4a7f530a..aa74fb6a7 100644 --- a/module/scripts/lint.scm +++ b/module/scripts/lint.scm @@ -1,6 +1,6 @@ ;;; lint --- Preemptive checks for coding errors in Guile Scheme code -;; Copyright (C) 2002, 2006 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2006, 2011 Free Software Foundation, Inc. ;; ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public License @@ -64,7 +64,7 @@ ;; Note: most of the unresolved variables found in this example are ;; false positives, as you would hope. => scope for improvement. ;; -;; $ guile-tools lint `guile-tools` +;; $ guild lint `guild` ;; No unresolved free variables in PROGRAM ;; No unresolved free variables in autofrisk ;; No unresolved free variables in display-commentary diff --git a/module/scripts/list.scm b/module/scripts/list.scm index 046d8f5b8..c4891b6a8 100644 --- a/module/scripts/list.scm +++ b/module/scripts/list.scm @@ -1,4 +1,4 @@ -;;; List --- List scripts that can be invoked by guile-tools -*- coding: iso-8859-1 -*- +;;; List --- List scripts that can be invoked by guild -*- coding: iso-8859-1 -*- ;;;; Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. ;;;; @@ -21,7 +21,7 @@ ;; Usage: list ;; -;; List scripts that can be invoked by guile-tools. +;; List scripts that can be invoked by guild. ;;; Code: -- 2.20.1