automake
[Top][All Lists]
Advanced

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

Re: Forcing the linking language


From: Norman Gray
Subject: Re: Forcing the linking language
Date: Mon, 18 Oct 2004 23:10:01 +0100


Ralf,

On 2004 Oct 18 , at 13.17, Ralf Wildenhues wrote:

* Norman Gray wrote on Fri, Oct 15, 2004 at 11:19:21PM CEST:
I'm assembling a (shared) library using convenience libraries:

lib_LTLIBRARIES = libfoo.la
libfoo_la_SOURCES =
libfoo_la_LIBADD = stuff/libconvenience.la

Well.  Imagine the following: Your libconvenience.la is not built by
you, it's rather the implementation of a published interface, so in
general you cannot know which language it actually consists of.

Thanks for your remarks, here.

I see the point you're making, but would think that if the convenience library in question were not under my control in the way you suggest, then building it as a convenience library is probably a rather poor idea anyway. But this is arguable.

I'd only want to do this in a situation where I know that I know important information about the objects and libraries in question, that automake couldn't be expected to find out for itself.

But then again, I'd suggest you drop your convenience library and
use subdir-objects (with a recent Automake).  Problem solved (apart
from any subdir-object related Libtool bugs).

Ah, I hadn't thought of that. I've been vaguely aware of the subdir-objects work, without yet examining it in detail.

I've managed to get this to work by setting

libfoo_la_SOURCES = dummy.f

where dummy.f is a trivial Fortran routine.  That tells automake that
Fortran is involved somewhere, and it consequently does The Right
Thing.  But this seems like a bit of a hack.

I think that is by far the easiest way to achieve what you want.

That's reassuring. Reassuring, apart from anything else, that there isn't some terrible bear-trap I hadn't thought about.

I vaguely wondered if there was/could be something like

libfoo_la_LINKLANGUAGE = fc

(or the $languages{} key of your choice). Naw, that's asking for trouble, I'm sure, and is tantamount to exposing automake internals....

All the best,

Norman


--
----------------------------------------------------------------------
Norman Gray  :  Physics & Astronomy, Glasgow University, UK
http://www.astro.gla.ac.uk/users/norman/  :  www.starlink.ac.uk





reply via email to

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