unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: guile-devel@gnu.org
Subject: Re: Aggregated makefiles
Date: Fri, 20 Mar 2009 01:23:08 +0100	[thread overview]
Message-ID: <87skl9dour.fsf@gnu.org> (raw)
In-Reply-To: 874oy2ebhg.fsf@arudy.ossau.uklinux.net

[-- Attachment #1: Type: text/plain, Size: 103 bytes --]

Hello!

Attached is a patch that aggregates makefiles under `examples'.  OK to
apply?

Thanks,
Ludo'.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: The patch --]
[-- Type: text/x-patch, Size: 27197 bytes --]

From 90d6ba38a2741940afbf8408ef7f46180ef8262c Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org>
Date: Fri, 20 Mar 2009 01:11:16 +0100
Subject: [PATCH] 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.
---
 configure.in                            |    7 -
 examples/Makefile.am                    |   77 ++++++++++-
 examples/box-dynamic-module/Makefile.am |   36 -----
 examples/box-dynamic-module/check.test  |   48 ------
 examples/box-dynamic/Makefile.am        |   36 -----
 examples/box-dynamic/check.test         |   38 -----
 examples/box-module/Makefile.am         |   36 -----
 examples/box-module/check.test          |   38 -----
 examples/box/Makefile.am                |   36 -----
 examples/box/check.test                 |   38 -----
 examples/check.test                     |  238 +++++++++++++++++++++++++++++++
 examples/modules/Makefile.am            |   25 ----
 examples/modules/check.test             |   27 ----
 examples/safe/Makefile.am               |   25 ----
 examples/safe/check.test                |   40 -----
 examples/scripts/Makefile.am            |   25 ----
 examples/scripts/check.test             |   53 -------
 17 files changed, 311 insertions(+), 512 deletions(-)
 delete mode 100644 examples/box-dynamic-module/Makefile.am
 delete mode 100755 examples/box-dynamic-module/check.test
 delete mode 100644 examples/box-dynamic/Makefile.am
 delete mode 100755 examples/box-dynamic/check.test
 delete mode 100644 examples/box-module/Makefile.am
 delete mode 100755 examples/box-module/check.test
 delete mode 100644 examples/box/Makefile.am
 delete mode 100755 examples/box/check.test
 create mode 100755 examples/check.test
 delete mode 100644 examples/modules/Makefile.am
 delete mode 100755 examples/modules/check.test
 delete mode 100644 examples/safe/Makefile.am
 delete mode 100755 examples/safe/check.test
 delete mode 100644 examples/scripts/Makefile.am
 delete mode 100755 examples/scripts/check.test

diff --git a/configure.in b/configure.in
index 1073065..76ce928 100644
--- a/configure.in
+++ b/configure.in
@@ -1527,13 +1527,6 @@ AC_CONFIG_FILES([
   doc/tutorial/Makefile
   emacs/Makefile
   examples/Makefile
-  examples/box-dynamic-module/Makefile
-  examples/box-dynamic/Makefile
-  examples/box-module/Makefile
-  examples/box/Makefile
-  examples/modules/Makefile
-  examples/safe/Makefile
-  examples/scripts/Makefile
   guile-config/Makefile
   ice-9/Makefile
   ice-9/debugger/Makefile
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 8450308..1b995b5 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 bf18f4f..0000000
--- 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 935176d..0000000
--- 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 6fa20c5..0000000
--- 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 c092336..0000000
--- 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 4790a29..0000000
--- 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 28a79d4..0000000
--- 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 4790a29..0000000
--- 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 1909ffb..0000000
--- 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 0000000..b659ce8
--- /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 80b829b..0000000
--- 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 f7a789b..0000000
--- 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 a2e9662..0000000
--- 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 9e5f192..0000000
--- 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 cd588f5..0000000
--- 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 2a3e753..0000000
--- 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
-- 
1.6.1.3


  reply	other threads:[~2009-03-20  0:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-08 21:39 Aggregated makefiles Ludovic Courtès
2009-03-09 19:34 ` Neil Jerram
2009-03-20  0:23   ` Ludovic Courtès [this message]
2009-03-24 20:34     ` Neil Jerram
2009-03-24 22:57       ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87skl9dour.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).