autoconf
[Top][All Lists]
Advanced

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

Re: Grouping header files during build


From: Russell Shaw
Subject: Re: Grouping header files during build
Date: Sat, 25 Feb 2006 16:39:19 +1100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20060205 Debian/1.7.12-1.1

Ralf Wildenhues wrote:
Hi Russell,

* Russell Shaw wrote on Wed, Feb 22, 2006 at 04:33:40PM CET:

Hi,
I have a build tree consisting of various programs and libraries, all
in separate subdirectories. The programs are built using these libraries.
Both programs and libraries get installed.

Do you use libtool to create the libraries?

yes

When each library is built, i want to copy its header to a header-directory
and its object to a library-directory in the buildtree so that the programs
that get built later can include it using the gcc -I and -L options.

Why do you want to do that (honest question)?
If you have a build tree like this:
  build
  `-  lib1
  `-  lib2
  `-  prog1

you can use `-L../lib1 -llib1 -L../lib2 -llib2' for linking, or, if
using libtool, `../lib1/liblib1.la ../lib2/liblib2.la'.

It doesn't matter so much for library objects, but source files have things
like #include X11/extensions/... and i didn't want to modify those, because
they can also be compiled stand-alone on the host, and so need those headers
in those locations.

So, what is the recommended way in Makefile.am to copy a library header and
object to another directory after a library is built?

If using libtool: that is not provided and supported.  The Libtool model
is that you have one uninstalled location and one installed location of
libraries.  It is not easy to loosen this restriction portably.

Finally, could i also get the central library header directory and object
directory installed in the distribution?

Well, you can use `cp' to copy around stuff, but it would really help to
know the problem to be solved from a higher-level standpoint. We may be able to point out a different solution.

I was trying to make a different (top-down) build system for the Xorg tree.
Most of the source relies on headers being layed out as they are in
/usr/include/X11, so i wanted a layout like that used during "make" in
the project tree before installing. I could permanently copy all the headers
to those locations maybe.




reply via email to

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