automake
[Top][All Lists]
Advanced

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

Re: Use partial relative path in LIBADD


From: Ralf Wildenhues
Subject: Re: Use partial relative path in LIBADD
Date: Thu, 21 Apr 2011 01:21:24 +0200
User-agent: Mutt/1.5.20 (2010-08-04)

Hello Daniel,

* Daniel Neuberger wrote on Wed, Apr 20, 2011 at 03:31:25PM CEST:
> Is there a way to translate this:
> 
>    libfoo_la_LIBADD = $(top_builddir)/some/path/libfoobar.la
> 
> to this:
> 
>    libfoo_la_LIBADD = some/path/libfoobar.la
> 
> with Automake?

Unforteunately not; neither make, nor automake have good ways to
canonicalize paths (with the exception that GNU make will know that FILE
and ./FILE are identical for non-absolute FILE).

Why do you ever need to use the former?  (It can come in handy in
included Makefile.am fragments.)  The important bits are: however
you specify a file in one Makefile.am, you should always do it the
same way, or things may go wrong.  So a library built from the same
Makefile.am should have a relative name; but arguably, you could
also write, e.g.,

lib_LTLIBRARIES = ./libfoo.la
__libfoo_la_SOURCES = ...

if you really want to make your life hard; I'd always suggest

lib_LTLIBRARIES = libfoo.la
libfoo_la_SOURCES = ...

and using plain 'libfoo.la' in libbar_la_LIBADD.

Hope that helps.

Cheers,
Ralf



reply via email to

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