automake
[Top][All Lists]
Advanced

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

Re: fortran modules


From: Alexandre Duret-Lutz
Subject: Re: fortran modules
Date: Sun, 01 Feb 2004 21:08:24 +0100
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

>>> "Michael" == Michael R Nolta <address@hidden> writes:

[...]

 Michael> Yes, they're a side-effect of .f90 -> .o, and don't
 Michael> need a special rule.

Well, they probably need something like this

foo.mod FOO.mod: foo.$(OBJEXT)
        @if test -f $@; then :; else \
          rm -f data.$(OBJEXT); \
          $(MAKE) $(AM_MAKEFLAGS) data.c; \
        fi
        
to ensure that module get updated or recreated when needed.
(see also http://sources.redhat.com/ml/automake/2004-01/msg00248.html)

 >> In the former case, do all .f90 files produce a module, or is their
 >> an easy way to know which do and which don't?

 Michael> Not all files produce modules; only files containing
 Michael> "module x ... end module" blocks do. And there can be
 Michael> multiple module definitions per file. 

I hope that does not mean many *.mod file can be produced by a
single compilation.

[...]

 >> That would be just
 >> nodist_include_HEADERS = $(DUMMY_MOD)
 >> [...]

 Michael> Yes, you're right. Should I say "nodist_EXTRA_HEADERS = ..." too?

You can.  It even looks more sensible.  But actually it's
superfluous: EXTRA_* is really useful when there are extra files
to distribute or extra compile rule to generate.

[...]

-- 
Alexandre Duret-Lutz





reply via email to

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