guile-tools is a scheme script that loads scheme modules
authorAndy Wingo <wingo@pobox.com>
Fri, 17 Apr 2009 09:19:42 +0000 (11:19 +0200)
committerAndy Wingo <wingo@pobox.com>
Fri, 17 Apr 2009 09:19:42 +0000 (11:19 +0200)
* meta/guile-tools: Changed to be a scheme script. Instead of looking for
  executables in a "scripts dir", we just look for modules in (scripts),
  and load the modules directly.

* module/Makefile.am:
* module/scripts/: Move the scripts into module/ so they can be compiled.
  Rename scripts from `foo' to `foo.scm'.

* libguile/Makefile.am: Invoke the snarf->texi code via guile-tools.

* configure.in:
* .gitignore: Update for changes.

30 files changed:
.gitignore
Makefile.am
configure.in
libguile/Makefile.am
meta/Makefile.am
meta/guile-tools [new file with mode: 0755]
meta/guile-tools.in [deleted file]
module/Makefile.am
module/scripts/ChangeLog-2008 [moved from scripts/ChangeLog-2008 with 100% similarity]
module/scripts/PROGRAM.scm [moved from scripts/PROGRAM with 82% similarity, mode: 0644]
module/scripts/README [moved from scripts/README with 100% similarity]
module/scripts/api-diff.scm [moved from scripts/api-diff with 97% similarity, mode: 0644]
module/scripts/autofrisk.scm [moved from scripts/autofrisk with 97% similarity, mode: 0644]
module/scripts/compile.scm [moved from scripts/compile with 98% similarity, mode: 0644]
module/scripts/disassemble.scm [moved from scripts/disassemble with 92% similarity, mode: 0644]
module/scripts/display-commentary.scm [moved from scripts/display-commentary with 90% similarity, mode: 0644]
module/scripts/doc-snarf.scm [moved from scripts/doc-snarf with 98% similarity, mode: 0644]
module/scripts/frisk.scm [moved from scripts/frisk with 98% similarity, mode: 0644]
module/scripts/generate-autoload.scm [moved from scripts/generate-autoload with 96% similarity, mode: 0644]
module/scripts/lint.scm [moved from scripts/lint with 97% similarity, mode: 0644]
module/scripts/punify.scm [moved from scripts/punify with 92% similarity, mode: 0644]
module/scripts/read-rfc822.scm [moved from scripts/read-rfc822 with 95% similarity, mode: 0644]
module/scripts/read-scheme-source.scm [moved from scripts/read-scheme-source with 98% similarity, mode: 0644]
module/scripts/read-text-outline.scm [moved from scripts/read-text-outline with 97% similarity, mode: 0644]
module/scripts/scan-api.scm [moved from scripts/scan-api with 97% similarity, mode: 0644]
module/scripts/snarf-check-and-output-texi.scm [moved from scripts/snarf-check-and-output-texi with 97% similarity, mode: 0644]
module/scripts/snarf-guile-m4-docs.scm [moved from scripts/snarf-guile-m4-docs with 92% similarity, mode: 0644]
module/scripts/summarize-guile-TODO.scm [moved from scripts/summarize-guile-TODO with 97% similarity, mode: 0644]
module/scripts/use2dot.scm [moved from scripts/use2dot with 94% similarity, mode: 0644]
scripts/Makefile.am [deleted file]

index 3aa1f04..0b2ff7c 100644 (file)
@@ -53,7 +53,6 @@ conftest.c
 depcomp
 elisp-comp
 guile-*.tar.gz
-guile-tools
 install-sh
 libtool
 ltconfig
index 0e61f53..a82143b 100644 (file)
@@ -25,7 +25,7 @@
 AUTOMAKE_OPTIONS = 1.10
 
 SUBDIRS = lib meta libguile guile-readline emacs \
-         scripts srfi doc examples test-suite benchmark-suite lang am \
+         srfi doc examples test-suite benchmark-suite lang am \
          module testsuite
 
 include_HEADERS = libguile.h
