[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
fortran FC patch
From: |
Michael R Nolta |
Subject: |
fortran FC patch |
Date: |
Sat, 13 Dec 2003 01:15:41 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20030708 |
Hi,
Here's a small patch to automake-1.8 to support the new "FC" fortran
interface in autoconf (AC_PROG_FC,FC,FCFLAGS). Essentially I just copied
the F77 parts and replaced F77->FC, adding a new language with name "fc".
The patch is simple enough that it's probably ok, and it seems to work.
The one bit which I'm not sure about regards file extensions. I split
them between "f77" and "fc", allocating ".f" and ".for" to the former,
".f90" and ".f95" to the latter. This probably breaks stuff which
assumed ".f90" was handled by f77.
-Mike
diff -Nur automake-1.8.orig/automake.in automake-1.8/automake.in
--- automake-1.8.orig/automake.in Mon Dec 8 12:53:57 2003
+++ automake-1.8/automake.in Sat Dec 13 00:34:11 2003
@@ -790,7 +790,22 @@
'lder' => 'F77LD',
'ld' => '$(F77)',
'pure' => 1,
- 'extensions' => ['.f', '.for', '.f90']);
+ 'extensions' => ['.f', '.for']);
+
+# Fortran
+register_language ('name' => 'fc',
+ 'Name' => 'Fortran',
+ 'linker' => 'FCLINK',
+ 'link' => '$(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS)
$(LDFLAGS) -o $@',
+ 'flags' => ['FFLAGS'],
+ 'compile' => '$(FC) $(AM_FCFLAGS) $(FCFLAGS)',
+ 'compiler' => 'FCCOMPILE',
+ 'compile_flag' => '-c',
+ 'output_flag' => '-o',
+ 'lder' => 'FCLD',
+ 'ld' => '$(FC)',
+ 'pure' => 1,
+ 'extensions' => ['.f90', '.f95']);
# Preprocessed Fortran 77
#
@@ -4862,6 +4877,12 @@
# Rewrite a single Fortran 77 file.
sub lang_f77_rewrite
+{
+ return LANG_PROCESS;
+}
+
+# Rewrite a single Fortran file.
+sub lang_fc_rewrite
{
return LANG_PROCESS;
}
diff -Nur automake-1.8.orig/lib/Automake/Variable.pm
automake-1.8/lib/Automake/Variable.pm
--- automake-1.8.orig/lib/Automake/Variable.pm Mon Dec 8 10:34:52 2003
+++ automake-1.8/lib/Automake/Variable.pm Sat Dec 13 00:27:25 2003
@@ -175,6 +175,8 @@
CXXFLAGS => 'AC_PROG_CXX',
F77 => 'AC_PROG_F77',
F77FLAGS => 'AC_PROG_F77',
+ FC => 'AC_PROG_FC',
+ FCFLAGS => 'AC_PROG_FC',
RANLIB => 'AC_PROG_RANLIB',
YACC => 'AC_PROG_YACC',
);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- fortran FC patch,
Michael R Nolta <=