]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Minor improvements and extensions to various tests.
authorStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 28 Jun 2010 11:44:33 +0000 (13:44 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 8 Nov 2010 17:48:29 +0000 (18:48 +0100)
* 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'.

ChangeLog
tests/compile.test
tests/compile_f90_c_cxx.test
tests/compile_f_c_cxx.test
tests/defun.test
tests/defun2.test
tests/stamph2.test
tests/suffix10.test
tests/vars.test
tests/vars3.test
tests/vartar.test

index 934eba633fa7d400d3b8e069886c4797ca4ed3ee..90cfc531edfd741f6fe7098d8297bb73fd3dc911 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index ef27afea0127466033f61f4c658e4cae0a780d20..4b0e0459ea3ddbe529c39ba4e8e6aebfb330e900 100755 (executable)
@@ -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
+
+:
index 21ed65da4276470554755d1ecd076f6edb5be533..bb46390760713d64a467d1c5f849abacd7e28d1c 100755 (executable)
@@ -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
+:
index a995527c917c3f8bb15d7e43f66891225fc4b031..2ab53491bfca1d62e507624cedc44d5c52a90afe 100755 (executable)
@@ -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
+:
index 5ffb9a11b7276b2b559fbc20f3c57cb472638758..604191884232f54a2ed81a8c8848933c55d921e1 100755 (executable)
 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
+
+:
index 6c10a8f21a2ba4bada6682d5ef348685c996b8b4..1e2677ddc1660c0520a95d0d851bbc0edb8ec8bd 100755 (executable)
@@ -38,3 +38,5 @@ END
 
 $ACLOCAL
 $AUTOMAKE
+
+:
index cb96d278cda198be2c79eb31411114140e797067..aa077435883ea5b0edc3fbc49c64795a4e35567b 100755 (executable)
@@ -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
 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
+:
index 131359c8fc58eff6c365650de4a195777213b72c..d85ad8fdc3939815a783c2f4a86bd947c275bba7 100755 (executable)
@@ -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
 
 :
index 6163a8d0b5b78501c90d015869bfeeada179b59d..c88db6861c8ab4479c5eb8fc260d2ac626a14460 100755 (executable)
@@ -30,3 +30,9 @@ END
 
 $ACLOCAL
 $AUTOMAKE
+
+for i in 1 2 3 4; do
+  grep "^MY_FLAGS_$i *= *-DABC=345 *$" Makefile.in
+done
+
+:
index 6b738ab98fe92c9966d313c76e34d81e758c3e51..e8609ee1427cc5557258f031b28cd07c4ae42150 100755 (executable)
@@ -82,3 +82,5 @@ $AUTOMAKE -Wno-portability
 # processed far later).
 echo 'AUTOMAKE_OPTIONS = -Wno-portability' >> Makefile.am
 $AUTOMAKE
+
+:
index 3a18d773a60832ab7a45875dcc0e9fde6324580e..a33ab64ea688cd2b6b815b02da9a774379dd38b4 100755 (executable)
@@ -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
+
+: