]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Add support for newer Fortran extensions '.[fF]0[38]'.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 8 Mar 2008 12:20:20 +0000 (13:20 +0100)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 8 Mar 2008 12:20:20 +0000 (13:20 +0100)
* automake.in (scan_autoconf_traces): Accept .f03, .f08 for
Fortran, .F03 and .F08 for preprocessed Fortran files.
Use $(FCFLAGS_f[09]x) accordingly.
* doc/automake.texi (Compiling Fortran 9x Files): Update.
* tests/fort2.test: Add more tests.
* NEWS: Update.

NEWS
automake.in
doc/automake.texi
tests/fort2.test

diff --git a/NEWS b/NEWS
index e7015785a1ff9413628541e9c48757e4fcdae719..88437cfbcd2135a2e62badf2bd1f3d2abd197b97 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -16,8 +16,8 @@ New in 1.10a:
   - subdir-object mode works now with Fortran (F77, FC, preprocessed
     Fortran, and Ratfor).
 
-  - For files with extension .f90 or .f95, the flag $(FCFLAGS_f9x)
-    computed by AC_FC_SRCEXT is now honored in compile rules.
+  - For files with extension .f90, .f95, .f03, or .f08, the flag
+    $(FCFLAGS_f[09]x) computed by AC_FC_SRCEXT is now used in compile rules.
 
   - Files with extension .sx are also treated as preprocessed assembler.
 
index 242abce5d759ddfbab881474cd080821dd9c25de..9612204f8a7053c4a0f25330f57ebcd037d4b2dc 100755 (executable)
@@ -895,7 +895,7 @@ register_language ('name' => 'fc',
                   'lder' => 'FCLD',
                   'ld' => '$(FC)',
                   'pure' => 1,
-                  'extensions' => ['.f90', '.f95']);
+                  'extensions' => ['.f90', '.f95', '.f03', '.f08']);
 
 # Preprocessed Fortran
 register_language ('name' => 'ppfc',
@@ -912,7 +912,7 @@ register_language ('name' => 'ppfc',
                   'output_flag' => '-o',
                   'libtool_tag' => 'FC',
                   'pure' => 1,
-                  'extensions' => ['.F90','.F95']);
+                  'extensions' => ['.F90','.F95', '.F03', '.F08']);
 
 # Preprocessed Fortran 77
 #
@@ -4915,7 +4915,7 @@ sub scan_autoconf_traces ($)
          # These flags are used as %SOURCEFLAG% in depend2.am,
          # where the trailing space is important.
          $sourceflags{'.' . $suffix} = '$(FCFLAGS_' . $suffix . ') '
-           if ($suffix eq 'f90' || $suffix eq 'f95');
+           if ($suffix eq 'f90' || $suffix eq 'f95' || $suffix eq 'f03' || $suffix eq 'f08');
        }
       elsif ($macro eq 'AC_INIT')
        {
index 2c5dcfae86ced9977cb2998cd30056cef6e1268f..fa9f9d991cc1efe038325d1ce9fab0735e3903d0 100644 (file)
@@ -6347,7 +6347,8 @@ library.
 @comment  node-name,  next,  previous,  up
 @subsection Compiling Fortran 9x Files
 
-@file{N.o} is made automatically from @file{N.f90} or @file{N.f95}
+@file{@var{N}.o} is made automatically from @file{@var{N}.f90},
+@file{@var{N}.f95}, @file{@var{N}.f03}, or @file{@var{N}.f08}
 by running the Fortran 9x compiler.  The precise command used
 is as follows:
 
@@ -6359,6 +6360,12 @@ is as follows:
 @item .f95
 @code{$(FC) $(AM_FCFLAGS) $(FCFLAGS) -c $(FCFLAGS_f95) $<}
 
+@item .f03
+@code{$(FC) $(AM_FCFLAGS) $(FCFLAGS) -c $(FCFLAGS_f03) $<}
+
+@item .f08
+@code{$(FC) $(AM_FCFLAGS) $(FCFLAGS) -c $(FCFLAGS_f08) $<}
+
 @end table
 
 @node Java Support
index b05b4b09bde869b81d974810d2211c0d0939f1f6..ee25592c3541bdfcf2033c6708d6a219a6cddbf7 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006  Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008  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
@@ -29,12 +29,14 @@ cat >>configure.in <<'END'
 AC_PROG_FC
 AC_FC_SRCEXT([f90])
 AC_FC_SRCEXT([f95])
+AC_FC_SRCEXT([f03])
+AC_FC_SRCEXT([f08])
 AC_FC_SRCEXT([blabla])
 END
 
 cat >Makefile.am <<'END'
 bin_PROGRAMS = hello goodbye
-hello_SOURCES = hello.f90 foo.f95 sub/bar.f95
+hello_SOURCES = hello.f90 foo.f95 sub/bar.f95 hi.f03 sub/howdy.f03 greets.f08 sub/bonjour.f08
 goodbye_SOURCES = bye.f95 sub/baz.f90
 goodbye_FCFLAGS =
 END
@@ -49,6 +51,12 @@ grep '.\$(FCCOMPILE)'  Makefile.in > stdout
 grep -v '\$(FCFLAGS_f' stdout && exit 1
 grep '.\$(FC.*\$(FCFLAGS_blabla' Makefile.in && exit 1
 # Notice the TAB:
+grep '^[       ].*\$(FC.*\$(FCFLAGS_f90).*\.f90' Makefile.in
+grep '^[       ].*\$(FC.*\$(FCFLAGS_f95).*\.f95' Makefile.in
+grep '^[       ].*\$(FC.*\$(FCFLAGS_f03).*\.f03' Makefile.in
+grep '^[       ].*\$(FC.*\$(FCFLAGS_f08).*\.f08' Makefile.in
 grep '^[       ].*\$(FC.*\$(FCFLAGS_f90).*\.f95' Makefile.in && exit 1
 grep '^[       ].*\$(FC.*\$(FCFLAGS_f95).*\.f90' Makefile.in && exit 1
+grep '^[       ].*\$(FC.*\$(FCFLAGS_f90).*\.f03' Makefile.in && exit 1
+grep '^[       ].*\$(FC.*\$(FCFLAGS_f08).*\.f90' Makefile.in && exit 1
 :