Re: fortran FC patch
Greetings, In http://www.mail-archive.com/[EMAIL PROTECTED]/msg07811.html, Michael Nolta offered a simple patch for `fc' support, and Alexandre's reply suggested that there was unlikely to be a problem including this. This appears not to be in the current CVS sources (on the head, after cvs -z 9 -d :pserver:[EMAIL PROTECTED]:/cvs/automake co automake). Ought I to be surprised? Am I looking in the right place? I ask because I'm working just now on adding support to both autoconf and automake to support preprocessing of Fortran 77, and it makes most sense if I do so on top of the `fc' support rather than the older `f77' support. The preprocessing support is not mine, but Martin Wilck's (see [1]). He submitted patches for this in 2000, but for some reason or another they never made it into the autoconf or automake sources. I'm just adding them now, adjusting them so they're compatible with the current autoconf and automake versions. Given that there isn't a problem with Michael's patches, and given that I don't _really_ want to muck about with the CVS head, would it be reasonable for me to apply Michael's patches to a local copy of automake 1.8.2 and submit the joint patch at some later stage when I've got everything working? No-one _else_ is working on this, are they? All the best, Norman [1] http://sources.redhat.com/ml/autoconf-patches/2000-07/msg00287.html http://sources.redhat.com/ml/automake/2000-07/msg00043.html -- --- Norman Grayhttp://www.astro.gla.ac.uk/users/norman/ Physics and Astronomy, University of Glasgow, UK [EMAIL PROTECTED]
Re: fortran FC patch
Michael == Michael R Nolta [EMAIL PROTECTED] writes: Michael Hi, Hi Michael, Happy new year, and sorry for the delay. Michael Here's a small patch to automake-1.8 to support the new FC fortran Michael interface in autoconf (AC_PROG_FC,FC,FCFLAGS). Essentially I just Michael copied the F77 parts and replaced F77-FC, adding a new language with Michael name fc. Michael The patch is simple enough that it's probably ok, and Michael it seems to work. This looks correct to me, but the only way to ensure it will remain so is to add a test case. Could you write one? See tests/README for guidance. Also we can't install such a new feature without a proper update of the manual. Finally, you should also submit a ChangeLog entry along with your patch. I think that's all :) (All this is summarized on http://sources.redhat.com/automake/contribute.html) Michael The one bit which I'm not sure about regards file Michael extensions. I split them between f77 and fc, Michael allocating .f and .for to the former, .f90 and Michael .f95 to the latter. This probably breaks stuff which Michael assumed .f90 was handled by f77. I'm not a fortran user, but I've always wondered why .f90 was listed as an extension for F77. Moving it away sounds sensible to me. -- Alexandre Duret-Lutz
fortran FC patch
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.inSat 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', );