automake
[Top][All Lists]
Advanced

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

Re: Change a flag for a specific file


From: Sylvestre Ledru
Subject: Re: Change a flag for a specific file
Date: Tue, 22 Aug 2006 12:50:40 +0200

> If it is even important to you to have _only_ one file compiled with
> this flag, say bar.f, while all the others do not get this flag, you
> could make the compilation of bar.f special by putting it in a (not
> installed) library.  For example:
>   bin_PROGRAMS = foo
>   foo_SOURCES = foo.f
>   foo_LDADD = libdummy.a
>   noinst_LIBRARIES = libdummy.a
>   libdummy_a_SOURCES = bar.f
>   libdummy_a_FCFLAGS = -O0

Your solution is perfect for programs but I would like to use it with a
library (libtool)

I have :
lib_LTLIBRARIES = libfoo.la
libfoo_la_SOURCES = bezous.f
libfoo_la_LIBADD = libdummy-foo.la

noinst_LTLIBRARIES = libdummy-foo.la
libdummy_foo_la_SOURCES = hqror2.f
libdummy_foo_la_FFLAGS = -O0

The problem with this solution is that Automake build libfoo first and
as libdummy-foo doesn't not exist yet, it fails ("make: *** No rule to
make target `libdummy-foo.la', needed by `libfoo.la'.  Stop.")

Then, I tried to put this line in the Makefile.am 
LTLIBRARIES = $(noinst_LTLIBRARIES) $(lib_LTLIBRARIES) 
however, automake rejects it (Makefile.am:xx: `LTLIBRARIES' is an
anachronism)

Is there a solution to specify Automake which one doing first (noinst_
before lib_) ?

Cheers,
Sylvestre





reply via email to

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