[Top][All Lists]

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

linking against local libs across directories and DESTDIR

From: Mike Frysinger
Subject: linking against local libs across directories and DESTDIR
Date: Sun, 19 Aug 2007 23:46:14 -0400
User-agent: KMail/1.9.7

there a list of good hints out there for managing libs across directories ?  i 
flipped through the libtool manual and the autobook but didnt really find 
anything ...

c/ create a simple C app, needs lib/ via LIBADD
lib/ create a simple simply declares SUBDIRS = c lib

the c subdir gets processed first and when it encounters 
the '$(top_builddir)/lib/' requirement, it fails since it doesnt 
know how to make it.  simple enough, just add:
        $(MAKE) -C $(top_builddir)/lib

then we move onto installing via DESTDIR:
make install DESTDIR=$PWD/_inst

now, one of two things can happen ... you can already have a copy of the 
package installed in / in which case the -L paths libtool inserts makes 
things seem to work OK or it fails because ABI has changed and the installed 
version does not match the new stuff, or it'll just straight bomb since 
nothing is installed in / and the libfoo has yet to be installed into _inst/.

what's the solution here ?  yes, i can re-order SUBDIRS so that it reads "lib 
c", but is that really a guarantee in a parallal build that the "c" subdir 
will not get processed before the "lib" subdir (the automake manually isnt 
especially clear here, maybe i'll bug them) ?  what if the project has so 
many nests of dirs and interdependencies that simply re-ordering SUBDIRS may 
not be possible ?

Attachment: signature.asc
Description: This is a digitally signed message part.

reply via email to

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