+2010-11-08 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Minor improvements and extensions to various tests.
+ * tests/defun.test: Also run autoconf and grep the generated
+ configure to make sure that aclocal truly picks up all the
+ required macros.
+ * tests/compile_f_c_cxx.test: Prefer trailing `:' over trailing
+ `Exit 0'. Do not create useless dummy source files. Do not set
+ useless `$(foo_LDADD)' variable in `Makefile.am'. Do not call
+ useless macro `AC_F77_LIBRARY_LDFLAGS' in `configure.in'.
+ * tests/compile_f90_c_cxx.test: Likewise.
+ * tests/suffix10.test: Slighty stricter grepping of make output.
+ * tests/compile.test: Add trailing `:' command.
+ * tests/defun2.test: Likewise.
+ * tests/vars3.test: Likewise.
+ * tests/vartar.test: Likewise.
+ * tests/vars.test: Likewise. Also, extend test by checking
+ that the definition of `MY_FLAGS*' variables is preserved in
+ the generated `Makefile.in'.
+ * tests/stamph2.test: Prefer trailing `:' over trailing `Exit 0'.
+ Use proper m4 quoting in `configure.in'.
+
2010-08-18 Stefano Lattarini <stefano.lattarini@gmail.com>
Fix potential regressions in depcomp{3,5}.test.
#! /bin/sh
-# Copyright (C) 2004, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2007, 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
./compile touch a.obj -- -o ac.obj a.c
test ! -f a.obj
test ac.obj
+
+:
AC_PROG_CC
AC_PROG_CXX
AC_PROG_FC
-AC_FC_LIBRARY_LDFLAGS
END
cat > Makefile.am << 'END'
bin_PROGRAMS = foo
foo_SOURCES = foo.f90 bar.c baz.cc
-foo_LDADD = @FLIBS@
END
-: > foo.f90
-: > bar.c
-: > baz.cc
-
$ACLOCAL
$AUTOMAKE
$FGREP ' $(CXXCOMPILE)' Makefile.in
$FGREP ' $(FCCOMPILE)' Makefile.in
-Exit 0
+:
cat > Makefile.am << 'END'
bin_PROGRAMS = foo
foo_SOURCES = foo.f bar.c baz.cc
-foo_LDADD = @FLIBS@
END
-: > foo.f
-: > bar.c
-: > baz.cc
-
$ACLOCAL
$AUTOMAKE
$FGREP ' $(CXXCOMPILE)' Makefile.in
$FGREP ' $(F77COMPILE)' Makefile.in
-Exit 0
+:
set -e
cat > acinclude.m4 << 'END'
-AC_DEFUN([AM_FUNC_TWO])
+AC_DEFUN([AM_FUNC_THREE])
+AC_DEFUN([AM_FUNC_TWO], [@!GrepThisString!@AM_FUNC_THREE])
AC_DEFUN([AM_FUNC_ONE], [AC_REQUIRE([AM_FUNC_TWO])])
END
+cat >>configure.in << 'END'
+AM_FUNC_ONE
+END
+
$ACLOCAL
+$AUTOCONF
+grep '^@!GrepThisString!@$' configure
+
+:
#! /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
set -e
cat >> configure.in << END
-AM_CONFIG_HEADER(1.h
- 2.h:config.hin
- 3.h:sdir1/config1.hin)
+AM_CONFIG_HEADER([1.h
+ 2.h:config.hin
+ 3.h:sdir1/config1.hin])
# AM_CONFIG_HEADER and AC_CONFIG_HEADERS should be synonyms.
-AC_CONFIG_HEADERS(sdir1/4.h
- sdir1/5.h:config.hin
- sdir1/6.h:sdir1/config1.hin
- sdir1/7.h:sdir2/config2.hin)
+AC_CONFIG_HEADERS([sdir1/4.h
+ sdir1/5.h:config.hin
+ sdir1/6.h:sdir1/config1.hin
+ sdir1/7.h:sdir2/config2.hin])
AC_OUTPUT
END
test ! -f sdir1/stamp-h6
test -f sdir1/stamp-h7
-Exit 0
+:
.x_.y:
cp $< $@
+.PHONY: print
print:
- echo BEGIN: $(libfoo_la_OBJECTS) :END
+ @echo BEGIN: $(libfoo_la_OBJECTS) :END
END
libtoolize --force
$MAKE print >stdout || { cat stdout; Exit 1; }
cat stdout
-grep 'BEGIN: foo.lo :END' stdout
+$FGREP 'BEGIN: foo.lo :END' stdout
:
$ACLOCAL
$AUTOMAKE
+
+for i in 1 2 3 4; do
+ grep "^MY_FLAGS_$i *= *-DABC=345 *$" Makefile.in
+done
+
+:
# processed far later).
echo 'AUTOMAKE_OPTIONS = -Wno-portability' >> Makefile.am
$AUTOMAKE
+
+:
#! /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
EOF
sed -n '/^install:/,/^ /p' Makefile.in > target.value
diff target.expected target.value
+
+: