automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 10/14] Tests: new requirements "fortran" and "fortran77"


From: Stefano Lattarini
Subject: [PATCH 10/14] Tests: new requirements "fortran" and "fortran77"
Date: Fri, 2 Jul 2010 15:16:18 +0200
User-agent: KMail/1.12.1 (Linux/2.6.30-2-686; KDE/4.3.4; i686; ; )

Tests: new requirements "fortran" and "fortran77"

* tests/defs.in: Recognize two new requirements "fortran77" and
"fortran", asking respectively for a generic Fortran 77 compiler
and a generic "modern" Fortran compiler.
* tests/silent5.test ($required): Updated.
* tests/silentf77.test: Likewise.
* tests/silentf90.test: Likewise.
* tests/fort4.test: Likewise.
* tests/fort5.test: Likewise.

Ideas from Ralf Wildenhues and Stefano Lattarini.  Final patch
by Stefano Lattarini.

NOTE: This patch was made easy by the previous refactoring.
From ff6ded140b6789b6ad65df62caf0e6f16b735546 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Fri, 2 Jul 2010 12:41:30 +0200
Subject: [PATCH 10/14] Tests: new requirements "fortran" and "fortran77"

* tests/defs.in: Recognize two new requirements "fortran77" and
"fortran", asking respectively for a generic Fortran 77 compiler
and a generic "modern" Fortran compiler.
* tests/silent5.test ($required): Updated.
* tests/silentf77.test: Likewise.
* tests/silentf90.test: Likewise.
* tests/fort4.test: Likewise.
* tests/fort5.test: Likewise.

Ideas from Ralf Wildenhues and Stefano Lattarini.  Final patch
by Stefano Lattarini.
---
 ChangeLog            |   16 ++++++++++++++++
 tests/defs.in        |    7 +++++++
 tests/fort4.test     |    8 +++-----
 tests/fort5.test     |    8 +++-----
 tests/silent5.test   |    3 +--
 tests/silentf77.test |    2 +-
 tests/silentf90.test |    2 +-
 7 files changed, 32 insertions(+), 14 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4e2c685..5d027b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,20 @@
 2010-07-02  Stefano Lattarini  <address@hidden>
+           Ralf Wildenhues  <address@hidden>
+
+       New requirements "fortran" and "fortran77", for tests using
+       Fortran compilers.
+       * tests/defs.in: Recognize two new requirements "fortran77" and
+       "fortran", asking respectively for a generic Fortran 77 compiler
+       and a generic "modern" Fortran compiler.
+       * tests/silent5.test ($required): Updated.
+       * tests/silentf77.test: Likewise.
+       * tests/silentf90.test: Likewise.
+       * tests/fort4.test: Likewise.
+       * tests/fort5.test: Likewise.
+       Ideas from Ralf Wildenhues and Stefano Lattarini.  Final patch
+       by Stefano Lattarini.
+
+2010-07-02  Stefano Lattarini  <address@hidden>
 
        Refactor code requiring compilers in testsuite.
        * tests/defs.in (require_compiler): New function.
diff --git a/tests/defs.in b/tests/defs.in
index d97581f..588c3ec 100644
--- a/tests/defs.in
+++ b/tests/defs.in
@@ -182,6 +182,13 @@ do
     g++)
       require_gnu_compiler 'CXX' g++
       ;;
+    fortran)
+      require_compiler 'FC' gfortran
+      ;;
+    fortran77)
+      # gfortran should be able to seamlessly compile Fortran 77 code
+      require_compiler 'F77' g77 gfortran
+      ;;
     icc)
       CC=icc
       export CC
diff --git a/tests/fort4.test b/tests/fort4.test
index 605a377..fd488c9 100755
--- a/tests/fort4.test
+++ b/tests/fort4.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006  Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -16,9 +16,7 @@
 
 # Test mixing Fortran 77 and Fortran (FC).
 
-# For now, require the GNU compilers (to avoid some Libtool/Autoconf
-# issues).
-required='g77 gfortran'
+required='fortran fortran77'
 . ./defs || Exit 1
 
 set -e
@@ -53,7 +51,7 @@ cat >>configure.in <<'END'
 AC_PROG_F77
 AC_PROG_FC
 AC_FC_SRCEXT([f90], [],
-  [AC_MSG_FAILURE([$FC compiler cannot create executables], 77)])
+  [AC_MSG_FAILURE([$FC compiler cannot create executables], [1])])
 AC_FC_LIBRARY_LDFLAGS
 AC_OUTPUT
 END
diff --git a/tests/fort5.test b/tests/fort5.test
index cd2a7d5..5bc0741 100755
--- a/tests/fort5.test
+++ b/tests/fort5.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006, 2009  Free Software Foundation, Inc.
+# Copyright (C) 2006, 2009, 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
@@ -16,9 +16,7 @@
 
 # Test mixing Fortran 77 and Fortran (FC), libtool version.
 
-# For now, require the GNU compilers (to avoid some Libtool/Autoconf
-# issues).
-required='libtoolize g77 gfortran'
+required='libtoolize fortran fortran77'
 . ./defs || Exit 1
 
 set -e
@@ -54,7 +52,7 @@ cat >>configure.in <<'END'
 AC_PROG_F77
 AC_PROG_FC
 AC_FC_SRCEXT([f90], [],
-  [AC_MSG_FAILURE([$FC compiler cannot create executables], 77)])
+  [AC_MSG_FAILURE([$FC compiler cannot create executables], [1])])
 AC_FC_LIBRARY_LDFLAGS
 LT_PREREQ([2.0])
 AC_PROG_LIBTOOL
diff --git a/tests/silent5.test b/tests/silent5.test
index 94f6fd5..9c5c9c6 100755
--- a/tests/silent5.test
+++ b/tests/silent5.test
@@ -20,8 +20,7 @@
 # remove this test script.
 # Please keep this file in sync with sister test silent5b.test.
 
-# FIXME: a generic Fortran compiler should suffice here
-required='cc c++ gfortran flex bison'
+required='cc c++ fortran fortran77 flex bison'
 . ./defs
 
 set -e
diff --git a/tests/silentf77.test b/tests/silentf77.test
index 39495d4..b1931f2 100755
--- a/tests/silentf77.test
+++ b/tests/silentf77.test
@@ -17,7 +17,7 @@
 # Check silent-rules mode for Fortran 77.
 # Keep this ins sync with the sister test silentf90.test.
 
-required='gfortran' # FIXME: any working Fortran compiler should be OK!
+required='fortran77'
 . ./defs
 
 set -e
diff --git a/tests/silentf90.test b/tests/silentf90.test
index 9330bdd..4d88afe 100755
--- a/tests/silentf90.test
+++ b/tests/silentf90.test
@@ -17,7 +17,7 @@
 # Check silent-rules mode for Fortran 90.
 # Keep this ins sync with the sister test silentf77.test.
 
-required='gfortran' # FIXME: any working Fortran compiler should be OK!
+required='fortran'
 . ./defs
 
 set -e
-- 
1.6.5


reply via email to

[Prev in Thread] Current Thread [Next in Thread]