index e547ff0..354e93c 100644 (file)
@@ -1537,7 +1537,6 @@ AC_CONFIG_FILES([
   examples/Makefile
   lang/Makefile
   libguile/Makefile
-  scripts/Makefile
   srfi/Makefile
   test-suite/Makefile
   test-suite/standalone/Makefile
@@ -1556,7 +1555,6 @@ AC_CONFIG_FILES([meta/guile-1.8.pc])
 AC_CONFIG_FILES([meta/guile-1.8-uninstalled.pc])
 AC_CONFIG_FILES([check-guile], [chmod +x check-guile])
 AC_CONFIG_FILES([benchmark-guile], [chmod +x benchmark-guile])
-AC_CONFIG_FILES([meta/guile-tools], [chmod +x meta/guile-tools])
 AC_CONFIG_FILES([meta/guile], [chmod +x meta/guile])
 AC_CONFIG_FILES([meta/uninstalled-env], [chmod +x meta/uninstalled-env])
 AC_CONFIG_FILES([meta/gdb-uninstalled-guile], [chmod +x meta/gdb-uninstalled-guile])
index 8f26e34..369b249 100644 (file)
@@ -329,7 +329,7 @@ load.x: libpath.h
 include $(top_srcdir)/am/pre-inst-guile
 
 alldotdocfiles    = $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES)
-snarf2checkedtexi = GUILE="$(GUILE_FOR_BUILD)" $(top_srcdir)/scripts/snarf-check-and-output-texi
+snarf2checkedtexi = $(top_builddir)/meta/uninstalled-env guile-tools snarf-check-and-output-texi
 dotdoc2texi       = cat $(alldotdocfiles) | $(snarf2checkedtexi)
 
 guile.texi: $(alldotdocfiles) guile$(EXEEXT)
index da587e3..6614ab3 100644 (file)
@@ -21,7 +21,7 @@
 ##   Floor, Boston, MA 02110-1301 USA
 
 bin_SCRIPTS=guile-config guile-tools
-EXTRA_DIST=guile-tools.in guile.m4 ChangeLog-2008 \
+EXTRA_DIST=guile.m4 ChangeLog-2008 \
        guile-1.8.pc.in guile-1.8-uninstalled.pc.in
 
 pkgconfigdir = $(libdir)/pkgconfig
diff --git a/meta/guile-tools b/meta/guile-tools
new file mode 100755 (executable)
index 0000000..6df88ef
--- /dev/null
@@ -0,0 +1,98 @@
+#!/bin/sh
+# -*- scheme -*-
+exec guile $GUILE_FLAGS -e '(@@ (guile-tools) main)' -s "$0" "$@"
+!#
+
+;;;; guile-tools --- running scripts bundled with Guile
+;;;; Jim Blandy <jim@red-bean.com> --- September 1997
+;;;; 
+;;;;   Copyright (C) 1998, 2001, 2004, 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+;;;; 
+;;;; This library is free software; you can redistribute it and/or
+;;;; modify it under the terms of the GNU Lesser General Public
+;;;; License as published by the Free Software Foundation; either
+;;;; version 2.1 of the License, or (at your option) any later version.
+;;;; 
+;;;; This library is distributed in the hope that it will be useful,
+;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;;;; Lesser General Public License for more details.
+;;;; 
+;;;; You should have received a copy of the GNU Lesser General Public
+;;;; License along with this library; if not, write to the Free Software
+;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+(define-module (guile-tools)
+  #:use-module (srfi srfi-1))
+
+(define (help)
+  (display "\
+Usage: guile-tools --version
+       guile-tools --help
+       guile-tools PROGRAM [ARGS]
+
+If PROGRAM is \"list\" or omitted, display available scripts, otherwise
+PROGRAM is run with ARGS.
+"))
+
+(define (directory-files dir)
+  (if (and (file-exists? dir) (file-is-directory? dir))
+      (let ((dir-stream (opendir dir)))
+        (let loop ((new (readdir dir-stream))
+                   (acc '()))
+          (if (eof-object? new)
+              (begin
+                (closedir dir-stream)
+                acc)
+              (loop (readdir dir-stream)
+                    (if (or (string=? "."  new)             ; ignore
+                            (string=? ".." new))            ; ignore
+                        acc
+                        (cons new acc))))))
+      '()))
+
+(define (strip-extensions path)
+  (or-map (lambda (ext)
+            (and
+             (string-suffix? ext path)
+             (substring path 0
+                        (- (string-length path) (string-length ext)))))
+          (append %load-extensions %load-compiled-extensions)))
+
+(define (unique l)
+  (cond ((null? l) l)
+        ((null? (cdr l)) l)
+        ((equal? (car l) (cadr l)) (unique (cdr l)))
+        (else (cons (car l) (unique (cdr l))))))
+
+(define (find-submodules head)
+  (let ((shead (map symbol->string head)))
+    (unique
+     (sort
+      (append-map (lambda (path)
+                    (fold (lambda (x rest)
+                            (let ((stripped (strip-extensions x)))
+                              (if stripped (cons stripped rest) rest)))
+                          '()
+                          (directory-files
+                           (fold (lambda (x y) (in-vicinity y x)) path shead))))
+                  %load-path)
+      string<?))))
+
+(define (list-scripts)
+  (for-each (lambda (x)
+              ;; would be nice to show a summary.
+              (format #t "~A\n" x))
+            (find-submodules '(scripts))))
+
+(define (find-script s)
+  (let ((m (resolve-module (append '(scripts) (list (string->symbol s))))))
+    (and (module-public-interface m)
+         m)))
+
+(define (main args)
+  (if (or (equal? (cdr args) '())
+          (equal? (cdr args) '("list")))
+      (list-scripts)
+      (let ((mod (find-script (cadr args))))
+        (exit ((module-ref mod 'main) (cdr args))))))
diff --git a/meta/guile-tools.in b/meta/guile-tools.in
deleted file mode 100644 (file)
index 68db268..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/bin/sh
-
-#      Copyright (C) 2001, 2003, 2006, 2008 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this software; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-# Boston, MA 02110-1301 USA
-
-# Usage: See `help' func below.
-#
-# TODO
-# - handle pre-install invocation
-# - "full" option processing (but see comment below)
-#
-# Author: Thien-Thi Nguyen
-
-help ()
-{
-    cat <<EOF
-Usage: guile-tools --version
-       guile-tools --help
-       guile-tools [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):
- --scriptsdir DIR    -- Look in DIR for scripts
- --guileversion VERS -- Look in $pkgdatadir/VERS/scripts for scripts
- --source            -- Display PROGRAM source (ignore ARGS) to stdout
-
-Default scripts dir: $default_scriptsdir
-EOF
-}
-
-prefix="@prefix@"
-datarootdir="@datarootdir@"
-pkgdatadir="@datadir@/@PACKAGE@"
-guileversion="@GUILE_EFFECTIVE_VERSION@"
-default_scriptsdir=$pkgdatadir/$guileversion/scripts
-
-top_srcdir="@top_srcdir_absolute@"
-top_builddir="@top_builddir_absolute@"
-
-# pre-install invocation frob
-mydir=$(cd $(dirname $0) && pwd)
-if [ "$mydir" = "$top_builddir/meta" ] ; then
-    default_scriptsdir=$top_srcdir/scripts
-fi
-
-# option processing -- basically, you can override either the script dir
-# completely, or just the guile version.  we choose implementation simplicity
-# over orthogonality.
-
-case x"$1" in
-x--version)
-    echo $0 $guileversion
-    exit 0
-    ;;
-x--help)
-    help
-    exit 0
-    ;;
-esac
-
-if [ x"$1" = x--scriptsdir ] ; then
-    user_scriptsdir=$2
-    shift
-    shift
-elif [ x"$1" = x--guileversion ] ; then
-    user_scriptsdir=$pkgdatadir/$2/scripts
-    shift
-    shift
-fi
-
-scriptsdir=${user_scriptsdir-$default_scriptsdir}
-
-if [ ! -d $scriptsdir ] ; then
-    echo $0: no such directory: $scriptsdir
-    exit 1
-fi
-
-if [ x"$1" = x -o x"$1" = xlist ] ; then
-    ls $scriptsdir
-    exit 0
-fi
-
-if [ x"$1" = x--source ] ; then
-    if [ x"$2" = x ] ; then echo $0: need to specify program ; exit 1 ; fi
-    if [ -x $scriptsdir/$2 ] ; then
-        cat $scriptsdir/$2
-        exit 0
-    else
-        echo $0: no such program: $2
-        exit 1
-    fi
-fi
-
-program=$scriptsdir/$1
-shift
-
-if [ -x $program ] ; then
-    exec $program "$@"
-else
-    echo $0: no such program: $program
-    exit 1
-fi
-
-# guile-tools ends here
index 64a7448..ee55276 100644 (file)
@@ -23,6 +23,8 @@
 # when building the rest.
 SUBDIRS = . ice-9 srfi oop
 
+include $(top_srcdir)/am/guilec
+
 # We're at the root of the module hierarchy.
 modpath =
 
@@ -44,7 +46,9 @@ SOURCES =                                                             \
   $(SCHEME_LANG_SOURCES) $(ECMASCRIPT_LANG_SOURCES)                    \
   $(GHIL_LANG_SOURCES) $(GLIL_LANG_SOURCES)                            \
   $(ASSEMBLY_LANG_SOURCES) $(BYTECODE_LANG_SOURCES)                    \
-  $(OBJCODE_LANG_SOURCES) $(VALUE_LANG_SOURCES)
+  $(OBJCODE_LANG_SOURCES) $(VALUE_LANG_SOURCES)                                \
+                                                                       \
+  $(SCRIPTS_SOURCES)
 
 SCHEME_LANG_SOURCES =                                          \
   language/scheme/amatch.scm language/scheme/expand.scm        \
@@ -84,7 +88,29 @@ ECMASCRIPT_LANG_SOURCES =                    \
   language/ecmascript/array.scm                        \
   language/ecmascript/compile-ghil.scm
 
+SCRIPTS_SOURCES =                              \
+  scripts/PROGRAM.scm                          \
+  scripts/autofrisk.scm                                \
+  scripts/compile.scm                          \
+  scripts/disassemble.scm                      \
+  scripts/display-commentary.scm               \
+  scripts/doc-snarf.scm                                \
+  scripts/frisk.scm                            \
+  scripts/generate-autoload.scm                        \
+  scripts/lint.scm                             \
+  scripts/punify.scm                           \
+  scripts/read-scheme-source.scm               \
+  scripts/read-text-outline.scm                        \
+  scripts/use2dot.scm                          \
+  scripts/snarf-check-and-output-texi.scm      \
+  scripts/summarize-guile-TODO.scm             \
+  scripts/scan-api.scm                         \
+  scripts/api-diff.scm                         \
+  scripts/read-rfc822.scm                      \
+  scripts/snarf-guile-m4-docs.scm
+
+EXTRA_DIST += scripts/ChangeLog-2008
+EXTRA_DIST += scripts/README
+
 NOCOMP_SOURCES =                               \
   system/repl/describe.scm
-
-include $(top_srcdir)/am/guilec
old mode 100755 (executable)
new mode 100644 (file)
similarity index 82%
rename from scripts/PROGRAM
rename to module/scripts/PROGRAM.scm
index e835408..af1a583
@@ -1,8 +1,3 @@
-#!/bin/sh
-# aside from this initial boilerplate, this is actually -*- scheme -*- code
-main='(module-ref (resolve-module '\''(scripts PROGRAM)) '\'main')'
-exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
-!#
 ;;; PROGRAM --- Does something
 
 ;;     Copyright (C) 2002, 2006 Free Software Foundation, Inc.
similarity index 100%
rename from scripts/README
rename to module/scripts/README
old mode 100755 (executable)
new mode 100644 (file)
similarity index 97%
rename from scripts/api-diff
rename to module/scripts/api-diff.scm
index 0b41eea..de750e1
@@ -1,8 +1,3 @@
-#!/bin/sh
-# aside from this initial boilerplate, this is actually -*- scheme -*- code
-main='(module-ref (resolve-module '\''(scripts api-diff)) '\'main')'
-exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
-!#
 ;;; api-diff --- diff guile-api.alist files
 
 ;;     Copyright (C) 2002, 2006 Free Software Foundation, Inc.
old mode 100755 (executable)
new mode 100644 (file)
similarity index 97%
rename from scripts/autofrisk
rename to module/scripts/autofrisk.scm
index 154b635..e280be4
@@ -1,8 +1,3 @@
-#!/bin/sh
-# aside from this initial boilerplate, this is actually -*- scheme -*- code
-main='(module-ref (resolve-module '\''(scripts autofrisk)) '\'main')'
-exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
-!#
 ;;; autofrisk --- Generate module checks for use with auto* tools
 
 ;;     Copyright (C) 2002, 2006 Free Software Foundation, Inc.
old mode 100755 (executable)
new mode 100644 (file)
similarity index 98%
rename from scripts/compile
rename to module/scripts/compile.scm
index 41f542c..7c812ad
@@ -1,7 +1,3 @@
-#!/bin/sh
-# -*- scheme -*-
-exec ${GUILE-guile} -e '(@ (scripts compile) compile)' -s $0 "$@"
-!#
 ;;; Compile --- Command-line Guile Scheme compiler
 
 ;; Copyright 2005,2008,2009 Free Software Foundation, Inc.
@@ -135,6 +131,8 @@ Report bugs to <guile-user@gnu.org>.~%")
                                       #:opts compile-opts)))
               input-files)))
 
+(define main compile)
+
 ;;; Local Variables:
 ;;; coding: latin-1
 ;;; End:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 92%
rename from scripts/disassemble
rename to module/scripts/disassemble.scm
index 71ec057..46ef0c7
@@ -1,7 +1,3 @@
-#!/bin/sh
-# -*- scheme -*-
-exec ${GUILE-guile} -e '(@ (scripts disassemble) disassemble)' -s $0 "$@"
-!#
 ;;; Disassemble --- Disassemble .go files into something human-readable
 
 ;; Copyright 2005,2008 Free Software Foundation, Inc.
@@ -39,3 +35,5 @@ exec ${GUILE-guile} -e '(@ (scripts disassemble) disassemble)' -s $0 "$@"
   (for-each (lambda (file)
               (disassemble (load-objcode file)))
             (cdr args)))
+
+(define main disassemble)
old mode 100755 (executable)
new mode 100644 (file)
similarity index 90%
rename from scripts/display-commentary
rename to module/scripts/display-commentary.scm
index a12dae8..fd1ffd0
@@ -1,8 +1,3 @@
-#!/bin/sh
-# aside from this initial boilerplate, this is actually -*- scheme -*- code
-main='(module-ref (resolve-module '\''(scripts display-commentary)) '\'main')'
-exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
-!#
 ;;; display-commentary --- As advertized
 
 ;;     Copyright (C) 2001, 2006 Free Software Foundation, Inc.
old mode 100755 (executable)
new mode 100644 (file)
similarity index 98%
rename from scripts/doc-snarf
rename to module/scripts/doc-snarf.scm
index 4bc09f5..4ceddc1
@@ -1,8 +1,3 @@
-#!/bin/sh
-# aside from this initial boilerplate, this is actually -*- scheme -*- code
-main='(module-ref (resolve-module '\''(scripts doc-snarf)) '\'main')'
-exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
-!#
 ;;; doc-snarf --- Extract documentation from source files
 
 ;;     Copyright (C) 2001, 2006 Free Software Foundation, Inc.
old mode 100755 (executable)
new mode 100644 (file)
similarity index 98%
rename from scripts/frisk
rename to module/scripts/frisk.scm
index 609a5e6..374bb4e
@@ -1,8 +1,3 @@
-#!/bin/sh
-# aside from this initial boilerplate, this is actually -*- scheme -*- code
-main='(module-ref (resolve-module '\''(scripts frisk)) '\'main')'
-exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
-!#
 ;;; frisk --- Grok the module interfaces of a body of files
 
 ;;     Copyright (C) 2002, 2006 Free Software Foundation, Inc.
old mode 100755 (executable)
new mode 100644 (file)
similarity index 96%
rename from scripts/generate-autoload
rename to module/scripts/generate-autoload.scm
index b08be83..10f158c
@@ -1,8 +1,3 @@
-#!/bin/sh
-# aside from this initial boilerplate, this is actually -*- scheme -*- code
-main='(module-ref (resolve-module '\''(scripts generate-autoload)) '\'main')'
-exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
-!#
 ;;; generate-autoload --- Display define-module form with autoload info
 
 ;;     Copyright (C) 2001, 2006 Free Software Foundation, Inc.
old mode 100755 (executable)
new mode 100644 (file)
similarity index 97%
rename from scripts/lint
rename to module/scripts/lint.scm
index 3544207..2ee9b78
@@ -1,8 +1,3 @@
-#!/bin/sh
-# aside from this initial boilerplate, this is actually -*- scheme -*- code
-main='(module-ref (resolve-module '\''(scripts lint)) '\'main')'
-exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
-!#
 ;;; lint --- Preemptive checks for coding errors in Guile Scheme code
 
 ;;     Copyright (C) 2002, 2006 Free Software Foundation, Inc.
old mode 100755 (executable)
new mode 100644 (file)
similarity index 92%
rename from scripts/punify
rename to module/scripts/punify.scm
index 0f6a361..098c4b9
@@ -1,8 +1,3 @@
-#!/bin/sh
-# aside from this initial boilerplate, this is actually -*- scheme -*- code
-main='(module-ref (resolve-module '\''(scripts punify)) '\'main')'
-exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
-!#
 ;;; punify --- Display Scheme code w/o unnecessary comments / whitespace
 
 ;;     Copyright (C) 2001, 2006 Free Software Foundation, Inc.
old mode 100755 (executable)
new mode 100644 (file)
similarity index 95%
rename from scripts/read-rfc822
rename to module/scripts/read-rfc822.scm
index 0904d61..ed3aced
@@ -1,8 +1,3 @@
-#!/bin/sh
-# aside from this initial boilerplate, this is actually -*- scheme -*- code
-main='(module-ref (resolve-module '\''(scripts read-rfc822)) '\'main')'
-exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
-!#
 ;;; read-rfc822 --- Validate RFC822 file by displaying it to stdout
 
 ;;     Copyright (C) 2002, 2004, 2006 Free Software Foundation, Inc.
