+2010-11-11 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Enable `set -e' in more tests (plus some tweakings).
+ * tests/implicit.test: Enable `errexit' shell flag, and related
+ changes. Add trailing `:' command.
+ * tests/insh2.test: Likewise.
+ * tests/instman2.test: Likewise.
+ * tests/interp.test: Likewise.
+ * tests/interp2.test: Likewise.
+ * tests/library.test: Likewise.
+ * tests/mclean.test: Likewise.
+ * tests/info.test: Enable `errexit' shell flag, and related
+ changes. Add trailing `:' command. Remove useless chaff from
+ generated Makefile.am. Add a "FIXME" comment.
+ * tests/include.test: Enable `errexit' shell flag, and related
+ changes. Add trailing `:' command. Prefer cat + here-doc over
+ echo to append to configure.in. Make tests more robust by using
+ longer and less common names to grep. Remove an useless call to
+ echo. Remove an useless subshell.
+ * tests/header.test: Enable `errexit' shell flag, and related
+ changes. Use proper m4 quoting. Add excerpts from the original
+ report of the bug tested for by this script.
+ * tests/gcj.test: Enable `errexit' shell flag, and related
+ changes. Use proper m4 quoting. Add trailing `:' command.
+ * tests/gcj3.test: Likewise.
+ * tests/ldflags.test: Likewise.
+ * tests/libtool.test: Likewise.
+ * tests/listval.test: Likewise.
+ * tests/javaprim.test: Likewise, and prefer cat + here-doc over
+ echo to append to configure.in.
+ * tests/javasubst.test: Likewise.
+ * tests/discorver.test: Enable `errexit' shell flag. Prefer
+ trailing `:' over trailing `Exit 0'.
+ * tests/instdat.test: Enable `errexit' shell flag, and related
+ changes. Use proper m4 quoting. Avoid usless subshell. Prefer
+ cat + here-doc over echo to append to configure.in.
+ * tests/libtool2.test: Enable `errexit' shell flag, and related
+ changes. Add trailing `:' command. Use the configure.in
+ stub provided by ./defs, rather than writing it from scratch.
+
2010-11-07 Stefano Lattarini <stefano.lattarini@gmail.com>
Fix a bug in variable concatanation with `+='.
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_RANLIB
AC_PROG_CC
grep 'automatically discovered.*fsusage\.c.*explicitly mentioned' stderr
-Exit 0
+:
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
-_AM_DEPENDENCIES(GCJ)
-AC_SUBST(GCJ)
+_AM_DEPENDENCIES([GCJ])
+AC_SUBST([GCJ])
END
cat > Makefile.am << 'END'
convert_SOURCES = x/y/convert.java
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^x/y/convert' Makefile.in
+
+:
#! /bin/sh
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
-_AM_DEPENDENCIES(GCJ)
-AC_SUBST(GCJ)
+_AM_DEPENDENCIES([GCJ])
+AC_SUBST([GCJ])
END
cat > Makefile.am << 'END'
convert_SOURCES = x/y/convert.java
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
num=`grep depcomp Makefile.in | wc -l`
test $num -gt 1
+
+:
#! /bin/sh
-# Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Test for PR 68.
+#
+# == Report ==
+# If an autoconf substitution variable of the form "*_HEADERS" --
+# for example "MY_HEADERS" -- is used in an "include_" variable
+# in conjunction with EXTRA_HEADERS, $(MY_HEADERS) gets included
+# in the HEADERS variable for *all* generated Makefile.ins in the
+# project.
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
-AC_SUBST(MY_HEADERS)
+AC_SUBST([MY_HEADERS])
AC_PROG_CC
END
: > joe.c
: > qq.h
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '[^@]MY_HEADERS' Makefile.in && Exit 1
Exit 0
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_CC
END
noinst_PROGRAMS = libapp_1
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^libapp_1_OBJECTS' Makefile.in | $FGREP '.$(OBJEXT)'
+
+:
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2005, 2006, 2010 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
. ./defs || Exit 1
-echo AC_OUTPUT >> configure.in
+set -e
+
+cat >> configure.in <<END
+AC_OUTPUT
+END
cat > Makefile.am << 'END'
-include foo
+include Will_Be_Included_In_Makefile
END
-: > foo
+: > Will_Be_Included_In_Makefile
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
-len="`grep '^srcdir' Makefile.in | wc -l`"
-echo "len = $len"
-test $len -eq 1 || Exit 1
+$ACLOCAL
+$AUTOMAKE
+len=`grep '^srcdir' Makefile.in | wc -l`
+test $len -eq 1
# Also make sure include file is distributed.
-(sed -n -e '/^DIST_COMMON =.*\\$/ {
+sed -n -e '/^DIST_COMMON =.*\\$/ {
:loop
p
n
t loop
p
n
- }' -e '/^DIST_COMMON =/ p' Makefile.in | grep foo)
+ }' -e '/^DIST_COMMON =/ p' Makefile.in | grep Will_Be_Included_In_Makefile
+
+:
#! /bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2001, 2002, 2010 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Test to make sure info files are distributed correctly.
+# FIXME: This test is probably obsoleted, or wrong. The generated
+# Makefile.in seems not to define any `INFOS' variable!
. ./defs || Exit 1
+set -e
+
cat > Makefile.am << 'END'
info_TEXINFOS = foo.texi
-
-magic:
- @echo $(INFOS)
END
echo '@setfilename foo.info' > foo.texi
: > texinfo.tex
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
for i in `grep '^INFOS =' Makefile.in | sed -e 's/^INFOS = //'`; do
echo $i
;;
esac
done
+
+:
#! /bin/sh
-# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2010 Free
+# Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
. ./defs || Exit 1
+set -e
+
cat > Makefile.am << 'END'
pkgdata_DATA =
magic:
@echo $(DISTFILES)
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
$FGREP -v @SET_MAKE@ Makefile.in > Makefile.sed
$MAKE -s -f Makefile.sed SHELL=$SHELL magic | grep install-sh
+
+:
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
. ./defs || Exit 1
-echo 'AC_SUBST(INSTALL_DATA)' >> configure.in
+set -e
+
+cat >> configure.in <<END
+AC_SUBST([INSTALL_DATA])
+END
: > Makefile.am
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
-(grep '^DATA =' Makefile.in | grep INSTALL_DATA) && Exit 1
+grep '^DATA =' Makefile.in | grep 'INSTALL_DATA' && Exit 1
Exit 0
#! /bin/sh
-# Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
. ./defs || Exit 1
+set -e
+
cat > Makefile.am << 'EOF'
man8_MANS = frob.8
EOF
: > frob.8
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^install-man' Makefile.in
+
+:
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_CC
END
qqq_SOURCES = $(s1)
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
$FGREP 'z.$(OBJEXT)' Makefile.in
+
+:
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_CC
AC_PATH_X
x_LDADD = $(X_EXTRA_LIBS)
END
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
. ./defs || Exit 1
-echo 'AC_SUBST(JAVA)' >> configure.in
+set -e
+
+cat >> configure.in << 'END'
+AC_SUBST([JAVA])
+END
cat > Makefile.am << 'END'
javadir = $(datadir)/java
java_JAVA = a.java b.java c.java
END
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
. ./defs || Exit 1
-echo 'AC_SUBST(JAVAC)' >> configure.in
+set -e
+
+cat >> configure.in << 'END'
+AC_SUBST([JAVAC])
+END
cat > Makefile.am << 'END'
javadir = $(datadir)/java
java_JAVA = a.java b.java c.java
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep 'JAVAC.*@JAVAC@' Makefile.in
+
+:
#! /bin/sh
-# Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# Check for LDFLAGS in conditional.
# PR 77.
+
required=libtool
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_LIBTOOL
AC_SUBST([LTLIBOBJS], [q.o])
-AM_CONDITIONAL(USE_SWIG, :)
+AM_CONDITIONAL([USE_SWIG], [:])
AC_OUTPUT
END
: > config.sub
: > q.c
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2008 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2008, 2010 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_RANLIB
AM_MAINTAINER_MODE
libfoo_a_DEPENDENCIES = libzot.a
END
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
#! /bin/sh
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# Make sure libtool is removed.
# Report from Kevin Dalley
+
required=libtool
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_LIBTOOL_DLOPEN
AC_DISABLE_SHARED
AC_PROG_LIBTOOL
-AC_SUBST(LIBTOOL_DEPS)
+AC_SUBST([LIBTOOL_DEPS])
END
: > Makefile.am
: > config.guess
: > config.sub
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep 'rm -f libtool' Makefile.in
+
+:
#! /bin/sh
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# Make sure libtool clean targets exist.
# Report from Eric Magnien.
+
required=libtoolize
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(mypackage,0.1)
+set -e
+cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_LIBTOOL
-
-AC_CONFIG_FILES([
- sub/Makefile
- Makefile
-])
+AC_CONFIG_FILES([sub/Makefile])
AC_OUTPUT
END
libfoo_la_SOURCES = foo.c
END
-$ACLOCAL || Exit 1
+$ACLOCAL
: > ltmain.sh
-$AUTOMAKE -a || Exit 1
+$AUTOMAKE -a
grep 'rm -f .*\.lo' sub/Makefile.in
+
+:
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# Test to make sure variable is expanded properly.
# From Adam J. Richter.
+
required=libtool
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
-AC_SUBST(LTLIBOBJS)
+AC_SUBST([LTLIBOBJS])
AC_PROG_LIBTOOL
END
: > config.guess
: > config.sub
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
. ./defs || Exit 1
+set -e
+
cat > Makefile.am << 'END'
MAINTAINERCLEANFILES = foo
END
: > FOO
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep 'rm -f .*MAINTAINERCLEANFILES' Makefile.in
+
+: