1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-05 23:20:38 +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 8760f4694d
commit 9a84dc8bbc
17 changed files with 311 additions and 512 deletions

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