old mode 100755 (executable)
new mode 100644 (file)
similarity index 98%
rename from scripts/read-scheme-source
rename to module/scripts/read-scheme-source.scm
index 05bb106..c593d64
@@ -1,8 +1,3 @@
-#!/bin/sh
-# aside from this initial boilerplate, this is actually -*- scheme -*- code
-main='(module-ref (resolve-module '\''(scripts read-scheme-source)) '\'main')'
-exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
-!#
 ;;; read-scheme-source --- Read a file, recognizing scheme forms and comments
 
 ;;     Copyright (C) 2001, 2006 Free Software Foundation, Inc.
old mode 100755 (executable)
new mode 100644 (file)
similarity index 97%
rename from scripts/read-text-outline
rename to module/scripts/read-text-outline.scm
index c850269..579fb69
@@ -1,8 +1,3 @@
-#!/bin/sh
-# aside from this initial boilerplate, this is actually -*- scheme -*- code
-main='(module-ref (resolve-module '\''(scripts read-text-outline)) '\'main')'
-exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
-!#
 ;;; read-text-outline --- Read a text outline and display it as a sexp
 
 ;;     Copyright (C) 2002, 2006 Free Software Foundation, Inc.
old mode 100755 (executable)
new mode 100644 (file)
similarity index 97%
rename from scripts/scan-api
rename to module/scripts/scan-api.scm
index 3ea10db..ceaac43
@@ -1,8 +1,3 @@
-#!/bin/sh
-# aside from this initial boilerplate, this is actually -*- scheme -*- code
-main='(module-ref (resolve-module '\''(scripts scan-api)) '\'main')'
-exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
-!#
 ;;; scan-api --- Scan and group interpreter and libguile interface elements
 
 ;;     Copyright (C) 2002, 2006 Free Software Foundation, Inc.
