automatic generation of .mod files?



Tobias Burnus wrote:
[snip...]
(Another thing I was thinking about was on-the-fly generation of .mod
files: If the .mod file couldn't be found for "USE module", the
compiler searches for the "module.f90" files (e.g. in only some
directories like /usr/{local/,}include/finclude/) and automatically
compiles it to generate a .mod file (and no assembler/object file).

What about putting the following into your "makefile" (it doesn't
work for "system" sourcefiles, but does work for your own)

..SUFFIXES: .m4 .c .F .f
....
SRCDIR = <your source directory>
OBJDIR = <HW/OS/compiler/flag-dependent "build" directory>
....
%.o : %.mod # Disable "gmake"s obnoxious implicit Modula-2 rule

..f90.mod:
cd ${OBJDIR}; ${FC} ${FFLAGS} -c ${SRCDIR}/$<

.



Relevant Pages

  • Re: building gcc 4.1.1 on solrais 10 results in truncated files
    ... we highly recommend that GCC be built into a separate directory than ... building where objdir is a subdirectory of ... If you encounter seemingly strange errors when trying to build the compiler ... have previously configured the compiler in the source directory. ...
    (comp.unix.solaris)
  • Re: automatic generation of .mod files?
    ... SRCDIR = <your source directory> ... I have found it acceptable to ignore the .mod file dependencies ... or in some cases a compiler might not ... that is an acceptable plan. ...
    (comp.lang.fortran)
  • Re: Need help getting started
    ... Now execute this command: ... Recompile the 4th compiler with the new editor.h; ...
    (comp.lang.forth)
  • Re: building gcc 4.1.1 on solrais 10 results in truncated files
    ... Christian Frommeyer wrote: ... have previously configured the compiler in the source directory. ... again and start over like described on the gcc install ...
    (comp.unix.solaris)
  • Re: ucblogo source code.
    ... If yes what compiler and compiler configuration/settings has been used ... If you download the Windows version, the source directory includes a ... By the way, for reasons I don't understand, the debugging version works ...
    (comp.lang.logo)