[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Defining dependencies in Automake
From: |
Gary V. Vaughan |
Subject: |
Re: Defining dependencies in Automake |
Date: |
Wed, 23 Jun 2010 11:54:02 +0700 |
[please delete address@hidden from Cc: if you reply]
This is really an automake question, so you posted to the wrong list!
On 22 Jun 2010, at 22:32, Sam Silla wrote:
> Greetings,
>
> I have a Makefile.am file right now that looks like this:
>
> lib_LIBRARIES = foo.a
>
> foo_a_SOURCES = bar.F90 baz.F90
>
> However, bar.F90 depends on several other Fortran files (x.F90, y.F90,
> z.F90). I would like to set up Automake to rebuild bar.o if the source of
> one of these dependencies change.
>
> I've been reading the GNU manuals for automake/autoconf and was unable to
> find an applicable solution to this. Thanks for reading.
Remember that Makefile.am is just a Makefile, and that automake copies
any rules you add to Makefile.am into Makefile.
If bar.F90 somehow includes the contents of the other source files:
EXTRA_SOURCES = x.F90 y.F90 z.F90
bar.o: bar.F90 x.F90 y.F90 z.F90
Or if bar.o is made from partially linked objects (I'm not a fortran
programmer, so I don't know how the fortran compiler links):
bar.o: x.o y.o z.o
If you have several dependencies in the form of either of the above,
you also might want to look into storing the dependencies in make
variables.
HTH,
--
Gary V. Vaughan (address@hidden)