1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-29 19:30:36 +02:00

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.
This commit is contained in:
Ludovic Courtès 2009-03-20 01:11:16 +01:00
parent 020348bb87
commit 0ea47a3a09
17 changed files with 311 additions and 512 deletions

View file

@ -1532,13 +1532,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
lang/Makefile
libguile/Makefile

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

238
examples/check.test Executable file
View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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