summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2009-03-20 01:11:16 +0100
committerLudovic Courtès <ludo@gnu.org>2009-03-24 23:54:38 +0100
commit0ea47a3a09704684d4d8af70a2f9e851300845a8 (patch)
tree93ef851df7afcadea53ba2acfc92af395fcdef32 /examples
parent020348bb87860c8294be64a17b7de732c8265fbc (diff)
downloadguile-0ea47a3a09704684d4d8af70a2f9e851300845a8.tar.gz
Aggregate `Makefile.am' files under `examples/'.
* configure.in: Don't produce `examples/*/Makefile'. * examples/Makefile.am (SUBDIRS): Remove. (EXTRA_DIST, AM_CFLAGS, AM_LIBS): New. (box/box, box/box.o, box-module/box, box-module/box.o, libbox.la, box-dynamic/box.lo, libbox-module.la, box-dynamic-module/box.lo, installcheck, CLEANFILES, clean-local): New targets, aggregated from `Makefile.am' files formerly in sub-directories. * examples/check.test: New file, aggregated from `check.test' files in sub-directories.
Diffstat (limited to 'examples')
-rw-r--r--examples/Makefile.am77
-rw-r--r--examples/box-dynamic-module/Makefile.am36
-rwxr-xr-xexamples/box-dynamic-module/check.test48
-rw-r--r--examples/box-dynamic/Makefile.am36
-rwxr-xr-xexamples/box-dynamic/check.test38
-rw-r--r--examples/box-module/Makefile.am36
-rwxr-xr-xexamples/box-module/check.test38
-rw-r--r--examples/box/Makefile.am36
-rwxr-xr-xexamples/box/check.test38
-rwxr-xr-xexamples/check.test238
-rw-r--r--examples/modules/Makefile.am25
-rwxr-xr-xexamples/modules/check.test27
-rw-r--r--examples/safe/Makefile.am25
-rwxr-xr-xexamples/safe/check.test40
-rw-r--r--examples/scripts/Makefile.am25
-rwxr-xr-xexamples/scripts/check.test53
16 files changed, 311 insertions, 505 deletions
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 84503088f..1b995b521 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -1,6 +1,6 @@
## Process this file with Automake to create Makefile.in
##
-## Copyright (C) 2001, 2006, 2008 Free Software Foundation, Inc.
+## Copyright (C) 2001, 2006, 2008, 2009 Free Software Foundation, Inc.
##
## This file is part of GUILE.
##
@@ -19,7 +19,76 @@
## to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
## Floor, Boston, MA 02110-1301 USA
-SUBDIRS = scripts box box-module box-dynamic box-dynamic-module\
- modules safe
+EXTRA_DIST = README ChangeLog-2008 check.test \
+ \
+ scripts/README scripts/simple-hello.scm scripts/hello \
+ scripts/fact \
+ \
+ box/README box/box.c \
+ \
+ box-module/README box-module/box.c \
+ \
+ box-dynamic/README box-dynamic/box.c \
+ \
+ box-dynamic-module/README box-dynamic-module/box.c \
+ box-dynamic-module/box-module.scm box-dynamic-module/box-mixed.scm \
+ \
+ modules/README modules/module-0.scm modules/module-1.scm \
+ modules/module-2.scm modules/main \
+ \
+ safe/README safe/safe safe/untrusted.scm safe/evil.scm
-EXTRA_DIST = README ChangeLog-2008
+AM_CFLAGS = `$(bindir)/guile-config compile`
+AM_LIBS = `$(bindir)/guile-config link`
+
+
+box/box: box/box.o
+ -$(MKDIR_P) box
+ $(CC) $< $(AM_LIBS) -o $@
+
+box/box.o: box/box.c
+ -$(MKDIR_P) box
+ $(CC) $(AM_CFLAGS) -c $< -o $@
+
+
+box-module/box: box-module/box.o
+ -$(MKDIR_P) box-module
+ $(CC) $< $(AM_LIBS) -o $@
+
+box-module/box.o: box-module/box.c
+ -$(MKDIR_P) box-module
+ $(CC) $(AM_CFLAGS) -c $< -o $@
+
+
+libbox.la: box-dynamic/box.lo
+ $(top_builddir)/libtool --mode=link $(CC) $< $(AM_LIBS) -rpath $(libdir) -o $@
+
+box-dynamic/box.lo: box-dynamic/box.c
+ -$(MKDIR_P) box-dynamic
+ $(top_builddir)/libtool --mode=compile $(CC) $(AM_CFLAGS) -c $< -o $@
+
+
+libbox-module.la: box-dynamic-module/box.lo
+ $(top_builddir)/libtool --mode=link $(CC) $< $(AM_LIBS) -rpath $(libdir) -o $@
+
+box-dynamic-module/box.lo: box-dynamic-module/box.c
+ -$(MKDIR_P) box-dynamic-module
+ $(top_builddir)/libtool --mode=compile $(CC) $(AM_CFLAGS) -c $< -o $@
+
+
+installcheck: box/box box-module/box libbox.la libbox-module.la
+ LD_LIBRARY_PATH="$(libdir):$$LD_LIBRARY_PATH" \
+ LTDL_LIBRARY_PATH="$(builddir):$$LTDL_LIBRARY_PATH" \
+ GUILE_LOAD_PATH="$(abs_top_srcdir):$$GUILE_LOAD_PATH" \
+ PATH="$(bindir):$$PATH" \
+ srcdir="$(srcdir)" \
+ $(srcdir)/check.test
+
+CLEANFILES = \
+ box/box box/box.o \
+ box-module/box box-module/box.o
+
+clean-local:
+ $(top_builddir)/libtool --mode=clean rm -f \
+ box-dynamic/box.lo libbox.la \
+ box-dynamic-module/box.lo libbox-module.la
diff --git a/examples/box-dynamic-module/Makefile.am b/examples/box-dynamic-module/Makefile.am
deleted file mode 100644
index bf18f4f66..000000000
--- a/examples/box-dynamic-module/Makefile.am
+++ /dev/null
@@ -1,36 +0,0 @@
-## Process this file with Automake to create Makefile.in
-##
-## Copyright (C) 2001, 2006 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
-
-EXTRA_DIST = README box.c box-module.scm box-mixed.scm check.test
-
-CFLAGS=`$(bindir)/guile-config compile`
-LIBS=`$(bindir)/guile-config link`
-
-libbox-module: box.lo
- sh ../../libtool --mode=link $(CC) $< $(LIBS) -rpath $(libdir) -o libbox-module.la
-
-box.lo: box.c
- sh ../../libtool --mode=compile $(CC) $(CFLAGS) -c $<
-
-installcheck: libbox-module
- LTDL_LIBRARY_PATH=.libs GUILE_LOAD_PATH=$(top_srcdir):$(srcdir) $(srcdir)/check.test
-
-CLEANFILES=libbox-module.la box.lo box.o
diff --git a/examples/box-dynamic-module/check.test b/examples/box-dynamic-module/check.test
deleted file mode 100755
index 935176d20..000000000
--- a/examples/box-dynamic-module/check.test
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/sh
-
-# must be run from this directory
-guile=${GUILE-../../libguile/guile}
-
-set -e
-
-#
-# ./box test #1
-#
-$guile -c '(begin (use-modules (box-module)) (let ((b (make-box))) (display b) (newline)))' > TMP
-cat <<EOF | diff -u - TMP
-#<box #f>
-EOF
-rm -f TMP
-
-#
-# ./box test #2
-#
-$guile -c '(begin (use-modules (box-module)) (let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline)))' > TMP
-cat <<EOF | diff -u - TMP
-#<box #f>
-#<box 1>
-EOF
-rm -f TMP
-
-#
-# ./box test #3
-#
-$guile -c '(begin (use-modules (box-module)) (let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline) (display (box-ref b)) (newline)))' > TMP
-cat <<EOF | diff -u - TMP
-#<box #f>
-#<box 1>
-1
-EOF
-rm -f TMP
-
-#
-# ./box test #4
-#
-$guile -c '(begin (use-modules (box-mixed)) (let ((b (make-box-list 1 2 3))) (display b) (newline) (display (box-map 1+ b)) (newline)))' > TMP
-cat <<EOF | diff -u - TMP
-(#<box 1> #<box 2> #<box 3>)
-(#<box 2> #<box 3> #<box 4>)
-EOF
-rm -f TMP
-
-# check.test ends here
diff --git a/examples/box-dynamic/Makefile.am b/examples/box-dynamic/Makefile.am
deleted file mode 100644
index 6fa20c59c..000000000
--- a/examples/box-dynamic/Makefile.am
+++ /dev/null
@@ -1,36 +0,0 @@
-## Process this file with Automake to create Makefile.in
-##
-## Copyright (C) 2001, 2006 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
-
-EXTRA_DIST = README box.c check.test
-
-CFLAGS=`$(bindir)/guile-config compile`
-LIBS=`$(bindir)/guile-config link`
-
-libbox: box.lo
- sh ../../libtool --mode=link $(CC) $< $(LIBS) -rpath $(libdir) -o libbox.la
-
-box.lo: box.c
- sh ../../libtool --mode=compile $(CC) $(CFLAGS) -c $<
-
-installcheck: libbox
- LTDL_LIBRARY_PATH=.libs GUILE_LOAD_PATH=$(top_srcdir):$(srcdir) $(srcdir)/check.test
-
-CLEANFILES=libbox.la box.lo box.o
diff --git a/examples/box-dynamic/check.test b/examples/box-dynamic/check.test
deleted file mode 100755
index c0923365c..000000000
--- a/examples/box-dynamic/check.test
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-
-# must be run from this directory
-guile=${GUILE-../../libguile/guile}
-
-set -e
-
-#
-# ./box test #1
-#
-$guile -c '(begin (load-extension "libbox" "scm_init_box") (let ((b (make-box))) (display b) (newline)))' > TMP
-cat <<EOF | diff -u - TMP
-#<box #f>
-EOF
-rm -f TMP
-
-#
-# ./box test #2
-#
-$guile -c '(begin (load-extension "libbox" "scm_init_box") (let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline)))' > TMP
-cat <<EOF | diff -u - TMP
-#<box #f>
-#<box 1>
-EOF
-rm -f TMP
-
-#
-# ./box test #3
-#
-$guile -c '(begin (load-extension "libbox" "scm_init_box") (let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline) (display (box-ref b)) (newline)))' > TMP
-cat <<EOF | diff -u - TMP
-#<box #f>
-#<box 1>
-1
-EOF
-rm -f TMP
-
-# check.test ends here
diff --git a/examples/box-module/Makefile.am b/examples/box-module/Makefile.am
deleted file mode 100644
index 4790a296c..000000000
--- a/examples/box-module/Makefile.am
+++ /dev/null
@@ -1,36 +0,0 @@
-## Process this file with Automake to create Makefile.in
-##
-## Copyright (C) 2001, 2006 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
-
-EXTRA_DIST = README box.c check.test
-
-CFLAGS=`$(bindir)/guile-config compile`
-LIBS=`$(bindir)/guile-config link`
-
-box: box.o
- $(CC) $< $(LIBS) -o box
-
-box.o: box.c
- $(CC) $(CFLAGS) -c $<
-
-installcheck: box
- LD_LIBRARY_PATH=$(libdir) GUILE_LOAD_PATH=$(top_srcdir) $(srcdir)/check.test
-
-CLEANFILES=box box.o
diff --git a/examples/box-module/check.test b/examples/box-module/check.test
deleted file mode 100755
index 28a79d45b..000000000
--- a/examples/box-module/check.test
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-
-# must be run from this directory
-guile=${GUILE-../../libguile/guile}
-
-set -e
-
-#
-# ./box test #1
-#
-./box -c '(begin (use-modules (box-module)) (let ((b (make-box))) (display b) (newline)))' > TMP
-cat <<EOF | diff -u - TMP
-#<box #f>
-EOF
-rm -f TMP
-
-#
-# ./box test #2
-#
-./box -c '(begin (use-modules (box-module)) (let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline)))' > TMP
-cat <<EOF | diff -u - TMP
-#<box #f>
-#<box 1>
-EOF
-rm -f TMP
-
-#
-# ./box test #3
-#
-./box -c '(begin (use-modules (box-module)) (let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline) (display (box-ref b)) (newline)))' > TMP
-cat <<EOF | diff -u - TMP
-#<box #f>
-#<box 1>
-1
-EOF
-rm -f TMP
-
-# check.test ends here
diff --git a/examples/box/Makefile.am b/examples/box/Makefile.am
deleted file mode 100644
index 4790a296c..000000000
--- a/examples/box/Makefile.am
+++ /dev/null
@@ -1,36 +0,0 @@
-## Process this file with Automake to create Makefile.in
-##
-## Copyright (C) 2001, 2006 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
-
-EXTRA_DIST = README box.c check.test
-
-CFLAGS=`$(bindir)/guile-config compile`
-LIBS=`$(bindir)/guile-config link`
-
-box: box.o
- $(CC) $< $(LIBS) -o box
-
-box.o: box.c
- $(CC) $(CFLAGS) -c $<
-
-installcheck: box
- LD_LIBRARY_PATH=$(libdir) GUILE_LOAD_PATH=$(top_srcdir) $(srcdir)/check.test
-
-CLEANFILES=box box.o
diff --git a/examples/box/check.test b/examples/box/check.test
deleted file mode 100755
index 1909ffb7e..000000000
--- a/examples/box/check.test
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-
-# must be run from this directory
-guile=${GUILE-../../libguile/guile}
-
-set -e
-
-#
-# ./box test #1
-#
-./box -c '(let ((b (make-box))) (display b) (newline))' > TMP
-cat <<EOF | diff -u - TMP
-#<box #f>
-EOF
-rm -f TMP
-
-#
-# ./box test #2
-#
-./box -c '(let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline))' > TMP
-cat <<EOF | diff -u - TMP
-#<box #f>
-#<box 1>
-EOF
-rm -f TMP
-
-#
-# ./box test #3
-#
-./box -c '(let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline) (display (box-ref b)) (newline))' > TMP
-cat <<EOF | diff -u - TMP
-#<box #f>
-#<box 1>
-1
-EOF
-rm -f TMP
-
-# check.test ends here
diff --git a/examples/check.test b/examples/check.test
new file mode 100755
index 000000000..b659ce8dc
--- /dev/null
+++ b/examples/check.test
@@ -0,0 +1,238 @@
+#!/bin/sh
+
+# must be run from this directory
+guile=${GUILE-../libguile/guile}
+if [ -x $guile ] ; then
+ :
+else
+ echo could not find guile interpreter.
+ echo '(are you running this script from' `dirname $0` '?)'
+ echo GUILE env var: ${GUILE-not set}
+ exit 1
+fi
+
+if test "X$srcdir" = X; then
+ srcdir=.
+fi
+
+set -e
+
+#
+# simple-hello.scm
+#
+$guile -s $srcdir/scripts/simple-hello.scm > TMP
+cat <<EOF | diff -u - TMP
+Hello, World!
+EOF
+rm -f TMP
+
+#
+# hello
+#
+$guile -s $srcdir/scripts/hello > TMP
+echo "Hello, World!" | diff -u - TMP
+rm -f TMP
+
+$guile -s $srcdir/scripts/hello --version > TMP
+echo "hello 0.0.1" | diff -u - TMP
+rm -f TMP
+
+$guile -s $srcdir/scripts/hello --help > TMP
+cat <<EOF | diff -u - TMP
+Usage: hello [options...]
+ --help, -h Show this usage information
+ --version, -v Show version information
+EOF
+rm -f TMP
+
+#
+# fact
+#
+case `$guile -s $srcdir/scripts/fact 5` in 120) ;; *) echo $0: error: fact 5 ;; esac
+
+
+#
+# ./box/box test #1
+#
+./box/box -c '(let ((b (make-box))) (display b) (newline))' > TMP
+cat <<EOF | diff -u - TMP
+#<box #f>
+EOF
+rm -f TMP
+
+#
+# ./box/box test #2
+#
+./box/box -c '(let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline))' > TMP
+cat <<EOF | diff -u - TMP
+#<box #f>
+#<box 1>
+EOF
+rm -f TMP
+
+#
+# ./box/box test #3
+#
+./box/box -c '(let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline) (display (box-ref b)) (newline))' > TMP
+cat <<EOF | diff -u - TMP
+#<box #f>
+#<box 1>
+1
+EOF
+rm -f TMP
+
+
+
+#
+# ./box-module/box test #1
+#
+./box-module/box -c '(begin (use-modules (box-module)) (let ((b (make-box))) (display b) (newline)))' > TMP
+cat <<EOF | diff -u - TMP
+#<box #f>
+EOF
+rm -f TMP
+
+#
+# ./box-module/box test #2
+#
+./box-module/box -c '(begin (use-modules (box-module)) (let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline)))' > TMP
+cat <<EOF | diff -u - TMP
+#<box #f>
+#<box 1>
+EOF
+rm -f TMP
+
+#
+# ./box-module/box test #3
+#
+./box-module/box -c '(begin (use-modules (box-module)) (let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline) (display (box-ref b)) (newline)))' > TMP
+cat <<EOF | diff -u - TMP
+#<box #f>
+#<box 1>
+1
+EOF
+rm -f TMP
+
+
+#
+# ./box-dynamic/box test #1
+#
+$guile -c '(begin (load-extension "libbox" "scm_init_box") (let ((b (make-box))) (display b) (newline)))' > TMP
+cat <<EOF | diff -u - TMP
+#<box #f>
+EOF
+rm -f TMP
+
+#
+# ./box-dynamic/box test #2
+#
+$guile -c '(begin (load-extension "libbox" "scm_init_box") (let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline)))' > TMP
+cat <<EOF | diff -u - TMP
+#<box #f>
+#<box 1>
+EOF
+rm -f TMP
+
+#
+# ./box-dynamic/box test #3
+#
+$guile -c '(begin (load-extension "libbox" "scm_init_box") (let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline) (display (box-ref b)) (newline)))' > TMP
+cat <<EOF | diff -u - TMP
+#<box #f>
+#<box 1>
+1
+EOF
+rm -f TMP
+
+
+#
+# ./box-dynamic-module/box test #1
+#
+$guile -L $srcdir/box-dynamic-module \
+ -c '(begin (use-modules (box-module)) (let ((b (make-box))) (display b) (newline)))' > TMP
+cat <<EOF | diff -u - TMP
+#<box #f>
+EOF
+rm -f TMP
+
+#
+# ./box-dynamic-module/box test #2
+#
+$guile -L $srcdir/box-dynamic-module \
+ -c '(begin (use-modules (box-module)) (let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline)))' > TMP
+cat <<EOF | diff -u - TMP
+#<box #f>
+#<box 1>
+EOF
+rm -f TMP
+
+#
+# ./box-dynamic-module/box test #3
+#
+$guile -L $srcdir/box-dynamic-module \
+ -c '(begin (use-modules (box-module)) (let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline) (display (box-ref b)) (newline)))' > TMP
+cat <<EOF | diff -u - TMP
+#<box #f>
+#<box 1>
+1
+EOF
+rm -f TMP
+
+#
+# ./box-dynamic-module/box test #4
+#
+$guile -L $srcdir/box-dynamic-module \
+ -c '(begin (use-modules (box-mixed)) (let ((b (make-box-list 1 2 3))) (display b) (newline) (display (box-map 1+ b)) (newline)))' > TMP
+cat <<EOF | diff -u - TMP
+(#<box 1> #<box 2> #<box 3>)
+(#<box 2> #<box 3> #<box 4>)
+EOF
+rm -f TMP
+
+
+
+#
+# ./main test
+#
+$guile -L $srcdir/modules -s $srcdir/modules/main > TMP
+cat <<EOF | diff -u - TMP
+module-0 foo
+module-0 bar
+module-1 foo
+module-1 bar
+module-2 braz
+module-2 braz
+module-2 foo
+EOF
+rm -f TMP
+
+
+#
+# ./safe untrusted.scm
+#
+$guile -s $srcdir/safe/safe $srcdir/safe/untrusted.scm > TMP
+cat <<EOF | diff -u - TMP
+1
+1
+2
+6
+24
+120
+720
+5040
+40320
+362880
+3628800
+EOF
+rm -f TMP
+
+#
+# ./safe evil.scm
+#
+$guile -s $srcdir/safe/safe $srcdir/safe/evil.scm > TMP
+cat <<EOF | diff -u - TMP
+** Exception: (unbound-variable #f "Unbound variable: ~S" (open-input-file) #f)
+EOF
+rm -f TMP
+
+# check.test ends here
diff --git a/examples/modules/Makefile.am b/examples/modules/Makefile.am
deleted file mode 100644
index 80b829b03..000000000
--- a/examples/modules/Makefile.am
+++ /dev/null
@@ -1,25 +0,0 @@
-## Process this file with Automake to create Makefile.in
-##
-## Copyright (C) 2001, 2006 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
-
-EXTRA_DIST = README module-0.scm module-1.scm module-2.scm main check.test
-
-installcheck:
- srcdir=$(srcdir) GUILE_LOAD_PATH=$(top_srcdir):$(srcdir) $(srcdir)/check.test
diff --git a/examples/modules/check.test b/examples/modules/check.test
deleted file mode 100755
index f7a789b69..000000000
--- a/examples/modules/check.test
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# must be run from this directory
-guile=${GUILE-../../libguile/guile}
-
-if test "X$srcdir" = X; then
- srcdir=.
-fi
-
-set -e
-
-#
-# ./main test
-#
-$guile -s $srcdir/main > TMP
-cat <<EOF | diff -u - TMP
-module-0 foo
-module-0 bar
-module-1 foo
-module-1 bar
-module-2 braz
-module-2 braz
-module-2 foo
-EOF
-rm -f TMP
-
-# check.test ends here
diff --git a/examples/safe/Makefile.am b/examples/safe/Makefile.am
deleted file mode 100644
index a2e966296..000000000
--- a/examples/safe/Makefile.am
+++ /dev/null
@@ -1,25 +0,0 @@
-## Process this file with Automake to create Makefile.in
-##
-## Copyright (C) 2001, 2006 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
-
-EXTRA_DIST = README safe untrusted.scm evil.scm check.test
-
-installcheck:
- srcdir=$(srcdir) GUILE_LOAD_PATH=$(top_srcdir) $(srcdir)/check.test
diff --git a/examples/safe/check.test b/examples/safe/check.test
deleted file mode 100755
index 9e5f192d8..000000000
--- a/examples/safe/check.test
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/sh
-
-# must be run from this directory
-guile=${GUILE-../../libguile/guile}
-
-if test "X$srcdir" = X; then
- srcdir=.
-fi
-
-set -e
-
-#
-# ./safe untrusted.scm
-#
-$guile -s $srcdir/safe $srcdir/untrusted.scm > TMP
-cat <<EOF | diff -u - TMP
-1
-1
-2
-6
-24
-120
-720
-5040
-40320
-362880
-3628800
-EOF
-rm -f TMP
-
-#
-# ./safe evil.scm
-#
-$guile -s $srcdir/safe $srcdir/evil.scm > TMP
-cat <<EOF | diff -u - TMP
-** Exception: (unbound-variable #f "Unbound variable: ~S" (open-input-file) #f)
-EOF
-rm -f TMP
-
-# check.test ends here
diff --git a/examples/scripts/Makefile.am b/examples/scripts/Makefile.am
deleted file mode 100644
index cd588f543..000000000
--- a/examples/scripts/Makefile.am
+++ /dev/null
@@ -1,25 +0,0 @@
-## Process this file with Automake to create Makefile.in
-##
-## Copyright (C) 2001, 2006 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
-
-EXTRA_DIST = README simple-hello.scm hello fact check.test
-
-installcheck:
- srcdir=$(srcdir) GUILE_LOAD_PATH=$(top_srcdir) $(srcdir)/check.test
diff --git a/examples/scripts/check.test b/examples/scripts/check.test
deleted file mode 100755
index 2a3e753d6..000000000
--- a/examples/scripts/check.test
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/sh
-
-# must be run from this directory
-guile=${GUILE-../../libguile/guile}
-if [ -x $guile ] ; then
- :
-else
- echo could not find guile interpreter.
- echo '(are you running this script from' `dirname $0` '?)'
- echo GUILE env var: ${GUILE-not set}
- exit 1
-fi
-
-if test "X$srcdir" = X; then
- srcdir=.
-fi
-
-set -e
-
-#
-# simple-hello.scm
-#
-$guile -s $srcdir/simple-hello.scm > TMP
-cat <<EOF | diff -u - TMP
-Hello, World!
-EOF
-rm -f TMP
-
-#
-# hello
-#
-$guile -s $srcdir/hello > TMP
-echo "Hello, World!" | diff -u - TMP
-rm -f TMP
-
-$guile -s $srcdir/hello --version > TMP
-echo "hello 0.0.1" | diff -u - TMP
-rm -f TMP
-
-$guile -s $srcdir/hello --help > TMP
-cat <<EOF | diff -u - TMP
-Usage: hello [options...]
- --help, -h Show this usage information
- --version, -v Show version information
-EOF
-rm -f TMP
-
-#
-# fact
-#
-case `$guile -s $srcdir/fact 5` in 120) ;; *) echo $0: error: fact 5 ;; esac
-
-# check.test ends here