diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2010-06-28 13:44:33 +0200 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2010-11-08 18:48:29 +0100 |
commit | d72613b0ba14ae421daba80b34547e9a970a50b6 (patch) | |
tree | cb3add02fae661bc01e7b5805ddb0b65f4427687 | |
parent | 999865553137b48a0770b5073cfd4f91c1e49593 (diff) | |
download | automake-d72613b0ba14ae421daba80b34547e9a970a50b6.tar.gz |
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'.
-rw-r--r-- | ChangeLog | 22 | ||||
-rwxr-xr-x | tests/compile.test | 4 | ||||
-rwxr-xr-x | tests/compile_f90_c_cxx.test | 8 | ||||
-rwxr-xr-x | tests/compile_f_c_cxx.test | 7 | ||||
-rwxr-xr-x | tests/defun.test | 11 | ||||
-rwxr-xr-x | tests/defun2.test | 2 | ||||
-rwxr-xr-x | tests/stamph2.test | 18 | ||||
-rwxr-xr-x | tests/suffix10.test | 5 | ||||
-rwxr-xr-x | tests/vars.test | 6 | ||||
-rwxr-xr-x | tests/vars3.test | 2 | ||||
-rwxr-xr-x | tests/vartar.test | 4 |
11 files changed, 62 insertions, 27 deletions
@@ -1,3 +1,25 @@ +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. diff --git a/tests/compile.test b/tests/compile.test index ef27afea0..4b0e0459e 100755 --- a/tests/compile.test +++ b/tests/compile.test @@ -1,5 +1,5 @@ #! /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 @@ -42,3 +42,5 @@ test -f a.c ./compile touch a.obj -- -o ac.obj a.c test ! -f a.obj test ac.obj + +: diff --git a/tests/compile_f90_c_cxx.test b/tests/compile_f90_c_cxx.test index 21ed65da4..bb4639076 100755 --- a/tests/compile_f90_c_cxx.test +++ b/tests/compile_f90_c_cxx.test @@ -27,19 +27,13 @@ cat >> configure.in << 'END' 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 @@ -49,4 +43,4 @@ $FGREP ' $(COMPILE)' Makefile.in $FGREP ' $(CXXCOMPILE)' Makefile.in $FGREP ' $(FCCOMPILE)' Makefile.in -Exit 0 +: diff --git a/tests/compile_f_c_cxx.test b/tests/compile_f_c_cxx.test index a995527c9..2ab53491b 100755 --- a/tests/compile_f_c_cxx.test +++ b/tests/compile_f_c_cxx.test @@ -33,13 +33,8 @@ END 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 @@ -49,4 +44,4 @@ $FGREP ' $(COMPILE)' Makefile.in $FGREP ' $(CXXCOMPILE)' Makefile.in $FGREP ' $(F77COMPILE)' Makefile.in -Exit 0 +: diff --git a/tests/defun.test b/tests/defun.test index 5ffb9a11b..604191884 100755 --- a/tests/defun.test +++ b/tests/defun.test @@ -21,8 +21,17 @@ 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 + +: diff --git a/tests/defun2.test b/tests/defun2.test index 6c10a8f21..1e2677ddc 100755 --- a/tests/defun2.test +++ b/tests/defun2.test @@ -38,3 +38,5 @@ END $ACLOCAL $AUTOMAKE + +: diff --git a/tests/stamph2.test b/tests/stamph2.test index cb96d278c..aa0774358 100755 --- a/tests/stamph2.test +++ b/tests/stamph2.test @@ -1,5 +1,5 @@ #! /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 @@ -20,14 +20,14 @@ 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 @@ -68,4 +68,4 @@ test ! -f sdir1/stamp-h5 test ! -f sdir1/stamp-h6 test -f sdir1/stamp-h7 -Exit 0 +: diff --git a/tests/suffix10.test b/tests/suffix10.test index 131359c8f..d85ad8fdc 100755 --- a/tests/suffix10.test +++ b/tests/suffix10.test @@ -37,8 +37,9 @@ libfoo_la_SOURCES = foo.x_ .x_.y: cp $< $@ +.PHONY: print print: - echo BEGIN: $(libfoo_la_OBJECTS) :END + @echo BEGIN: $(libfoo_la_OBJECTS) :END END libtoolize --force @@ -50,6 +51,6 @@ $AUTOMAKE --add-missing $MAKE print >stdout || { cat stdout; Exit 1; } cat stdout -grep 'BEGIN: foo.lo :END' stdout +$FGREP 'BEGIN: foo.lo :END' stdout : diff --git a/tests/vars.test b/tests/vars.test index 6163a8d0b..c88db6861 100755 --- a/tests/vars.test +++ b/tests/vars.test @@ -30,3 +30,9 @@ END $ACLOCAL $AUTOMAKE + +for i in 1 2 3 4; do + grep "^MY_FLAGS_$i *= *-DABC=345 *$" Makefile.in +done + +: diff --git a/tests/vars3.test b/tests/vars3.test index 6b738ab98..e8609ee14 100755 --- a/tests/vars3.test +++ b/tests/vars3.test @@ -82,3 +82,5 @@ $AUTOMAKE -Wno-portability # processed far later). echo 'AUTOMAKE_OPTIONS = -Wno-portability' >> Makefile.am $AUTOMAKE + +: diff --git a/tests/vartar.test b/tests/vartar.test index 3a18d773a..a33ab64ea 100755 --- a/tests/vartar.test +++ b/tests/vartar.test @@ -1,5 +1,5 @@ #! /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 @@ -37,3 +37,5 @@ install: EOF sed -n '/^install:/,/^ /p' Makefile.in > target.value diff target.expected target.value + +: |