1 |
I was thinking that is probably possible to make a bash script that will |
2 |
automatically found what libraries name must be changed in the Makefiles.am. |
3 |
|
4 |
So today I started putting down an initial script that will do this. |
5 |
How and if it works is quite difficult to explain by now, because probably |
6 |
there are corner cases that I haven't taked in account. |
7 |
|
8 |
My idea is this: |
9 |
|
10 |
1) This script will provide a function from ${PN} which is equal to the |
11 |
subproject we want to compile, will modify the subprojects makefiles. |
12 |
for example: |
13 |
|
14 |
libkaddressbook_la_LIBADD = |
15 |
$(top_builddir)/kaddressbook/printing/libprinter.la \ |
16 |
$(top_builddir)/kaddressbook/interfaces/libkabinterfaces.la \ |
17 |
$(top_builddir)/libkdepim/libkdepim.la -lkabc_file |
18 |
|
19 |
will become: |
20 |
|
21 |
$(top_builddir)/kaddressbook/printing/libprinter.la \ |
22 |
$(top_builddir)/kaddressbook/interfaces/libkabinterfaces.la \ |
23 |
-lkdepim -lkabc_file |
24 |
|
25 |
like you can see in this way we will use the already installed (from a |
26 |
previous "libkdepim" ebuild) libkdepim instead of compiling the local one. |
27 |
libkabinterfaces.la can't be treated in the same way because is compiled when |
28 |
we compile kaddressbook for the fact that is in the same subproject. |
29 |
|
30 |
2) Create a list of the used subprojects, a subproject is equal to the first |
31 |
kde-module subdir. kaddressbook don't need any other subproject, but for |
32 |
example other programs will need a library defined like "noinst_LTLIBRARY" |
33 |
and so unfortunately this can't be installed and must be recompiled for every |
34 |
program that needs it. An example is libkcal that needs libical (and this is |
35 |
a "noinst_LTLIBRARY" ). |
36 |
|
37 |
3a) from this list we can remove the configure.in.in in the not needed |
38 |
subproject, We can also remove the Makefiles.{in, am} and the recreate the |
39 |
configure (and of course only the neede Makefiles.in). |
40 |
Slow but quite right. |
41 |
|
42 |
3b) create a list of DO_NOT_COMPILE |
43 |
Fast but will leave some don't needed configure check. BUT I don't think this |
44 |
will be a problem because of course the deps are already satisfied by the |
45 |
deps of the subproject we are going to emerge. |
46 |
|
47 |
Tomorrow I'll try to finish this script, implement it in an eclass and create |
48 |
some simple ebuild to test them and if it works I'll post it and some |
49 |
results. |
50 |
|
51 |
Let me know what do you think about this idea. |
52 |
|
53 |
Bye! |
54 |
-- |
55 |
Simone Gotti |
56 |
<simone.gotti@×××××.it> |
57 |
http://kde-bluetooth.sf.net |
58 |
|
59 |
-- |
60 |
gentoo-dev@g.o mailing list |