[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Making gnustep libs in a buildroot
From: |
Nicola Pero |
Subject: |
Re: Making gnustep libs in a buildroot |
Date: |
Fri, 10 May 2002 13:12:20 +0100 (BST) |
> Hi,
>
> I'm wondering if there is support in gnustep makefiles for the following:
>
> I want to be able to make an rpm containing several different GNUstep
> libraries, all but one of them dependent on that one.
>
> In general with RPMs you go through a build stage first, then an install
> stage, where the install can go into an installation root.
>
> I would like to prevent the libraries I am building from depending on my
> currently installed set of "live" libraries, and only depend on / link to the
> ones that are being built at the same time.
>
> I presume this means I am going to have to build the first one, install it
> into the installroot, then build the second one, telling it to use a -L and
> -I path of the installroot.
>
> What flags can I use for make to achieve this?
>
> Ideally I'd like to be able to do all the builds in a oner, then all the
> installs, so is there support for make to be given a library/header search
> path for a not-yet-installed library?
I'm not sure I got all of your question :-) but ...
... but the first question I would ask you is - ignoring RPMs for now -
can you build all of your libraries on a clean system with a single
top-level 'make' command ?
If you can't, then you need to fix that first. :-)
Fixing that requires adding -I and -L flags so that the not-yet-installed
libraries are found.
For example, say that you have
./GNUmakefile
./Stephen/GNUmakefile
./Stephen/xxx [first library]
./Brandon/GNUmakefile
./Brandon/xxx [second library prelinked against the first one]
In the top level GNUmakefile, you list Stephen before Brandon (so it's
compiled before the other library).
In Stephen/GNUmakefile, you simply compile libStephen.
In Brandon/GNUmakefile, you simply compile libBrandon, but adding
libBrandon_INCLUDE_DIRS += -I../
libBrandon_LIB_DIRS += -L../Stephen/obj/
libBrandon_LIBRARIES_DEPEND_UPON += -lStephen
(assuming headers of Stephen are accessed as in #include
"Stephen/Stephen.h") [warning/disclaimer - untested: typos in the exact
variable names likely ;-)]
Then, compiling on a clean system should work with a single 'make' at the
top-level. Try and hack till that works reliably :-)
Once this is done, I think making an RPM out of all the libraries at once,
using the default gnustep-make support for RPM should automatically work
out of the box (or your own hand-made support, it doesn't matter).
Maybe I completely missed your question - if so pardon me and please
re-formulate your question :-)