1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-16 16:50:21 +02:00

All examples are now built and tested on `make installcheck'

rather than `make check'.
This commit is contained in:
Martin Grabmüller 2001-07-24 10:43:34 +00:00
parent ba7562306f
commit 1321f4ff18
15 changed files with 87 additions and 58 deletions

View file

@ -19,20 +19,18 @@
## to the Free Software Foundation, Inc., 59 Temple Place, Suite
## 330, Boston, MA 02111-1307 USA
all: libbox-module
EXTRA_DIST = README box.c box-module.scm box-mixed.scm check.test
CFLAGS=-I../..
LIBS=`GUILE_LOAD_PATH=$(top_srcdir) $(top_builddir)/libguile/guile -e main -s $(top_builddir)/guile-config/guile-config link` -L$(top_builddir)/libguile -L$(top_builddir)/qt
TESTS = check.test
#CFLAGS=`guile-config compile`
#LIBS=`guile-config link`
CFLAGS=`$(bindir)/guile-config compile`
LIBS=`$(bindir)/guile-config link`
libbox-module: box.lo
sh ../../libtool --mode=link $(CC) $< $(LIBS) -rpath $(prefix)/lib -o libbox-module.la
sh ../../libtool --mode=link $(CC) $< $(LIBS) -rpath $(libdir) -o libbox-module.la
box.lo: box.c
sh ../../libtool --mode=compile $(CC) $(CFLAGS) -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

@ -8,7 +8,7 @@ set -e
#
# ./box test #1
#
LTDL_LIBRARY_PATH=.libs GUILE_LOAD_PATH=../..:. ../../libguile/guile -c '(begin (use-modules (box-module)) (let ((b (make-box))) (display b) (newline)))' > TMP
$guile -c '(begin (use-modules (box-module)) (let ((b (make-box))) (display b) (newline)))' > TMP
cat <<EOF | diff -u - TMP
#<box #f>
EOF
@ -17,7 +17,7 @@ rm -f TMP
#
# ./box test #2
#
LTDL_LIBRARY_PATH=.libs GUILE_LOAD_PATH=../..:. ../../libguile/guile -c '(begin (use-modules (box-module)) (let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline)))' > TMP
$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>
@ -27,7 +27,7 @@ rm -f TMP
#
# ./box test #3
#
LTDL_LIBRARY_PATH=.libs GUILE_LOAD_PATH=../..:. ../../libguile/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
$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>
@ -38,7 +38,7 @@ rm -f TMP
#
# ./box test #4
#
LTDL_LIBRARY_PATH=.libs GUILE_LOAD_PATH=../..:. ../../libguile/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
$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>)