+2003-01-13 Alexandre Duret-Lutz <adl@gnu.org>
+
+ * tests/gnits2.test, tests/pr300-prog.test, tests/transform.test:
+ Move all `test -f' into Makefiles, so we can honor $(EXEEXT) when
+ testing for programs.
+ Reported by Richard Dawe.
+
2003-01-10 Alexandre Duret-Lutz <adl@gnu.org>
* Makefile.am (maintainer-check): Suggest using $sleep instead of
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
## Only three failures please.
test `grep 'does not support --help' stderr | wc -l` = 3
test `grep 'does not support --version' stderr | wc -l` = 3
+
+test-install: install
+ test -f ../inst-dir/bin/pfine$(EXEEXT)
+ test ! -f ../inst-dir/bin/fine$(EXEEXT)
END
echo 'int main () { return 0; }' > fubar.c
# Use --program-prefix to make sure the std-options check honors it.
../configure --prefix=`pwd`/../inst-dir --program-prefix=p
$MAKE all
-$MAKE install
-test -f ../inst-dir/bin/pfine
-test ! -f ../inst-dir/bin/fine
+$MAKE test-install
$MAKE -k installcheck 2>stderr || : # Never trust the exit status of make -k.
cat stderr
$MAKE grep-stderr
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
nobase_bin_PROGRAMS = subdir/want
subdir_want_SOURCES = a.c
+
+test-all: all
+ test -f subdir/wish$(EXEEXT)
+ test -f subdir/want$(EXEEXT)
+test-install: install
+ test -f inst/bin/wish$(EXEEXT)
+ test -f inst/bin/subdir/want$(EXEEXT)
+test-uninstall: uninstall
+ test ! -f inst/bin/wish$(EXEEXT)
+ test ! -f inst/bin/subdir/want$(EXEEXT)
+test-install-strip: install-strip
+ test -f inst/bin/wish$(EXEEXT)
+ test -f inst/bin/subdir/want$(EXEEXT)
END
cat > a.c << 'END'
$AUTOCONF
$AUTOMAKE --copy --add-missing
./configure --prefix `pwd`/inst
-$MAKE
-
-test -f subdir/wish
-test -f subdir/want
-
-$MAKE install
-
-test -f inst/bin/wish
-test -f inst/bin/subdir/want
-
-$MAKE uninstall
-
-test -f inst/bin/wish && exit 1
-test -f inst/bin/subdir/want && exit 1
-
-$MAKE install-strip
-
-test -f inst/bin/wish
-test -f inst/bin/subdir/want
+$MAKE test-all
+$MAKE test-install
+$MAKE test-uninstall
+$MAKE test-install-strip
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
bin_PROGRAMS = h
bin_SCRIPTS = h.sh
man_MANS = h.1
+
+test-install: install
+ test -f inst/bin/gnu-h$(EXEEXT)
+ test -f inst/bin/gnu-h.sh
+ test -f inst/man/man1/gnu-h.1
EOF
cat >h.c <<'EOF'
./configure --program-prefix=gnu- --prefix `pwd`/inst
$MAKE
-$MAKE install
-test -f inst/bin/gnu-h
-test -f inst/bin/gnu-h.sh
-test -f inst/man/man1/gnu-h.1
+$MAKE test-install
$MAKE uninstall
test `find inst/foo -type f -print | wc -l` = 0