old mode 100755 (executable)
new mode 100644 (file)
similarity index 97%
rename from scripts/snarf-check-and-output-texi
rename to module/scripts/snarf-check-and-output-texi.scm
index ea33e17..049d084
@@ -1,8 +1,3 @@
-#!/bin/sh
-# aside from this initial boilerplate, this is actually -*- scheme -*- code
-main="(module-ref (resolve-module '(scripts snarf-check-and-output-texi)) 'main)"
-exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
-!#
 ;;; snarf-check-and-output-texi --- called by the doc snarfer.
 
 ;;     Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
old mode 100755 (executable)
new mode 100644 (file)
similarity index 92%
rename from scripts/snarf-guile-m4-docs
rename to module/scripts/snarf-guile-m4-docs.scm
index b80f187..11fb82b
@@ -1,8 +1,3 @@
-#!/bin/sh
-# aside from this initial boilerplate, this is actually -*- scheme -*- code
-main='(module-ref (resolve-module '\''(scripts snarf-guile-m4-docs)) '\'main')'
-exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
-!#
 ;;; snarf-guile-m4-docs --- Parse guile.m4 comments for texi documentation
 
 ;;     Copyright (C) 2002, 2006 Free Software Foundation, Inc.
old mode 100755 (executable)
new mode 100644 (file)
similarity index 97%
rename from scripts/summarize-guile-TODO
rename to module/scripts/summarize-guile-TODO.scm
index 79543fe..bf4f145
@@ -1,8 +1,3 @@
-#!/bin/sh
-# aside from this initial boilerplate, this is actually -*- scheme -*- code
-main='(module-ref (resolve-module '\''(scripts summarize-guile-TODO)) '\'main')'
-exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
-!#
 ;;; summarize-guile-TODO --- Display Guile TODO list in various ways
 
 ;;     Copyright (C) 2002, 2006 Free Software Foundation, Inc.
old mode 100755 (executable)
new mode 100644 (file)
similarity index 94%
rename from scripts/use2dot
rename to module/scripts/use2dot.scm
index 30b4690..bf1fdbd
@@ -1,8 +1,3 @@
-#!/bin/sh
-# aside from this initial boilerplate, this is actually -*- scheme -*- code
-main='(module-ref (resolve-module '\''(scripts use2dot)) '\'main')'
-exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
-!#
 ;;; use2dot --- Display module dependencies as a DOT specification
 
 ;;     Copyright (C) 2001, 2006 Free Software Foundation, Inc.
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
deleted file mode 100644 (file)
index ca96da7..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-## Process this file with automake to produce Makefile.in.
-##
-##     Copyright (C) 2002, 2006, 2008 Free Software Foundation, Inc.
-##
-##   This file is part of GUILE.
-##
-##   GUILE is free software; you can redistribute it and/or modify
-##   it under the terms of the GNU General Public License as
-##   published by the Free Software Foundation; either version 2, or
-##   (at your option) any later version.
-##
-##   GUILE is distributed in the hope that it will be useful, but
-##   WITHOUT ANY WARRANTY; without even the implied warranty of
-##   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-##   GNU General Public License for more details.
-##
-##   You should have received a copy of the GNU General Public
-##   License along with GUILE; see the file COPYING.  If not, write
-##   to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-##   Floor, Boston, MA 02110-1301 USA
-
-AUTOMAKE_OPTIONS = gnu
-
-# These should be installed and distributed.
-scripts_sources =                              \
-       PROGRAM                                 \
-       autofrisk                               \
-       compile                                 \
-       disassemble                             \
-       display-commentary                      \
-       doc-snarf                               \
-       frisk                                   \
-       generate-autoload                       \
-       lint                                    \
-       punify                                  \
-       read-scheme-source                      \
-       read-text-outline                       \
-       use2dot                                 \
-       snarf-check-and-output-texi             \
-       summarize-guile-TODO                    \
-       scan-api                                \
-       api-diff                                \
-       read-rfc822                             \
-       snarf-guile-m4-docs
-
-subpkgdatadir = $(pkgdatadir)/$(GUILE_EFFECTIVE_VERSION)/scripts
-subpkgdata_SCRIPTS = $(scripts_sources)
-
-EXTRA_DIST = $(scripts_sources) ChangeLog-2008
-
-list:
-       @echo $(scripts_sources)
-
-include $(top_srcdir)/am/pre-inst-guile
-
-overview: $(scripts_sources)
-       @echo '----------------------------'
-       @echo Overview
-       @echo I. Commentaries
-       @echo II. Module Interfaces
-       @echo '----------------------------'
-       @echo I. Commentaries
-       @echo '----------------------------'
-       $(preinstguiletool)/display-commentary $^
-       @echo '----------------------------'
-       @echo II. Module Interfaces
-       @echo '----------------------------'
-       $(preinstguiletool)/frisk $^
-
-# Makefile.am ends here